Re: functions may be called as commands in IDE, but not in standalone
On Wed, Sep 2, 2015 at 11:19 AM, Mark Wiederwrote: > Dr. Hawkins writes: > > > Having solved it for my own, I'm not going to worry about this any > further > > if it can't bite people now . . . > > My guess, without having looked at your stack, is that there is a > previously compiled script that uses the command syntax. If you > haven't recompiled it then it won't know about the change. > We can definitely rule that out; that handler is the only place the fragment "on setPref" occurs, and it gets recompiled several times a session. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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
Re: functions may be called as commands in IDE, but not in standalone
On Wed, Sep 2, 2015 at 8:01 AM, Mark Waddinghamwrote: > I suspect this is a lingering definition which was somewhere in the > message path in the IDE. > > When the engine looks for what handler to call it checks each stage in the > message path in order for the pair (handler type, handler name). So, if you > have (command, myFunc) at one level, and (function, myFunc) at another > level: > myFunc > and > get myFunc() > > Will call different handlers. > There is online handler with the name (setPref). It is in a library stack. There is no possibility of another handler of this name; it would have to come from a several months old backup--and the IDE isn't stable enough to have a stack from earlier in the morning, let alone months : Having solved it for my own, I'm not going to worry about this any further if it can't bite people now . . . -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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
Re: functions may be called as commands in IDE, but not in standalone
Dr. Hawkinswrites: > Having solved it for my own, I'm not going to worry about this any further > if it can't bite people now . . . My guess, without having looked at your stack, is that there is a previously compiled script that uses the command syntax. If you haven't recompiled it then it won't know about the change. -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: functions may be called as commands in IDE, but not in standalone
On Wed, Sep 2, 2015 at 7:29 AM, Mark Waddinghamwrote: > When you say 'when executed in the IDE' in what context do you mean? A > script? The message box? > I mean that when my stack and library stack run in the IDE, it doesn't choke on that line, but calls the function from the line "somefunct a,b" > > If you declare a handler in the message path as a function, then you can > only call it from script using function syntax. > That is the expected behavior, yes. :) > > 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 > I'll create another test, then. It may have run the code in an older version, but I know the code executed in the IDE for the simple reason that I have the resultant directory . . . -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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
Re: functions may be called as commands in IDE, but not in standalone
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 I'll create another test, then. It may have run the code in an older version, but I know the code executed in the IDE for the simple reason that I have the resultant directory . . . I suspect this is a lingering definition which was somewhere in the message path in the IDE. When the engine looks for what handler to call it checks each stage in the message path in order for the pair (handler type, handler name). So, if you have (command, myFunc) at one level, and (function, myFunc) at another level: myFunc and get myFunc() Will call different handlers. Mark. -- Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps ___ 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
Re: functions may be called as commands in IDE, but not in standalone
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 ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps ___ 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