Hi Graham,

Thank you for the update. Sorry to hear about the flood, I know from personal 
experience what that’s like so I really wish you and your family well, and that 
you can get your home and life back in to normal very soon..

Paul

> On May 14, 2020, at 03:17, Graham Samuel via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Paul
> 
> Sorry for the delay in replying but my house has just been inundated (it 
> happened on Monday and we are still clearing up! Worst flood in more than 40 
> years in my French village). Anyway, the bug is registered as 22730. The 
> problem is acknowledged - as I said in my submission, I’m not claiming my 
> coding is correct, I’m just trying to show that the IDE doesn’t behave 
> consistently in this instance.
> 
> Graham
> 
>> On 11 May 2020, at 23:18, Paul Hibbert via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Good point Ben, looks like that was my mistake. I don’t remember where I 
>> learned to use "if tError then”, but what I forgot was that it should have 
>> been testing for a false condition, so “if not tError then” does show the 
>> error when one occurs and skips when no error occurs.
>> 
>> Fixing this returns the following error when tMins contains a non numeric 
>> character;
>> An Error Occurred; 375,5,1
>> 239,5,1
>> 465,5,1
>> tMins = 31′
>> 
>> These are the corresponding LC Error Codes;
>> 375  Operators /: error in left operand
>> 239  Operators (): error in right operand
>> 465  put: error in expression
>> 
>> So it seems the value passed to tMins may contain invalid character(s) as 
>> Graham suspects. However, this doesn’t explain why the original script 
>> should behave differently using the debugger and not.
>> 
>> @Graham, can you post the Bug Report Number please?
>> 
>> Paul
>> 
>> 
>>> On May 11, 2020, at 09:11, Ben Rubinstein via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> And re this part:
>>> 
>>>>> Interestingly this
>>>>> 
>>>>> on mouseUp pMouseButton
>>>>> try
>>>>>   put (tMins/60) into tMins
>>>>> catch tError
>>>>>   if tError then answer "An Error Occurred;"  && tError & return & "tMins 
>>>>> =" && tMins
>>>>> end try
>>>>> end mouseUp
>>>>> 
>>>>> does NOT through an error or a catch error message
>>> 
>>> You're not seeing that there was an error thrown because 'tError' would be 
>>> set to the error message; the code above is testing for it being true, 
>>> before deciding to display the message. But it won't be true it, it will be 
>>> an expression of the error. If you removed "if tError then", so always 
>>> execute the answer statement in the catch section, you should see the error 
>>> message.
>>> 
>>> HTH,
>>> 
>>> Ben
>>> 
>>> 
>>> On 11/05/2020 15:31, Rick Harrison via use-livecode wrote:
>>>> Hi Andy,
>>>> Yes, tMins has to have a value or the statement makes no sense because LC 
>>>> has no
>>>> context for what you are trying to do.  LC doesn’t know if tMins is a 
>>>> string or something else.
>>>> Rick
>>>>> On May 11, 2020, at 4:24 AM, AndyP via use-livecode 
>>>>> <use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> I seem to have my posts dropped at the moment hence this,
>>>>> 
>>>>> I'm seeing the same error
>>>>> 
>>>>> with
>>>>> 
>>>>> on mouseUp pMouseButton
>>>>> put (tMins/60) into tMins
>>>>> answer tMins
>>>>> end mouseUp
>>>>> 
>>>>> button "Button": execution error at line 2 (Operators /: error in left 
>>>>> operand), char 1
>>>>> 
>>>>> Interestingly this
>>>>> 
>>>>> on mouseUp pMouseButton
>>>>> try
>>>>>  put (tMins/60) into tMins
>>>>> catch tError
>>>>>  if tError then answer "An Error Occurred;"  && tError & return & "tMins 
>>>>> =" && tMins
>>>>> end try
>>>>> end mouseUp
>>>>> 
>>>>> does NOT through an error or a catch error message
>>>>> 
>>>>> 
>>>>> If however tMins is initialized then all works as expected
>>>>> 
>>>>> on mouseUp pMouseButton
>>>>> put 20 into tMins
>>>>> put (tMins/60) into tMins
>>>>> answer tMins
>>>>> end mouseUp
>>>>> 
>>>>> ???
>>> 
>>> _______________________________________________
>>> 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
> 
> _______________________________________________
> 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

Reply via email to