On Aug 12, 2009, at 1:36 PM, Nate Lowrie wrote:

>> This sounds interesting... What's the constructor, and how does one  
>> pass
>> bizobj objects through it?
>
> It's a class constructor.  Your __init__ method.  You would structure
> your method in this way:
>
> def __init__(self, parent, myBizobj, *args, **kwargs):
>   self.myBizobj = myBizobj
>   super(myClassName, self).__init__(parent, args, kwargs)
>
> Make sure you call the super method so that the proper wx
> initialization can take place.  On a side note, this is one of the
> only instances I've found it useful to touch the __init__ method of a
> Dabo framework object.


        Why is this better than simply doing:

obj = MyClass(parent)
obj.myBizobj = self.PrimaryBizobj

        The only reason might be if you are doing stuff in the afterInit() of  
the MyClass object; in that case, I would simply put it in a different  
method and call that directly after you set the reference.


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to