Thanks a lot for help..<br><br><div class="gmail_quote">On Sat, Apr 11, 2009 at 6:27 PM, Dave Angel <span dir="ltr"><<a href="mailto:davea@dejaviewphoto.com">davea@dejaviewphoto.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Murali kumar wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
thanks a lot..<br>
<br>
I think passing the main object only by reference.. so, this does not causes<br>
any overhead..<br>
<br>
am i correct..?<br>
<br>
<br>
On Fri, Apr 10, 2009 at 4:02 PM, Dave Angel <<a href="mailto:davea@ieee.org" target="_blank">davea@ieee.org</a>> wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Murali kumar wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi all..<br>
I'm posted in a word doc becoz to add a image to explain my problem..<br>
also I think gmail automatically scans for attachments..<br>
<br>
anyway.. here's my problem...( see the image)<br>
<br>
<a href="http://www.2shared.com/file/5299759/45e4c614/load.html" target="_blank">http://www.2shared.com/file/5299759/45e4c614/load.html</a><br>
<br>
Using : Python 2.6 , wxPython 2.8.9<br>
<....snip...><br>
<br>
* I don’t know how to return config file or data to mainApp object when<br>
pressing load button. *<br>
<br>
<br>
* Is it easy to return filename only and load the file’s data into<br>
mainApp<br>
object in menu handler itself? *<br>
<br>
<br>
Please suggest me right direction.. and tell me how to do it?<br>
<br>
Usually where I can get these informations.. (suggest links and books..)<br>
<br>
<br>
Thanks for any advice....<br>
<br>
<br>
<br>
<br>
</blockquote>
Most of the widget classes in your code should be derived classes, so they<br>
can hold extra instance data & event handlers and such. So that means you<br>
can have extra parameters on the constructor, besides the ones the base<br>
class requires. Use one or more of those extra parameters to store your own<br>
information about the hierarchy.<br>
<br>
Simplest example is to add the app instance to each constructor. Then each<br>
widget object would know how to call back into the app to do some work, or<br>
to load data into a common place.<br>
<br>
DaveA<br>
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
<br>
<br>
</blockquote></div></div>
All objects are passed by reference in python. And storing it in each widget costs very little. Note that you can choose what object or objects should be used; I just mention the app as a choice that everyone will subclass, and that will generally have direct or indirect access to all widgets.<br>
<br>
</blockquote><div><div></div><div class="h5">
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>