Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!boulder!hao!oddjob!mimsy!umd5!zben From: zben@umd5.UUCP Newsgroups: comp.sys.mac.hypercard Subject: Re: hypercard thoughts Message-ID: <2017@umd5.umd.edu> Date: Fri, 30-Oct-87 22:20:40 EST Article-I.D.: umd5.2017 Posted: Fri Oct 30 22:20:40 1987 Date-Received: Sun, 1-Nov-87 09:13:42 EST References: <2014@umd5.umd.edu> <4911@oberon.USC.EDU> Reply-To: zben@umd5 (Ben Cranston) Organization: University of Maryland, College Park Lines: 62 Summary: More on that find bug (or perhaps another :-) In article <4911@oberon.USC.EDU> kurtzman@pollux.usc.edu (Stephen Kurtzman): >In article <2014@umd5.umd.edu> zben@umd5.umd.edu (Ben Cranston) writes: >> ... it seems that a FIND directed at a field on one background can in some >>cases be satisfied with the same data occuring in another field on another >>background, as long as the field numbers matched. ... >The definition of the find command uses a field number. It is my guess that >if you specify a field name, it just substitutes in the field number >corresponding to the name. I have had the same problem and I solved it the >same inelegant way. My suggestion to the hypertext developers is to add >a background specifier to the find command. Example: > find target in field n on background m Well, at first I thought this was indeed the case, but consider this: The stack in question has a single index card (with its own background), hundreds of "place" cards (contiguous, with a place background), similarly hundreds of "song" cards (continguous, with a sound background), and the rest of the thousand-odd cards are "show" cards (contiguous, show background). The only field on the index card is a "CurrentTime" which I plan to have an idle handler in the stack script move the short time into. When, on the Index card, I press a button that does the find command: find "blappo" in field "PlaceName" it finds a blappo in ANY field, "PlaceState", "PlaceCity", etc. When I go in and define 14 empty invisible fields on the index card's background, the button works correctly, and ONLY finds "blappo" in the PlaceName field. My tenative conclusion is that if one issues a "find ... in field fff" and there is no "fff" field on the current card or background then the find command is silently mutated into a "find ..." command and then searches all fields of all cards. At least that seems consistant with what I see... Also, now that I have a fully populated version to play with, I'm struck with the poor performance. A simple find "850911" in field "ShowDate" takes between 45 seconds and a minute to find the appropriate card. Naming the cards with their date and doing it like: go card "850911" STILL takes 45 seconds to a minute. I grabbed my trusty Knuth volume 3 and programmed a binary search in HyperTalk. It took 45 seconds to a minute FOR EACH CYCLE OF THE SEARCH! Looks like ANY attempt to access a card except "go card ID 123456" does a linear search from where you are in the stack. (I suspect the card ID is a physical address.) Since the go by ID is very fast, I put an invisible field on the first card that has the card ID of the first card of each year. Making the button go to the ID of the first card and search from there seems faster, but I might end up with a full index-sequential structure, with the index card pointing to all the "year header" cards, each of those pointing off to 12 "month header" cards. Lots of work for the setup, which already takes several hours... -- Copyright 1987 Ben Cranston (you may redistribute ONLY if your recipients can). umd5.UUCP <= {seismo!mimsy,ihnp4!rlgvax}!cvl!umd5!zben zben @ umd2.UMD.EDU Kingdom of Merryland UniSys 1100/92 umd2.BITNET "via HASP with RSCS"