Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Addobj
Message
De
26/04/1999 13:10:31
 
 
À
26/04/1999 12:07:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Re: Addobj
Divers
Thread ID:
00212181
Message ID:
00212205
Vues:
24
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform