Mysteries of Me

Tom Glod tom at makeshyft.com
Mon Oct 29 12:19:22 EDT 2018


the first version said "go card" not "go to card" :)

On Mon, Oct 29, 2018 at 11:14 AM, Sannyasin Brahmanathaswami via
use-livecode <use-livecode at lists.runrev.com> wrote:

> 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
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list