Search found 30 matches

by jamescobban
Fri Jul 03, 2009 8:36 pm
Forum: C++ Development
Topic: exFileDialog wildcard doesn't work on initial entry
Replies: 3
Views: 829

try it without the semi-colon. "GEDCOM files (*.ged)|*.ged|GEDCOM files (*.GED)|*.GED" This does not give the desired result, as it creates TWO separate items on the selection list when in fact there is only one type, complicated by Bill's decision to support case-insensitive file names. I still do...
by jamescobban
Tue Jun 30, 2009 9:31 pm
Forum: C++ Development
Topic: Problem with wxTextCtrl Stream Simulation
Replies: 1
Views: 489

Problem with wxTextCtrl Stream Simulation

To quote from the documentation of wxTextCtrl: "Note that independently of this setting you can always use wxTextCtrl itself in a stream-like manner: wxTextCtrl *control = new wxTextCtrl(...); *control << 123.456 << " some text\n"; always works." This is highly misleading. In fact wxTextCtrl has onl...
by jamescobban
Tue Jun 23, 2009 3:26 am
Forum: C++ Development
Topic: wxString::mb_str() strange behavior
Replies: 4
Views: 1601

Hi The problem comes from the fact that mb_str() return a temporary wxCharBuffer, so it is destroyed after your call. Try this : const wxCharBuffer buffer = wFileName.mb_str(wxConvISO8859_1); inFileName = buffer.data(); In that way, you copy the buffer in an other instance, which will be destroy at...
by jamescobban
Mon Jun 22, 2009 6:16 pm
Forum: C++ Development
Topic: wxString::mb_str() strange behavior
Replies: 4
Views: 1601

wxString::mb_str() strange behavior

I am getting a very strange result from an attempt to convert a wxString into a const char * in order to pass it to a conventional file method in a Unicode build under Ubuntu 9.04 with Gtk 2.4 and gcc. The code fragment is as follows: void f(const wchar_t * inFileNameWide){ wxString wFileName(inFile...
by jamescobban
Sun Jun 21, 2009 1:18 am
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

Take a look at 'man patch', or google for how to apply a patch ;) e.g. http://www.linuxhq.com/patch-howto.html Thanks. After reading the description of the actual problem I realized I was making life unnecessarily difficult because I had misinterpreted the documentation of wxFileDialog. I have an e...
by jamescobban
Sat Jun 20, 2009 10:08 pm
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

OK, see http://trac.wxwidgets.org/ticket/10917 James, as you can see, the wxGTK wxFileDialog getters/setters are buggy; so it wasn't an output problem, just that the getters were returning "". wxMSW and wxMac use the generic dialog, which doesn't have this problem. Thanks for investigating this. I ...
by jamescobban
Fri Jun 19, 2009 3:34 pm
Forum: C++ Development
Topic: Controlling Size of wxProgressDialog
Replies: 3
Views: 938

chris_bern wrote:You can derive from wxDialog and use wxGauge to create customized progress dialog yourself.
Thank you. Although there was a simpler solution, I am certain I will be able to take advantage of your suggestion in the future.
by jamescobban
Fri Jun 19, 2009 3:15 am
Forum: C++ Development
Topic: Controlling Size of wxProgressDialog
Replies: 3
Views: 938

Controlling Size of wxProgressDialog

I am displaying a wxProgressDialog on GTK2. The default size is extremely small. In fact in my case it is too small to display the title I have given the window. The problem is that unlike most other dialogs the constructor for wxProgressDialog displays the window, as opposed to requiring the progra...
by jamescobban
Thu Jun 18, 2009 9:20 pm
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

Hi, If I pass a valid filepath (and ignore the assert), std::wcerr << "return: GetDirectory()=" gives the correct output, though the GetFilename() doesn't, of course. However for you, neither works. Are you getting a gtk assert? (Are you using a wx debug build?) I have rebuilt wxWindows with debug ...
by jamescobban
Thu Jun 18, 2009 7:42 pm
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

DavidHart wrote:It's a *buntu speciality. See http://forums.wxwidgets.org/viewtopic.php?t=11734 (and, if you want a thorough explanation, http://www.dwheeler.com/program-library ... O/x36.html).
Silly me, I forgot to run ldconfig after make install.
by jamescobban
Thu Jun 18, 2009 5:45 pm
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

Hi, Auria's code failed for me, using wxGTK-2.8.10. That's because of what seems to be a bug in (the wxGTK) wxFileDialog::SetFilename, which asserts if you pass it a filepath; but gtk requires one, and if you pass a filename gtk asserts and doesn't properly create the dialog. I'll look into this. I...
by jamescobban
Thu Jun 18, 2009 2:23 am
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

GetFilename() and SetFilename() are simple getters and setters, i just can't think of anything going wrong there. I noticed that the "correct" output is given when you print a string directly, but not when you use the return value from a method. I suspect it's just a display problem with std:: Coul...
by jamescobban
Thu Jun 18, 2009 2:08 am
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

Hmm not sure what's up with your quotes ("), they're all messed up I apologize. I should have attached the two files rather than trying to imbed them in the posting. The functionality of the tag seems to unescape escaped quotes when it displays the code. [quote="Auria"] And got the following output...
by jamescobban
Wed Jun 17, 2009 7:10 pm
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

I would say, try to reproduce this in a minimal compilable sample. OK I have trimmed this down to a single source file and single header file with no external inputs. This generates the following output which indicates that the values of the wxString parameters are ignored while the const wchar * p...
by jamescobban
Wed Jun 17, 2009 5:23 pm
Forum: C++ Development
Topic: wxFileDialog SetDirectory and SetFilename Seem to be ignored
Replies: 30
Views: 4313

I rebuilt wxWidgets with Unicode and made the required changes in my code to compile. The problem persists, except that it is now harder to debug because the unicode version of wxString does not behave well with std::cerr, displaying an address (presumably of its buffer) instead of the contents of ...