@tom  go card and go to card same thing.

@ bob

That's what I understand (as you have described it)

-- The behavior is set in the properties of a stack.
-- the SE suggestions "knows" this and on typing
      go card...[List of cards in current stack appears... choose one)

# you get:

go card "my-audio-library" of me  #as we would expect

# but it gives an error; will not compile. You have to be explicit:

go card "my-audio-library" of this stack

# then it compiles

-- re: backscript

function isThisTrue() then
    go card "my-audio-library" of me  # as per SE suggestions
   # generates an error
end isThisTrue

# isThisTrue , is part of a back script. It won't compile
# I wondered it that was causing a reference change
# because this works

function isThisTrue() then
    go card "my-audio-library" of this stack
end isThisTrue
  




On 10/29/18 11:59 AM, Bob Sneidar via use-livecode wrote:
> Me always refers to the object the script belongs to. It doesn't matter which 
> handler it is. A script running in a behavior is like running an instance of 
> the target object (the object with the behavior set). This allows for 
> multiple objects with the same behavior (think datagrids calling get the 
> dgData in other dataGrids and you will immediately see why this would be 
> necessary). This me refers to the actual behavior object, NOT the "instance 
> object" as it were. 
>
> As far as a backscript, are you saying you have a backscript object with a 
> behavior assigned to it?? 
>
> Bob S


-- 
Svasti Astu, Be Well!
Brahmanathaswami

Get the SivaSiva app, it's free:
https://www.himalayanacademy.com/apps/sivasiva

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to