It Variable

Jim Witte jswitte at bloomington.in.us
Fri Mar 3 21:47:05 EST 2006


   Putting 'get the result' at the end of the netrequest handler  
should do, unless something else disrupts the 'it' variable after the  
call to netrequest.  I just hacked up this set of card/button scripts  
which work:

-- card script
on netrequest tData, tComp
   return "this" && tData && tComp
   get the result -- place the result in it
end netrequest

-- btn script
on mouseup
   netrequest "some data", "some computer"
   --get the result -- placed in the script in card script instead
   answer it
end mouseup

Jim

> case.  Putting get the result below the line where I call for the  
> netrequest
> will work, but it would be extremely difficult to do because it is  
> located
> in odd places all over in more than 40 stacks.  Right now I am  
> thinking of
> making a stack that will do it for me, but I was hoping there was  
> an easier
> way.
>
> On 3/3/06, Sarah Reichelt <sarah.reichelt at gmail.com> wrote:
>>
>> On 3/4/06, Bridger Maxwell <bridgeyman at gmail.com> wrote:
>>> I just made a giant switch from Hypercard to Revolution.  In  
>>> Hypercard
>>> networking we used "request thedata from program theComputer" to  
>>> request
>>> data from across an appletalk network.  In Revolution this didn't  
>>> work
>>> anymore so we made a new command, "Netrequest" that serves the same
>>> function.  "netrequest thedata,theComputer"  The problem is that in
>>> Hypercard put the data into the it variable when it is done.   
>>> Without
>>> changing the script in the card where it initiates the netrequest
>> command
>>> (such as in the card or a button), can I add something the to stack
>> script
>>> where the command is contained so it puts the result into the it
>> variable?
>>
>>
>> netrequest thedata,theComputer
>> get the result
>> -- "it" will now contain whatever was returned from the netrequest
>> handler.
>>
>> HTH,
>> Sarah
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the Use-livecode mailing list