Remote Find Questions Revisited
wouter.abraham at pi.be
Wed Apr 28 14:59:05 CDT 2004
On 28 Apr 2004, at 18:00, use-revolution-request at lists.runrev.com wrote:
> Message: 6
> Date: Wed, 28 Apr 2004 07:53:32 -0700
> From: Rob Cozens <rcozens at pon.net>
> Subject: RE: Remote Find Questions Revisited
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <email@example.com>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>> I think it's not necessarily a function of the number of cards,
> but the fact that you have "mark any card"
> Final note: My original query asked whether there was an efficient
> means of searching a database stack remotely (ie: without actually
> going to the stack). Since, AFAIK, one can only deal with the mark
> property of a card in the current stack ("get the mark of card x of
> stack y" produces compiler errors here), the answer to my original
> question seems to be "No."
Sorry, but this is not true. It is perfectly possible to do it without
"going" to the
specific stack or without making it the defaultstack or current stack.
You can test this by putting each of the following handlers in a button
the proximity of your "Test Results" field.
put empty into field "Test Results"
answer file "Select the stack:"
if the result is "cancel" then exit mouseUp
put it into x
put "" into tList
put the number of cards in stack x into tCount
put random(tCount) into a
if a is not in tList then
put "card" && a \
&& "/ id " & the id of card a \
of stack x & cr after tList
mark card a of stack x
put x & cr & "num of marked cards:" && \
the number of marked cards of stack x \
& cr & tList into fld "Test Results"
if field "Test Results" is "" then
answer "Use button 1 first please :^)"
exit to top
put line 1 of field "Test Results" into x
put "" into tList
put the cardids of stack x into a
repeat for each line i in a
if the mark of card id i of stack x then
put "card id" && i & cr after tList
unmark card id i of stack x
if tList = "" then put "no marked cards" into tList
put cr & tList after field "Test Results"
Something you cannot do is use the command "unmark all cards"
as this indeed requires the defaultstack set to the "searched" stack.
> Rob Cozens
> CCW, Serendipity Software Company
More information about the use-livecode