Limiting a Search

Using SuperCard and the Runtime Editor... working with windows, backgrounds, cards and menus.

Limiting a Search

Postby Mia » Sat Apr 22, 2017 3:26 pm

Is there a way to limit a search to a specific card?
Mia
 
Posts: 47
Joined: Thu Jan 28, 2010 8:43 pm

Re: Limiting a Search

Postby codegreen » Sun Apr 23, 2017 8:35 am

Not that I'm aware of.

FWIW find is some of the oldest code left in the SC interpreter, and unlike most more recently updated stuff it's still pretty much self-contained as an egg, offering almost no opportunity to get your fingers between the fan blades via script, Internals Toolbox callbacks, or (since its state info is stored in static variables) even fiddling undocumented stuff in SC's main globals block. So it pretty much does what it does, and stubbornly resists efforts to tweak its designed-in behaviors.

That said, it's also a pretty big hammer to break out just to locate something on the current card. Find was designed the way it was specifically to optimize searching across cards (by hashing field contents when stored so searches won't force loading tons of spurious data from slow media like floppies).

What are you trying to do here, and would it matter especially for your purposes if things didn't work exactly the same way find does?

-Mark
codegreen
 
Posts: 1494
Joined: Mon Jul 14, 2008 11:03 pm


Return to SuperCard Basics

Who is online

Users browsing this forum: No registered users and 1 guest