>>>>>*** start.prg
>>>>>oApp=createobject('app')
>>>>>
>>>>>Define class app as custom
>>>>> .msgtitle="System Error"
>>>>>enddefine
>>>>>
>>>>>*** some snippet
>>>>>=messagebox("Cannot Proceed",1+16,oApp.msgtitle)
>>>>Thanks Ed..
>>>>
>>>>OK - Does that mean I define a class as "application class"? and
>>>>in that class, have a property called "msgtitle"?
>>>>
>>>>rob
>>>
>>>You define a class as Custom (app is just an appropriate title), and this class may have msgtitle property and any other else you may define, e.g. path to data folder.
>>
>>OK... I get it...
>>
>>Your answers are great and I am learning...
>>
>>Custom, user-defined classes are classes with properties, events, and methods, but with no visual representation.
>>
>>This will be like your starting class or a class where you can put your
>>global stuff??
>>
>>Why will I have a custom class when I can write a prg with functions?
>>
>>
>>Rob
>
>Surely we can use system procedure prg file, and I still use both App class (to use properties) and sysproc (to use functions). Besides obvious not OO approach, prg file can get you in trouble if you have to reference a form inside a function (it's not clearly defined in VFP). So, I even sometimes have one more custom class ('commonmethods') which I insert into appropriate forms.
OK..great...
I understand now why in vfp50 you should use Custom(App) and when to use
sysproc (functions).
This means, I fire (invoke) my App with "App.do()" in my MAIN.prg. Does the app class fire off the rest of the application in the init events in app?
Rob