comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDLVM and retall
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDLVM and retall [message #50001 is a reply to message #50000] Fri, 08 September 2006 07:57 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
David Fanning wrote:
> JD Smith writes:
>
>> Here's a better example:
>>
>> pro MyClass:f1, ev
>> if something_is_wrong self->Error
>> do_calc
>> end
>>
>> pro MyClass:f2,ev
>> self->f1,ev
>> do_another_calc
>> end
>>
>>> Can this be a difference between Windows and UNIX?
>> If you simply return (or return twice, if you were able to do that
>> from within self->Error), you'd be right back inside MyClass:f2 and
>> do_another_calc would run, which is not what you want. With RETALL,
>> the entire calling stack is returned from, not just one step in the
>> stack.
>
> OK, I see what you mean. Yes, when you are trying to
> merge widgets and objects things do tend to get a little
> messy. I don't find myself buried this deep in my widget
> programs, which is why RETURN has always worked for
> me. But I do remember some messy, messy code in my
> Catalyst Library to keep error messages from propagating
> up the whole damn call stack! Essentially, we had to
> keep track of whether the error had already been
> "handled" or not, and keep issuing RETURNs if it had.
> Your solution is probably better looking than this. :-)

Hi,

At risk of exposing my arrested development, I harken back to exchange I
witnessed between David and Martin Schultz eons ago. I can't remember
if it was on the newsgroup or "off-line". But I do remember clearly
that Martin and David leaned toward a FUNCTION event handling method
rather than a PROcedure - the function event handling method returned
0/1 for fail/success. If I remember rightly, the decision was driven by
the messaging aspect of events (or pseudo-events) and that functions, if
nothing else, pass messages by default.

Would that suffice to resolve the issue?

function MyClass::f1, ev
if something_is_wrong then begin
self->Error
return,0
endif
return,do_calc()
end
function MyClass::f2,ev
OK = self->f1(ev)
if OK then OK = do_another_calc()
return, OK
end

Of course, it was a long time back and I had hair and a shorter
attention span. I still have the same attention span - but the hair has
gone AWOL.

Cheers,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: ascii_template advanced
Next Topic: IDLVM and retall

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:26:36 PDT 2025

Total time taken to generate the page: 0.61258 seconds