Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Addobject and build as a DLL
Message
 
 
To
08/11/2000 18:01:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00439424
Message ID:
00439587
Views:
25
AddObjects that appear in the definition of the class (header) are part of the class themsleves. As such when VFP creates the internal interface table or typelib, they are included. For an example, use the class browser to export a composite class to code. You will see all the contained objects as AddObject lines.

As for using your own classes, that is easy. As long as the class library is set to use your class, the AddObject will find it. As an aside, I don't know if it works in class definitions (it probably does) but you could use the NewObject syntax and specify a class library if the class library is not already set.

>Yes you right, but what if the new added object is a not a base class of vfp instead some other class.
>
>mytest1.vcx
> carpart
>
>
>eg: define class mytestclass as form olepublic
>
> add object mycustom as carpart ;
> name = "oNistItem" ,;
> classlibrary = "f:\cjis\gatewaykdr\libs\bseutils.vcx", ;
> parentclass = "cusabstract",;
> baseclass = "custom",;
> class = "collection"
>
>
> procedure init
> this.addobject("mycustom2","custom")
> endproc
>
> procedure getmycustom2name()
> return this.mycustom2.name
> endproc
>enddef
>
>
>My guess is I may not have the correct syntax whn I use the ADD OBJECT on the define and that leads me to use the this.addobejct.
>
>
>SO, can I use the ADD OBJECT for sub classes????? IF so what would be the syntax and what am I missing???
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform