Re: Export snapshot and errors...
Thanks Paul. They should replace the dictionary description with your version, as yours makes a LOT more sense! I read the dictionary too, but came away confused. Bob S > On Oct 1, 2019, at 08:59 , Paul Dupuis via use-livecode > wrote: > > According to the Dictionary, if I am reading it correctly, in a command (vs > function) > > return empty -- sets both 'it' and 'the result' to the parameter of the > return statement (in this case empty) > return empty for value -- sets 'it' to the parameter (empty) and clears 'the > result' indicating no error (empty) > return empty for error -- set 'the result' to the parameter (empty) and > clears 'it' (empty) indicating no value returned from the command > > So, yes, "return empty" will do, but I choose to use "return empty for error" > to remind me that it is purposefully 'the result' that I wanted to clear. ___ 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: Export snapshot and errors...
According to the Dictionary, if I am reading it correctly, in a command (vs function) return empty -- sets both 'it' and 'the result' to the parameter of the return statement (in this case empty) return empty for value -- sets 'it' to the parameter (empty) and clears 'the result' indicating no error (empty) return empty for error -- set 'the result' to the parameter (empty) and clears 'it' (empty) indicating no value returned from the command So, yes, "return empty" will do, but I choose to use "return empty for error" to remind me that it is purposefully 'the result' that I wanted to clear. On 10/1/2019 10:39 AM, Bob Sneidar via use-livecode wrote: Is the for error necessary? I just return empty. Bob S On Oct 1, 2019, at 06:02 , Paul Dupuis via use-livecode wrote: command clearResult return empty for error end clearResult ___ 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 ___ 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: Export snapshot and errors...
Is the for error necessary? I just return empty. Bob S > On Oct 1, 2019, at 06:02 , Paul Dupuis via use-livecode > wrote: > > command clearResult > return empty for error > end clearResult ___ 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: Export snapshot and errors...
On 10/1/2019 8:58 AM, Paul Dupuis via use-livecode wrote: In LC905rc1, the Dictionary entry for Export Snapshot does not appear to indicate how any error value is returned (for example if the file can not be written) the result is not cleared after an export snapshot - i.e. put the result into tTemp1 -- if this put "X" in tTemp1 export snapshot from this cd of stack "Images" to file tFile as PNG put the result into tTemp2 -- the result is still "X" So, does export snapshot return any error values. Shouldn't it? Is this a Documentation bug and there is some return value that is not documented or an Engine bug and if Export Snapshot encounters and error, it should return an error message in the result or empty in the result if successful? Related: Anybody have a good tip to CLEAR "the result"? If you really want to be sure it is empty before calling something that may change it? Answer my own question on how to clear the result with: command clearResult return empty for error end clearResult ___ 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
Export snapshot and errors...
In LC905rc1, the Dictionary entry for Export Snapshot does not appear to indicate how any error value is returned (for example if the file can not be written) the result is not cleared after an export snapshot - i.e. put the result into tTemp1 -- if this put "X" in tTemp1 export snapshot from this cd of stack "Images" to file tFile as PNG put the result into tTemp2 -- the result is still "X" So, does export snapshot return any error values. Shouldn't it? Is this a Documentation bug and there is some return value that is not documented or an Engine bug and if Export Snapshot encounters and error, it should return an error message in the result or empty in the result if successful? Related: Anybody have a good tip to CLEAR "the result"? If you really want to be sure it is empty before calling something that may change it? ___ 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