[wxPython-users] Referencing frame widgets in another class

Peter Damoc pdamoc at gmail.com
Thu Aug 3 08:17:18 PDT 2006


On 8/3/06, John Salerno <johnjsal at gmail.com> wrote:
>
> Hi everyone. I tried posting this question to the gmane newsgroup, but
> it's been a while and I don't see it, so it might not be working for
> me. I apologize if it appears twice.
>
> My question was about referencing the widgets of my frame from within
> a separate class, specifically a validator class. I've tried passing
> the frame as an argument to the validator's __init__ method, but I get
> an error saying there are too many arguments.


well, just clue the frame to the validator after you create the validator
like this

validator.frame =3D yourCustomFrame

I know this is a very newbie OO question, but I just can't figure it
> out! I'm trying to make some kind of reference like this in my
> validator class:
>
> frame.widget.method() =3D some_value


this look wrong,  I think you wanted to say

some_variable =3D validator.frame.widget.method()

but so far I can't figure out how to get a reference to the frame.
>
> Thanks.




-- =

There is NO FATE, we are the creators.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200608=
03/59937f54/attachment.htm


More information about the wxpython-users mailing list