request for script or stack

Timothy Miller gandalf at doctorTimothyMiller.com
Thu Jul 28 11:08:10 EDT 2005


>>Regarding the "find and replace" window, I have tried several times 
>>to stop a search with a command-period. It just plain won't stop. 
>>(Clicking on the glowing red close button at the upper left won't 
>>stop it either, even though the little X appears when the mouse is 
>>over it.)
>>
>
>I tested it here (Mac OS X 10.4.2 if that matters) with Rev 2.6 and 
>it worked fine. I had to set it searching a vast number of stacks 
>before I could get to the keys fast enough, but I made it in the end 
>and was able to interrupt it. It then gave me the list of items it 
>had found so far.
>
>The "Find" button in the Find & replace window specifically sets the 
>allowInterrupts to false which is weird, especially as the comment 
>above one of the lines setting it to false says "  --allow user 
>interruption".
>
>You may like to edit this so that you can interrupt it, although as 
>I said, it works for me.
>
>Cheers,
>Sarah


Hi Sarah,

Your find script works really well! It doesn't cycle through the same 
page when there's more than one hit on the same page. That's great! 
Scrolling fields will scroll to show the hit. Scrolling fields 
containing multiple hits will scroll to show multiple hits, if 
necessary. This is almost perfect!

It seems like this ought to be native to Rev. It's silly that it has 
to be scripted. Is that an enhancement request that's already been 
submitted?

I don't quite understand how your script works yet -- I'm kind of 
slow at that -- but I'll study it and figure it out.

If I could wish for one enhancement, the script would scroll a 
scrolling background so I could see the hit if it were otherwise 
scrolled out of sight. I'm not asking you to script that for me. Is 
it scriptable? If so, could you drop me a hint?

Regarding the find and replace window, it sounds like yours works a 
zillion times faster than mine. Any ideas about why that could be? My 
computer isn't a screamer. It's a 466 mhz G4. But I doubt that's the 
main issue. On a much faster Macintosh, it would still be quite slow, 
seems to me. We've been over this once before, regarding the Find and 
Replace window, on the list. Can anyone see through the fog of 
perplexity on this issue?

I tried command-period on the find-and-replace window again. I tried 
setting the   allowinterrupts to true in the msg box first. I 
discovered that Find-and-Replace stops searching ten to fifteen 
seconds after I enter command-period. I don't know whether I just 
didn't notice this before, or if setting the allowinterrupts to true 
in the msg box made the difference. Time will tell. Ten to fifteen 
seconds is slow, but acceptable. It still seems like the 
Find-and-Replace feature works a lot faster for other users than it 
does for me. Maybe the speed of my machine *is* the bottleneck. Hard 
to say. I have 768 MB of physical RAM. Seems like that ought to be 
enough. Maybe not.

Maybe I misunderstood. Is Find-and-Replace is a stack? If so, I 
couldn't figure out how to get under the hood. I'd like to try 
setting the allowinterrupts to true. I couldn't access the stack 
script, the "Find" button script or anything. I couldn't get it to 
come up in the inspector. What's the trick?

Finally, has the cantabort property been abandoned in favor of the 
allowinterrupts property? Seems like they do about the same thing. 
The cantabort still resides in the 2.6.1 docs, but Rev doesn't seem 
to recognize that property.


Cheers,


Tim



More information about the use-livecode mailing list