General information
Category:
Forms & Form designer
I haven't really played with an oApp, because I don't have much global stuff, but I think that most examples (such as TASTRADE) involving the oApp in controlling forms assume modeless forms, which I think is a more customary design. In general, if you use all modal forms, your oApp and its methods will look very different. I have been advised here to switch to modeless forms. I think I originally did so in order to get menus to work. I seem to remember that my forms became easier to control when I did so.
>Hi, Sarah. I had a rocky time getting my app object working, too, but it finally is and was worth the pain :-). I have some questions though about your posting.
>
>Does OnStart.prg do a form?
>
>When the form releases, it sets the oApp.NextTask to a form name? If so, in which method?
>
>Are your forms SCXs or classes? If classes, where do you createObject?
>
>Is DO (oApp.NextTask) a prg? or a form? I assume prg...Your syntax works for me for forms...i.e. DO FORM (CFORM)
>
>At what line/method do you get the error about instantiating the class? From your example, the only class I see is clApp...
>
>
>>My app is a series of modal forms which are released when another form is called. My main program pretty much looks like this:
>>
>>set classlib to 'bkclass'
>>oApp = createobject('clApp')
>>DO onstart &&other procedures for startup, separate program file
>>DO WHILE oApp.NextTask != 'QUIT'
>> m.lctask = oApp.NextTask
>> *do (oApp.NextTask) && how to use macro substitution here?
>> suspend
>> &lctask
>>ENDDO
>>
>>I just discovered oApp and that's the only change I've made to my program. I tested each bit I added to my custom class by going into my initial form and they are all fine - UNTIL I try to move from that form to another form. Then I get an error instantiating object. last time I got this I had a typo lurking but I can't find any. For a while yesterday the problem was intermittent but couldn't find what changed!
>
>...snip
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only