dcc@ccvr1.ncsu.edu (Daniel Carr) (01/06/90)
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) basically, i'm wondering if i have to write a big text parsing procedure to see if the name, number, id number is passed, so i can use the proper procedure to get a handle to it. and also is there an easy way to see if a card/background field is being passed, outside of doing text parsing (string comparison) thanks for any help daniel carr >>>>>>>>>>>>>>>>>>>>>>>> Daniel C. Carr <<<<<<<<<<<<<<<<<<<<<<<< >>>>>>> North Carolina State University Computing Center <<<<<<< dcc@ccvr1.ncsu.edu daniel@ncsuvm.BITNET d.c.carr, GEnie
beard@ux1.lbl.gov (Patrick C Beard) (01/06/90)
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. ".......<dead air>.......Good day!" - Paul Harvey - -------------------------------------------------------------------------------