[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: catch-cancel



In article <gclements-3105951036250001@mac21_58.keps.com>,
gclements@keps.com (Geoffrey Clements) wrote:

> 
> I belive the problem is that the scope that (throw *tag* "Cancelled") is
> different from the scope that (catch *tag ...) is set up in. The throw is
> called from low level event handling code which is different from where
> the loop is running. I also think that the throw-cancel/catch-cancel
> mechanism is reserved for modal-dialogs. (i'm relatively new to MCL so I
> could be wrong about this.) 

(my email reply to you previously was incorrect, Geoff.  sorry about that)

I originally suspected this too.  But if this were the case then (throw
:foo) would cause an error.  My best guess (from Chris Wisdo actually) is
that the event processing code is setting up a (catch :cancel) inside the
dynamic scope of my catch.  Anybody at Apple/Digitool care to comment on
this?

This is why block/return works well in this case.  Keep away from that
nasty dynamic scoping.

Michael Korcuska
Institute for the Learning Sciences
Northwestern University
korcuska@ils.nwu.edu