Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OApp - it's all gone horribly wrong
Message
 
To
23/03/1998 10:34:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00086235
Message ID:
00087573
Views:
32
Hi Nancy

Onstart just updates tables and prepares them for the session.
oApp.NextTask is "do form ..." so my command can just be oApp.Nexttask (d'oh). My crash happens before my debug code in the load event of a form. The record number in the scx (not class) is the form (based on a class). I know this because I opened the form as a table.

I've since talked to someone about the structure of my program and have found a few things I'm doing wrong, don't feel alot closer to sussing this one though.

Sarah

>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
Sarah King
pcpropertymanager.com
Previous
Reply
Map
View

Click here to load this message in the networking platform