Cytowanie Alex Tweedly <al...@tw...>:
<long snip>
> BUT there is a problem - I get errors because some variables within the
> csvPage don't exist.
> Adding some debug "print"s, I found that the on_openfile seems to be called
>
> before the on_initialize.
> It looks as though the on_initialize is being called later (maybe from
> wxMainLoop)
>
<snip>
It seems to be general behaviour. I have the same problem when I try to open a
child window with resource editor and open a file in it from parent window.
In my understanding if you try to do something like:
child = model.childWindow(....)
child.doSomethingNow(...)
You may run into initialization problems.
It's just my experience and I dont' know how to solve it in general (even
though
I'd like to :), my quick &dirty solution so far is to create modified version
of ResourceEditor, that takes another argument (say file_to_open) and opening
it
after it knows that the initialization is done.
Bartek Wilczynski
|