>>>
>>> I want to call a CLASS with PARAMETERS.
>>> help
>>put the PARAMETERS statement in the init
>>oMyObject = CREATEOBJECT("MyClass", parm1, parm1)
>>
>>BTW, Robert, did your copy of VFP come with a .hlp file? ;-)
>>--
>>Matt McDonnell
>>
>>Conventional Wisdom - "If it ain't broke, don't fix it."
>>Gates Wisdom - "If it doesn't work, sell it, and fix it later."
>
>Could you give me an example of when I would use this?
>>oMyObject = CREATEOBJECT("MyClass", parm1, parm1)
Didn't you start this thread? ;)
CREATEOBJECT allows more efficient use of RAM. You control what objects are loaded when you need them. I use CREATEOBJECT for login forms and forms that may have different looks depending on user input (actually, in that case I use Myform.AddObject [virtually same effect]).
There are probably other good uses, but I can't think of anything off the top of my head. The primary advantage of CREATEOBJECT is being able to create a local variable reference to your object in a method or procedure and it releases itself when the method/procedure is done.
HTH
Matt McDonnell
...building a better mousetrap with moldy cheese...