functions may be called as commands in IDE, but not in standalone
Mark Waddingham
mark at livecode.com
Wed Sep 2 10:29:06 EDT 2015
On 2015-09-02 16:13, Dr. Hawkins wrote:
> After a couple of days of frustration, compiling standalone to get test
> messages, I discovered:
>
> function someFunct a, b
>
>
> then a script that has
>
> someFunct cat, dog
>
>
>
> will execute someFunct in the IDE. In a standalone, it fails to find
> the
> handler.
>
>
> In my case, someFunct was originally a command, and changed to be a
> function to possibly return an error code. I changed the places where
> it
> is regularly called, but missed a couple of rare ones.
>
> Is this a known/reported issue?
When you say 'when executed in the IDE' in what context do you mean? A
script? The message box?
If you declare a handler in the message path as a command, then you can
only call it from script using command syntax.
If you declare a handler in the message path as a function, then you can
only call it from script using function syntax.
This is the same in the IDE or in a Standalone as the code in the engine
which does it is the same.
Therefore, if you are seeing this in the IDE then it is likely via
something IDE specific you are using *or* you have lingering definitions
in a library stack or similar somewhere which you are loading into the
IDE.
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list