Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help using 'return to program' with methods vs. function
Message
De
15/08/2001 14:17:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00543789
Message ID:
00544223
Vues:
18
Nadya,

Thanks for your feedback. Its good to know that Mike Asherman's error handler is working out well for you. His site is an amazing source of error handling content. I highly recommend it as a source for anyone who wants to learn more about this topic.

I reviewed Hennig's and Mike Asherman's error handlers but I think(?) I'm looking for something a little simpler. My end goal is to be able to emulate a 'try, catch, finally, endtry' type of error handling capability where errors are handled in line and where a 'finally' type of capability insures that the appropriate cleanup happens.

I'm curious if anyone else has tried to do the same in VFP?

Regards,
Malcolm

>Malcolm,
>
>I'm afraid, I can not recommend anything else. I know, that Mike Asherman designed an Error Handler class and since we're using it here I can tell, it's very sophisticated. I also saw messages from him here regarding the same problem, you're experiencing (it was a discussion with Doug Henning, I can find the specific thread, if you're interested). However, nothing came up from this discussion.
>
>I myself didn't dig into this problem, so I can not advise...
>
>>Hi Nadya,
>>
>>Thanks for your recommendation. Since posting my original query, I came across the site you posted. In reviewing this site I noticed that Mike Asherman (site author) came across the exact same problem as I did. The problem being that the 'return to' command will only accept unqualified procedure/method names. What we need is a way to specify a 'return to' destination with an object instance qualifier (to distinguish between multiple stack entries with matching method names but different class hierarchies) or a way to return to a specific program depth as in 'return to ' where is an integer that describes a specific position in the program() call stack.
>>
>>Any other ideas?
>>
>>Thanks!
>>Malcolm G
>>
>>Nadya: Check this site http://www.ideaxchg.com/ix07/er/_sys/toccontu.htm for in-deep discussion about Error Handler and a sample, which you can download.
>>
>>Malcolm: I'm trying to use the 'return to program' statement to return to method code earlier in my program stack. The problem is that program() returns method code names as objectname.method but the 'return to program' syntax does not accept program names with periods.
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform