Mysteries of Me

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Oct 29 11:14:59 EDT 2018


I thought I had a grip on "me"

But in a script that is assigned to a stack, one assumes that "me"
refers to stack itself.
But the auto-suggestion on the SE popup menu generates an error on the
following line:
*
on openstack
   put url ("binfile:" & path_Modules()& "listen/collection.json") into
tContainer
   put JSONToArray(tContainer) into sCollectionA   
   
   # must have net connection, otherwise take to My Audio
   if not connectivity_PingServer() then
      dialog_CustomMsg "No internet connection? Going to off-line library."
  [ERROR:}    go card [on tab on auto-suggestion] "listen-my-audio" of me
   end if
end openstack

# I have to use:
*
**on openstack
   put url ("binfile:" & path_Modules()& "listen/collection.json") into
tContainer
   put JSONToArray(tContainer) into sCollectionA   
   
   # must have net connection, otherwise take to My Audio
   if not ******connectivity_PingServer()** then
      dialog_CustomMsg "No internet connection? Going to off-line library."
      go to card "listen-my-audio" of this stack
   end if
end openstack

#Then the SE will compile the script*
# Why is "me" generating an error?
# It should not be a suggestion if it is.

Dictionary says:

*"The *me* keyword is a reference to the object whosescript contains the
current handler. If *me* is executed in behavior script, then *me*
refers to the object that is executing the behavior script."

on openStack ... "me" ... one would think, refer to cards in the stack?

Could it be that the function

 **connectivity_PingServer()

is called from a back script -- which has no binary "cards" such**

BR

 





More information about the use-livecode mailing list