Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Addobj
Message
From
26/04/1999 13:10:31
 
 
To
26/04/1999 12:07:22
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Re: Addobj
Miscellaneous
Thread ID:
00212181
Message ID:
00212205
Views:
23
>I want to conditionally add objects to a page on a pageframe and the following does not work:
>
>*in activate
>oField=addobject('field1','kbafield')
>oField.top=100 && error ofield does not exist!
>
>Can anybody tell me what I am doing wrong and how this should know in what library kbafield is located??
>

You're getting Object.AddObject and CREATEOBJECT mixed up. The AddObject method does not return an object reference like CREATEOBJECT does, and it it not a function, it is a method of an existing object. So after using AddObject, you just refer to the object through it's container hierarchy:

THISFORM.PageFrame1.Page1.Addobject('field1','kbafield')
THISFORM.PageFrame1.Page1.Field1.top=100

AddObject uses your SET CLASSLIB setting to search vcxs it knows about.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform