How to "do" this

Wouter wouter.abraham at pi.be
Mon Feb 16 20:27:12 EST 2004


On 17 Feb 2004, at 02:13, use-revolution-request at lists.runrev.com wrote:

> Message: 1
> Date: Mon, 16 Feb 2004 21:22:38 +0100
> From: Bj?rnke von Gierke<bvg at mac.com>
> Subject: Re: How to "do" this
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <DD31228E-60BD-11D8-9D5A-003065AD94A4 at mac.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> On Montag, Feb 16, 2004, at 18:21 Europe/Zurich, Dar Scott wrote:
>
>>
>> On Monday, February 16, 2004, at 09:22 AM, Björnke von Gierke wrote:
>>
>>>   repeat with x = 1 to the number of (theO && "s") in stack theS
>>
>> Is (theO && "s") intended to evaluate something like "fields"?  Then
>> you have a typo.  You need & instead of &&.
>
> Oh yes i saw that, but it does not help :(
>
>>
>> I didn't realize that <objectType> could be an expression here.
>
> well maybe that is why it does not work... I probably have to make a
> switch and do the repeat for each object type separately...
>
>> There is so much I don't know about object detailed syntax.
>> Especially when it comes to runtime evaluation and quoted strings.
>
> Same here
>


If your handler is not supposed to capture the fields contents or
keep previous list if the number of cards = 0 then better change to the 
following

on mouseDown
   --Button "Object" = Field
   put the label of Button "Object" into theO
   put the label of Button "Object"&"s" into theOs
   --button "stack name" = the name of a open stack
   put the label of button "Stack name" into theS
   do "put the number of " & theOs& " in stack " & quote &theS &quote & 
" into nof"
   if nof = 0 then put "no fields" into me
   else
     repeat with x = 1 to nof
       do "put the name of" && theO && x && "of stack" && quote & theS & 
quote && "& return after tbox"
     end repeat
     filter tbox with "*"
     put tbox into me
   end if
end mouseDown

Regards,
WA



More information about the use-livecode mailing list