Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mailrus!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!mimsy!brillig.umd.edu!spector From: spector@brillig.umd.edu (Lee Spector) Newsgroups: comp.sys.mac.hypercard Subject: Re: EvalExpr() callback in XCMDs Message-ID: <25393@mimsy.umd.edu> Date: 9 Jul 90 22:09:11 GMT References: <1388taylorj@yvax.byu.edu> Sender: news@mimsy.umd.edu Reply-To: spector@brillig.umd.edu (Lee Spector) Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 27 In article <1388taylorj@yvax.byu.edu> taylorj@yvax.byu.edu writes: > >... X-commands have error results returned to them, as >opposed to an error dialog popping up. This is so that the X-command can >handle the error appropriately without bothering the user. Hmm... This should allow the creation of a WithoutError XCMD which would evaluate an arbitrary line of hypertalk (WITHIN HC) without the possibility of an error reaching the user. Any returned error message could be stuffed into a global variable or something. This would allow something like: ... WithoutError "myCommand (myfunction1 (foo))" if the result contains "Error" then -- or however you test the result put "something went wrong but I don't care" end if ... I imagine that this could be useful in a number of situations. For example it would be handy when consing together code for "do" on the fly; it would be nice to be able to allow gibberish through once in a while and to just have it do nothing... Anyway, has anyone done this? If so, can I have a copy? Thanks! -Lee (spector@cs.umd.edu)