drs@bnlux0.bnl.gov (David R. Stampf) (07/25/89)
I've encountered a strange bug in hypercard 1.2.1 in which the find command 'find "xyz" in field "ABC"' finds the occurance of xyz in fields other than "ABC". If you use 'find "xyz" in field 37', where 37 is the number of the field "ABC", then every is ok. To demo this bug, make a new stack. On the first card place two buttons, the first with a script that reads on mouseUp find "xyz" in field "good" end mouseUp and for the second, on mouseUp find "xyz" in field "bad" end mouseUp on the second card, create a new background, and two backgroud fields named "good" and "bad". In each place the letters xyz. If you return to the first card, then both buttons locate the string in the first field that you created. Referring to the fields by their numbers behaves correctly. Is this a well known bug? Is it due to be corrected soon? Is there a collected list of other bugs? Thanks < dave
spencer@eecs.umich.edu (Spencer W. Thomas) (07/25/89)
In article <1389@bnlux0.bnl.gov> drs@bnlux0.bnl.gov (David R. Stampf) writes: > I've encountered a strange bug in hypercard 1.2.1 in which the find command > 'find "xyz" in field "ABC"' finds the occurance of xyz in fields other than > "ABC". If you use 'find "xyz" in field 37', where 37 is the number of the > field "ABC", then every is ok. I think the problem here has been described before in this forum. What is happening is that the field name is translated to a number before the find is executed. If the current card does not have a field of that name, I am not sure what happens. The moral: if you want to find in a named field, make sure that all fields of that name (on all cards or backgrounds) have the same number, and that a field of that name appears on the card from which you will initiate the find. -- =Spencer (spencer@eecs.umich.edu)