|
From: Derek Lee-Wo on 4 May 2008 14:26 I have an app that displays a modal dialog in the constructor of the main frame. This works fine in wxMSW and wxGTK, but in wxMAC it acts very strange. The model dialog gets displayed, but then another window pops up. It looks like a wxMessageBox in that is the size looks about the same, but it is blank. Also, the cursor changes to a spinning wheel, but just for my app...that is, it's only spinning when I hover over the modal dialog or the window that popped up? My modal dialog is not responsive nor is the message box that pops up. If I bypass this modal and launch it via a menu option, it all works fine so I have to assume that launching it from the constructor is the problem. Is it that this is not allowed on wxMAC, or is there some magic call I need to make for it to work? Thanks Derek
From: Stefan Csomor csomor on 4 May 2008 16:20 Hi this is most probably an assert/error message trying to make itself heard, you could try to see in the debugger what the error might be ... Best, Stefan On 04.05.08 20:26, "Derek Lee-Wo" <dleewo(a)gmail.com> wrote: > I have an app that displays a modal dialog in the constructor of the > main frame. This works fine in wxMSW and wxGTK, but in wxMAC it acts > very strange. > > The model dialog gets displayed, but then another window pops up. It > looks like a wxMessageBox in that is the size looks about the same, > but it is blank. Also, the cursor changes to a spinning wheel, but > just for my app...that is, it's only spinning when I hover over the > modal dialog or the window that popped up? > > My modal dialog is not responsive nor is the message box that pops up. > > If I bypass this modal and launch it via a menu option, it all works > fine so I have to assume that launching it from the constructor is the > problem. Is it that this is not allowed on wxMAC, or is there some > magic call I need to make for it to work? > > Thanks > Derek > _______________________________________________ > wx-users mailing list > wx-users(a)lists.wxwidgets.org > http://lists.wxwidgets.org/mailman/listinfo/wx-users
From: Stefan Csomor csomor on 5 May 2008 02:00 Hi I think it should work, although for a splash screen wxApp::OnInit would probably be more suitable. The problem is not the code until the dialog shows up, but only later when the message box pops up, then the message loop gets things wrong. I've seen this in code when code was ported from msw or gtk and was looking for some images, which it couldn't find in the mac build. So one typical source for problems would be to debug OnPaint methods, or to put breakpoints in wxMessageDialog::ShowModal HTH Stefan Csomor On 04.05.08 23:34, "Derek Lee-Wo" <dleewo(a)gmail.com> wrote: >> this is most probably an assert/error message trying to make itself heard, >> you could try to see in the debugger what the error might be ... > > I was running a release build and from what I can tell from the docs, > the asserts shouldn't be happening. Anyway, I also tried a debug > build and unfortunately the debugger doesn't show anything. > > I also stepped through the code all the way leading up to the call to > ShowModal() and it all looks good until then, but once I step over the > ShowModal(), the dialog displays and then I get the blank message > window. > > Can I assume then that displaying a modal dialog in the main frame > constructor is *supposed* to work in wxMac? -- Advanced Concepts AG Software-Engineering Heldweg 10 CH-8475 Ossingen Switzerland phone:+41 52 245 0 245 fax:+41 52 245 0 246 http://www.advanced.ch mailto:csomor(a)advanced.ch
From: Derek Lee-Wo on 5 May 2008 08:02 Hi, > I think it should work, although for a splash screen wxApp::OnInit would > probably be more suitable. It's not actually a splash screen I'm trying to create. It's for when the app is run the first time, I pop up a dialog to gather a few settings. BTW, I also tried launching the dialog in wxApp::OnInit(), but I saw the same problem. > the message box pops up, then the message loop gets things wrong. I've > seen > this in code when code was ported from msw or gtk and was looking for > some > images, which it couldn't find in the mac build. So one typical source > for Well, I did actually see this issue with some wxIcons I was creating and the Mac version couldn't find my PNG files. I did see that error just fine and once I copied over the files, that error went away. > problems would be to debug OnPaint methods, or to put breakpoints in > wxMessageDialog::ShowModal Thanks for this suggestion.....I'll try these two approaches. Thanks Derek
|
Pages: 1 Prev: menubar less app from windows to mac Next: rectangle with transparency |