User forums > Help
problem with wxSmith and Mac-OSX
Auria:
okay - I haven't gotten your SVN updates yet, I will do that next. (My build problems turned out to be a stupid path problem. oops! I needed a night of sleep to see that ^^)
I have tried with the patched code (rev 4028)
When opening wxSmith, I saw a blue rectangle briefly appear then it turned back grey again. If i hide the app, then bring it to front, i see a red one appear briefly but then disappear too.
If I click on the button icon, first time I saw a blue rect, then a red one, then it all went grey again. When trying to add various components, I see sometimes the blue one, sometimes the red one, sometimes it stays there but now always.
The red one sometimes appears (when the moving the mouse?)
I am now doing the svn update - coming back when it's done
Auria:
I now have the new code (rev 4051)
Widgets appear when added but disappear shortly afterwards (everything turns grey)
EDIT:I have been doing some tests with std::cout ;)
when trying to add a button
fast repaint
before content changed
after content changed
start fetching sequence
on fetch sequence
refresh timer
fetch sequence phase 2
fetch screen
hide children
erase
erase
hmm paint is called first, then erase. on screen, I see the button appear as repaint is called and disappear as erase is called. If it normal that erase is called now?
void OnEraseBack(wxEraseEvent& event)
well it's empty - I'm just not sure I get how wxSmith displays widgets. Does it use some sort of screen capture?
byo:
--- Quote from: Auria on June 03, 2007, 08:37:35 pm ---
hmm paint is called first, then erase. on screen, I see the button appear as repaint is called and disappear as erase is called. If it normal that erase is called now?
void OnEraseBack(wxEraseEvent& event)
well it's empty - I'm just not sure I get how wxSmith displays widgets. Does it use some sort of screen capture?
--- End quote ---
Yes, exactly, the screen is captured and the extra content is drawn over it.
And I thing that we have the reason of hiding content - it looks like this empty erase function is responsible for this. Could you comment line 96:
--- Code: ---Connect(DrawingPanelId,wxEVT_ERASE_BACKGROUND,(wxObjectEventFunction)&wxsDrawingWindow::DrawingPanel::OnEraseBack);
--- End code ---
And check what will happen?
Regards
BYO
Auria:
I commented out the line and it still disappears.
I think they disappear on HideChildren() and then the new background is not drawn over it.
byo:
Hmm, another thing that came into my mind:
Could you put on line 292? :
--- Code: ---void wxsDrawingWindow::FetchSequencePhase2()
{
if ( !Panel ) return;
if ( IsDestroyed ) return;
FetchScreen();
HideChildren();
Panel->Show();
DuringFetch = false;
FastRepaint(); // <----
}
--- End code ---
and maybe other solution for this problem:
--- Code: ---void wxsDrawingWindow::FetchSequencePhase2()
{
if ( !Panel ) return;
if ( IsDestroyed ) return;
FetchScreen();
HideChildren();
DuringFetch = false; // <--- This and
Panel->Show(); // <--- this line were swapped
}
--- End code ---
Maybe it's just as you say that children are hidden, panel is shown but it doesn't paint.
It may not paint because DuringFetch is still false. On Win and Linux, Panel->Show causes some extra event to be generated and paint procedure is actually done after jumping out of FetchSequencePhase2(). On Mac it may be done while calling Show function.
Regards
BYO
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version