List Info

Thread: .Show() seems not be executing properly




.Show() seems not be executing properly
user name
2006-02-27 20:58:17
I have a popup panel (a wxpanel + a list on it not a popup
window, which I 
invoke when I need to see it with;

    popuppanel.Show(True)

This seems to work most of the time, however I've a
situation where, despite 
the syntax seeming to be correct it does not appear.

To see what was happening, I put this code under a button on
the form to 
manually make it appear, just to ensure it was there.

After the line above executed (and I checked step by step
using wingide 
debugger), when the popup  didn't appear, if I click the
button which 
executes the same code in a def onBtnClick(self,evt)
routine, the panel shows 
up.

Now, interestingly, quite by accident I put  a syntax error
in a routine 
associated with showing the panel, where I had not
capitalised something. The 
error is not enough to make the program not compile and run,
but the terminal 
shows the error message when it gets to that section, but
here is the 
interesting thing:

- just the act of triggering an error generating a terminal 
message, causes 
the previous statement of  popuppanel.Show(True) to work,
whereas when left 
to its own devices it doesn't!

It is almost like for some reason I need to put a statement
after my 
popuppanel.Show(True), which halts all other execution and
forces that line 
to execute.

Any ideas. Seems weird to me.

Thanks

Richard

------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org

.Show() seems not be executing properly
user name
2006-02-27 21:30:36
Richard Terry wrote:
> I have a popup panel (a wxpanel + a list on it not a
popup window, which I 
> invoke when I need to see it with;
> 
>     popuppanel.Show(True)
> 
> This seems to work most of the time, however I've a
situation where, despite 
> the syntax seeming to be correct it does not appear.
> 
> To see what was happening, I put this code under a
button on the form to 
> manually make it appear, just to ensure it was there.
> 
> After the line above executed (and I checked step by
step using wingide 
> debugger), when the popup  didn't appear, if I click
the button which 
> executes the same code in a def onBtnClick(self,evt)
routine, the panel shows 
> up.
> 
> Now, interestingly, quite by accident I put  a syntax
error in a routine 
> associated with showing the panel, where I had not
capitalised something. The 
> error is not enough to make the program not compile and
run, but the terminal 
> shows the error message when it gets to that section,
but here is the 
> interesting thing:
> 
> - just the act of triggering an error generating a
terminal  message, causes 
> the previous statement of  popuppanel.Show(True) to
work, whereas when left 
> to its own devices it doesn't!
> 
> It is almost like for some reason I need to put a
statement after my 
> popuppanel.Show(True), which halts all other execution
and forces that line 
> to execute.
> 
> Any ideas. Seems weird to me.

Some things on wxGTK are not fully triggered until the next
idle event 
or something else flushes the queued commands out to the
X-Server.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java
give you jitters?  Relax with wxPython!


------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )