johnf wrote:
> On Monday 19 January 2009 10:14:07 pm Paul McNett wrote:
>> johnf wrote:
>>> Should have - Because I could really use a simple way to avoid the
>>> setting RegID's in subclasses and still have access to the objects in
>>> code.
>> Whatever is instantiating the class is usually the one that wants access to
>> the instantiated object, so just set an attribute:
>>
>> self.txtLastName = TextBoxSubclass(self, ...)
>>
>> Paul
> 
> Thanks I got.  You do either 
> set the RegID after instantiating the class as in
> frm=NewClass()
> frm.textBox.RegID= 'TextBox_1'

Or, of course:

frm = NewClass(self, RegID="TextBox_1")

> or you create the object in the subclass as follows
> 
> self.txtLastName = TextBoxSubclass(self, ...)
> 
> which then allows you to access the object like
> frm.NewClass()
> frm.txtLastName="McNett"

Or I do both, for some reason I'm questioning at this moment. I think I set 
RegID out 
of habit, but don't really end up using it as most of my programming is 
encapsulated 
at the container level, not the form level.

Paul

_______________________________________________
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