In discussing Serf (an xCard implementation on the Mac) Curry Kenworthy 
[EMAIL PROTECTED] wrote:

>Dan, one of the problems with HyperCard and other scripting tools is that you
>have to "copy card", "go card whatever", "paste", etc., etc.  It would be
>really cool if Serf had something more convenient like "duplicate card 2 
>of bg 1 after card 5 of bg 2" or "put card 1 to 2 of stack 1 of this window
>before card 3 of stack 2 of window 3".  Something along those lines.
>  It raises a few issues about how to handle certain cases, but I think
>those wouldn't be toohard to work out, and the results would be pretty neat.  

Curry's suggestions don't apply to the work I'm doing right now, but I'd 
bet some people would find them very helpful--if so, speak up.

The "card 1 to 2" part reminded me of something AppleScript has that 
current xCards lack: whose clauses. An example AppleScript for the Finder 
would be something like:

tell application "Finder"
move (every item of the desktop whose label index is 1) to the trash
end tell

This would move every item on the desktop labelled "Essential" to the 
trash, in one command. I can think of many ways this would be helpful in 
MetaCard. The specific example that comes to mind would be similar to the 
matchtext function, making it function the way I understand grep works in 
some implementations: put every lines of field "someField" where 
MatchText(it,".*searchString.*") is true into myVar. (This syntax is from 
AppleScript, including the use of "where" in place of "whose," when it 
makes sense, and the use of it as a reference to the item being tested)

But having a whose clause could be useful on cards, graphics, and other 
items. One more example: 

send "loadYourGraphic" to images of this cd whose customKeys contains 
myInternetReference

This would be used in a stack where many images have to be loaded from a 
web server somewhere, and we want to tell all of them on this cd to load 
their images

Of course, it would probably be a big pain to implement...

ps-on the grep front, what's the word on a non-greedy implementation?

Thanks!

gc

Geoff Canyon [EMAIL PROTECTED]
"C.D. Caterpillar teaches kids how to read, not how to watch cartoons."

Reply via email to