dbTalk Databases Forums  

How to pass info between objects in a container (I think....)

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss How to pass info between objects in a container (I think....) in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AK
 
Posts: n/a

Default How to pass info between objects in a container (I think....) - 09-21-2005 , 12:10 PM






Hi all;
I'll probably bombard this group with some newbie questions... And
thanks to all.

I have created an object that contains a cbo and a text box. The cbo
is to get an acct#, and then it should display the company name in the
text box.

I am not sure how I reference the value of the textbox object within
the class.
Right now, I have added a property called cname to the FORM and I am
doing thisform.cname=customer.name, but this is not good oop practice.

I don't think it sould be this.parent.txtName1.value=customer.name

I hope I make sense...

Thanks,

AK



Reply With Quote
  #2  
Old   
Dan Freeman
 
Posts: n/a

Default Re: How to pass info between objects in a container (I think....) - 09-21-2005 , 03:33 PM






this.parent.controlname.property is exactly the right way.

Or, make setting the value a property of the container, and pass it the
value: this.parent.SetName("Company name") and let the container put the
name wherever it sees fit.

Dan

AK wrote:
Quote:
Hi all;
I'll probably bombard this group with some newbie questions... And
thanks to all.

I have created an object that contains a cbo and a text box. The cbo
is to get an acct#, and then it should display the company name in the
text box.

I am not sure how I reference the value of the textbox object within
the class.
Right now, I have added a property called cname to the FORM and I am
doing thisform.cname=customer.name, but this is not good oop practice.

I don't think it sould be this.parent.txtName1.value=customer.name

I hope I make sense...

Thanks,

AK



Reply With Quote
  #3  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: How to pass info between objects in a container (I think....) - 09-21-2005 , 04:41 PM



On Wed, 21 Sep 2005 20:33:16 GMT, "Dan Freeman" <spam (AT) microsoft (DOT) com>
wrote:

Quote:
this.parent.controlname.property is exactly the right way.

Or, make setting the value a property of the container, and pass it the
value: this.parent.SetName("Company name") and let the container put the
name wherever it sees fit.
I would go with
thisform.controlname.property
as it covers both having and not having a container between the input
control and the form.

[snipped previous]

Sincerely,

Gene Wirchenko



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.