Ed,
In that case is there a problem with the objects when they are simply placed
onto a form. 

i.e if you create a panel in a form using
panel=self.addObject(dabo.ui.dPanel)it isn't bound to the form itself by the
name "panel" in any way unless you create it using self.panel. Hence once
the item goes out of scope you lose any reference to it by actual name apart
from using self.Child[n].

Are you saying that panel=self.addObject(dabo.ui.dPanel) when created in a
method should create the object so it can be referenced outside the method
as self.panel (which is what I was assuming when testing)? If so, it
doesn't.

Dave Crozier


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ed Leafe
Sent: 04 January 2007 16:02
To: Dabo Users list
Subject: Re: [Possible Spam] [dabo-users] How to reference contained objects

On Jan 4, 2007, at 10:26 AM, <[EMAIL PROTECTED]>  
<[EMAIL PROTECTED]> wrote:

>> Q1. After I have created these objects I can see them as
>> cmdButton1 and so
>> on- no problem. Shouldn't I also be able to see them as
>> self.cmdButton or am I thinking too much in a VFP way as in
>> "Thisform.<object name>"?
>
> Not uless you explicitly create the object as self.myObject.   
> Otherwise
> the button is bound to the name in the local (function) scope, and the
> binding is 'lost' when the function exits.  The button will still  
> exist,
> but will not be a property of the class.

        Normally in Python that's true. But we've added some goodies in  
Dabo, such as automatically binding the Name property of an object  
when it is created to its containing Parent object.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.4/615 - Release Date: 03/01/2007
13:34




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to