>>I have seen code whereby a reference was created to the class library, and all objects within that library were "hung off" that reference, thereby allowing you to access all objects within that library from a single reference point. To be fair, I didn't say it was a native VFP command, but then I don't generally make assumptions and would have enquired further before racing off on a wholly unrelated tangent.
>
>I bet you haven't seen a code like that. I'm quite sure, that you missunderstood something.
>It is impossible to instantiate a whole classlib with a single command, it wouldn't even make sense.
>
>I think I understand what your mistake is.
>You simply mixed up "instiating a whole classlib", with
>"instantiating a class, that provides references to other (maybe all) objects, whose classdefinitions are stored in the same classlib".
>
>So if your initial class or object provides references to other objects as members, all these other objects must have been instantiated somewhere at a certain time. I would bet somewhere during the creation process of the initial class.
>
>Calling this "instantiating a classlib" (which is nonsense) has probably guided some readers of your question into the wrong direction.
Holger
thank you for "Some Readers". LOL
The problem is that he is talking about something he has seen somewhere and put it in some UT Category.
that I do assumptions on his labyrinthian texts / Category isn't my fault.
But I'm broadminded, so I've coded a little bit around (Tea break)
loret = InstanceAllClasses(SomeVCX)
loRet.SomeClassOfTheVCXAbove.PEM
FUNCTION InstanceAllClasses
LPARAMETERS;
tcVCX
LOCAL;
loReturn AS EMPTY,;
lnClasses AS INTEGER,;
lnClass AS INTEGER
LOCAL ARRAY;
laClass(1,11)
loReturn = CREATEOBJECT('EMPTY')
lnClasses = AVCXCLASSES(laClass,tcVCX)
FOR lnClass = 1 TO lnClasses
IF !INLIST(laClass(lnClass,2),"oleboundcontrol","olecontrol") THEN
ADDPROPERTY(loReturn,laClass(lnClass,1),NEWOBJECT(laClass(lnClass,1),tcVCX,0))
ENDIF
ENDFOR
RETURN loReturn
ENDFUNC
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]