communication between objects - help

Murali kumar murali.au at gmail.com
Sat Apr 11 10:01:48 CEST 2009


thanks a lot..

I think passing the main object only by reference.. so, this does not causes
any overhead..

am i correct..?


On Fri, Apr 10, 2009 at 4:02 PM, Dave Angel <davea at ieee.org> wrote:

>
>
> Murali kumar wrote:
>
>> hi all..
>> I'm posted in a word doc becoz to add a image to explain my problem..
>> also I think gmail automatically scans for attachments..
>>
>> anyway.. here's my problem...( see the image)
>>
>> http://www.2shared.com/file/5299759/45e4c614/load.html
>>
>> Using : Python 2.6 , wxPython 2.8.9
>> <....snip...>
>>
>>  * I don’t know how to return config file or data to mainApp object when
>> pressing load button. *
>>
>>
>>  * Is it easy to return filename only and load the file’s data into
>> mainApp
>> object in menu handler itself? *
>>
>>
>>  Please suggest me right direction.. and tell me how to do it?
>>
>> Usually where I can get these informations.. (suggest links and books..)
>>
>>
>> Thanks for any advice....
>>
>>
>>
>
> Most of the widget classes in your code should be derived classes, so they
> can hold extra instance data & event handlers and such.  So that means you
> can have extra parameters on the constructor, besides the ones the base
> class requires.  Use one or more of those extra parameters to store your own
> information about the hierarchy.
>
> Simplest example is to add the app instance to each constructor.  Then each
> widget object would know how to call back into the app to do some work, or
> to load data into a common place.
>
> DaveA
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090411/c79228bc/attachment.html>


More information about the Python-list mailing list