Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!ucsd!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer Subject: Re: help with a hypercard xfcn Keywords: hypercard,xfcn Message-ID: <4574@helios.ee.lbl.gov> Date: 6 Jan 90 02:21:17 GMT References: <1990Jan5.181928.15462@ncsuvx.ncsu.edu> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Distribution: na Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 29 X-Local-Date: 5 Jan 90 18:21:17 PST In article <1990Jan5.181928.15462@ncsuvx.ncsu.edu> dcc@ccvr1.ncsu.edu (Daniel Carr) writes: > > > >i'm writing an xfcn for hypercard in which i pass it the name of a >field. i then perform changes on that field and return the changed >field back to hypercard. i can get it work ok, but i'd like to make it >more versatile. right now i pass it the name of the field, but i'd like >to be able to pass the name, the number, the id number. is there an >easy way to do this, outside of parsing up the string to see exactly >what the user is passing as the name of the field? (i'm using the >"glue" files with think pascal 2.0x) Instead of passing the name/id/number of the field, why don't you just pass the contents of the field to the XFCN? I.e.: on mouseUp put card field "some name or id reference goes here" into parameter myXFCN parameter put the result into card field "some name or id reference goes here" end mouseUp This will keep your XFCN simple. I don't see why you'd want to make it more complicated than this, what flexibility are you gaining? ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------