Re: Odd data in message box

2020-10-18 Thread Mark Wieder via use-livecode

On 10/18/20 10:56 AM, J. Landman Gay via use-livecode wrote:

I've seen error lists appear in the message box too

I've seen that sometimes as well, but don't have a repeatable recipe. I 
just always assume it's something screwy with my code.


--
 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: Odd data in message box

2020-10-18 Thread Dan Friedman via use-livecode
//@Dan: Do you have a custom errorDialog handler in your message path?

I do not.

-Dan

 

On 10/18/20, 9:44 AM, "use-livecode on behalf of Richard Gaskin via 
use-livecode"  wrote:

True, but what would anyone go out of their way to write an error 
handler that provides less useful information than what LC provides if 
left alone?

And some of the error info I see shared in the forums is from newer 
users, who seem unlikely to have ventured into the relatively arcane 
world of custom error processing.

I hope I simply misunderstand what I've been seeing, that perhaps there 
isn't something broken in recent versions of the IDE's error handling.

In Dan's message from yesterday he wrote:

   1. Why didn't the debugger throw an error?  Instead, it put this error
  chunk in the message box?

@Dan: Do you have a custom errorDialog handler in your message path?

-- 
  Richard Gaskin
  Fourth World Systems



J. Landman Gay wrote:
> If there's an errorDialog handler, errors bypass the IDE. That's one way 
it 
> could happen.
> 
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On October 17, 2020 4:06:03 PM Richard Gaskin via use-livecode 
>  wrote:
> 
>> J. Landman Gay wrote:
>>> On 10/17/20 12:13 PM, Dan Friedman via use-livecode wrote:
 Where did Jacque get that list of codes?
>>>
>>>  From a plugin Richard and I wrote some years ago. It dynamically loads 
the 
>>>  error list based on
>>> the version of LC you're using. You can look up individual codes, or 
paste 
>>> in a list of errors
>>> which is what I did with your report.
>>
>> Tools like that can be useful at runtime to help fill out logs and such.
>>
>> But I've been seeing a surprising number of conversations here and in
>> the forums suggesting that people are seeing raw error info in the IDE.
>>
>> If that's true, what broke with the IDE's more guided error handling?
>>
>> --
>>  Richard Gaskin


___
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: Odd data in message box

2020-10-18 Thread J. Landman Gay via use-livecode
When you build a standalone there's an option to report errors in an email 
or a file. The purpose is to allow users to send error info to the 
developer. These are raw error messages like Dan saw and are of no use to 
the user, so translating them makes no sense.


But you're right that new users probably don't have an errorDialog handler. 
I've seen error lists appear in the message box too, but I do have that 
handler in the stack script.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 18, 2020 11:45:01 AM Richard Gaskin via use-livecode 
 wrote:



True, but what would anyone go out of their way to write an error
handler that provides less useful information than what LC provides if
left alone?

And some of the error info I see shared in the forums is from newer
users, who seem unlikely to have ventured into the relatively arcane
world of custom error processing.

I hope I simply misunderstand what I've been seeing, that perhaps there
isn't something broken in recent versions of the IDE's error handling.

In Dan's message from yesterday he wrote:

  1. Why didn't the debugger throw an error?  Instead, it put this error
 chunk in the message box?

@Dan: Do you have a custom errorDialog handler in your message path?

--
 Richard Gaskin
 Fourth World Systems



J. Landman Gay wrote:

If there's an errorDialog handler, errors bypass the IDE. That's one way it
could happen.

--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 17, 2020 4:06:03 PM Richard Gaskin via use-livecode
 wrote:


J. Landman Gay wrote:

On 10/17/20 12:13 PM, Dan Friedman via use-livecode wrote:

Where did Jacque get that list of codes?


 From a plugin Richard and I wrote some years ago. It dynamically loads the
 error list based on
the version of LC you're using. You can look up individual codes, or paste
in a list of errors
which is what I did with your report.


Tools like that can be useful at runtime to help fill out logs and such.

But I've been seeing a surprising number of conversations here and in
the forums suggesting that people are seeing raw error info in the IDE.

If that's true, what broke with the IDE's more guided error handling?

--
 Richard Gaskin



___
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: Odd data in message box

2020-10-18 Thread Richard Gaskin via use-livecode
True, but what would anyone go out of their way to write an error 
handler that provides less useful information than what LC provides if 
left alone?


And some of the error info I see shared in the forums is from newer 
users, who seem unlikely to have ventured into the relatively arcane 
world of custom error processing.


I hope I simply misunderstand what I've been seeing, that perhaps there 
isn't something broken in recent versions of the IDE's error handling.


In Dan's message from yesterday he wrote:

  1. Why didn't the debugger throw an error?  Instead, it put this error
 chunk in the message box?

@Dan: Do you have a custom errorDialog handler in your message path?

--
 Richard Gaskin
 Fourth World Systems



J. Landman Gay wrote:
If there's an errorDialog handler, errors bypass the IDE. That's one way it 
could happen.


--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 17, 2020 4:06:03 PM Richard Gaskin via use-livecode 
 wrote:



J. Landman Gay wrote:

On 10/17/20 12:13 PM, Dan Friedman via use-livecode wrote:

Where did Jacque get that list of codes?


 From a plugin Richard and I wrote some years ago. It dynamically loads the 
 error list based on
the version of LC you're using. You can look up individual codes, or paste 
in a list of errors

which is what I did with your report.


Tools like that can be useful at runtime to help fill out logs and such.

But I've been seeing a surprising number of conversations here and in
the forums suggesting that people are seeing raw error info in the IDE.

If that's true, what broke with the IDE's more guided error handling?

--
 Richard Gaskin



___
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: Odd data in message box

2020-10-17 Thread J. Landman Gay via use-livecode
If there's an errorDialog handler, errors bypass the IDE. That's one way it 
could happen.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 17, 2020 4:06:03 PM Richard Gaskin via use-livecode 
 wrote:



J. Landman Gay wrote:

On 10/17/20 12:13 PM, Dan Friedman via use-livecode wrote:

Where did Jacque get that list of codes?


 From a plugin Richard and I wrote some years ago. It dynamically loads the 
 error list based on
the version of LC you're using. You can look up individual codes, or paste 
in a list of errors

which is what I did with your report.


Tools like that can be useful at runtime to help fill out logs and such.

But I've been seeing a surprising number of conversations here and in
the forums suggesting that people are seeing raw error info in the IDE.

If that's true, what broke with the IDE's more guided error handling?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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





___
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: Odd data in message box

2020-10-17 Thread Richard Gaskin via use-livecode

J. Landman Gay wrote:

On 10/17/20 12:13 PM, Dan Friedman via use-livecode wrote:

Where did Jacque get that list of codes?


 From a plugin Richard and I wrote some years ago. It dynamically loads the error list based on 
the version of LC you're using. You can look up individual codes, or paste in a list of errors 
which is what I did with your report.


Tools like that can be useful at runtime to help fill out logs and such.

But I've been seeing a surprising number of conversations here and in 
the forums suggesting that people are seeing raw error info in the IDE.


If that's true, what broke with the IDE's more guided error handling?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Odd data in message box

2020-10-17 Thread J. Landman Gay via use-livecode

On 10/17/20 12:13 PM, Dan Friedman via use-livecode wrote:

Where did Jacque get that list of codes?


From a plugin Richard and I wrote some years ago. It dynamically loads the error list based on 
the version of LC you're using. You can look up individual codes, or paste in a list of errors 
which is what I did with your report.


You can get the plugin from Sample Stacks in the LC toolbar; search for "LiveCode Error 
Lookup". Or in your browser here: 



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Odd data in message box

2020-10-17 Thread Mark Wieder via use-livecode

On 10/17/20 10:13 AM, Dan Friedman wrote:


1. Why didn't the debugger throw an error?  Instead, it put this error chunk in 
the message box?


Dunno. I can't replicate your experience. Somewhat higher in your stack 
or in the message path?


If I try this on my system with an invalid sTime value the debugger gets 
triggered. If I take PowerDebug out of the picture I still end up in the 
builtin debugger. If I then check Suppress Errors from the menubar then 
the stack locks up on the error.


--
 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: Odd data in message box

2020-10-17 Thread Mark Wieder via use-livecode

On 10/17/20 10:13 AM, Dan Friedman wrote:


2. Where did Jacque get that list of codes?   Is there some support docs I 
don't know about that explain these types of thing?


The error texts are in a global property, but there's a definite 
catch22ness involved because you have to know it's there in order to 
find it in the dictionary:

put the scriptExecutionErrors

In PowerDebug I added a helper function so that from the messagebox you 
can say


put explainerror(219)

which is basically just a wrapper:

function explainError pError
  return line pError of the scriptExecutionErrors
end explainError

--
 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: Odd data in message box

2020-10-17 Thread Dan Friedman via use-livecode
Mark and Jacque,

Thank you for your assistance.  There was invalid data in sTime.  
Interestingly, it wasn't from the data I was loading... it was old data coming 
from a reference to an array in a datagrid.  Setting the datagrid's Persistent 
Data to false resolved the problem.

A couple follow up questions:

1. Why didn't the debugger throw an error?  Instead, it put this error chunk in 
the message box?
2. Where did Jacque get that list of codes?   Is there some support docs I 
don't know about that explain these types of thing?

Again, thank you both for your help.  What would we do without this list, and 
the talented and helpful people on it?!

-Dan 


On 10/16/20, 12:36 PM, "use-livecode on behalf of Mark Wieder via 
use-livecode"  wrote:

On 10/16/20 9:57 AM, Dan Friedman wrote:
> Mark,
> 
> THANK YOU for the reply...   Line 2185 is:
> 
>   put sTime + ((timeOffset*60)*60) into sTime

That's what I thought. The error you're getting (see Jacque's annotated 
list) is pointing to an invalid value for sTime in some iteration of 
that function call. My guess is either sTime is empty or not a numeric 
value.

Try something like this to pinpoint the error:

   if char 1 of timeOffset = "-" then
 put ((timeOffset*60)*60) into pTimeOffset
 put sTime - pTimeOffset into sTime
   else
 try
 put sTime + ((timeOffset*60)*60) into sTime
 catch e
 put the sTime & cr executionContexts & cr after msg
 end try
   end if


-- 
  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

___
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


Fwd: Re: Odd data in message box

2020-10-16 Thread Mark Wieder via use-livecode

On 10/16/20 9:57 AM, Dan Friedman wrote:

Mark,

THANK YOU for the reply...   Line 2185 is:

put sTime + ((timeOffset*60)*60) into sTime


That's what I thought. The error you're getting (see Jacque's annotated 
list) is pointing to an invalid value for sTime in some iteration of 
that function call. My guess is either sTime is empty or not a numeric 
value.


Try something like this to pinpoint the error:

  if char 1 of timeOffset = "-" then
put ((timeOffset*60)*60) into pTimeOffset
put sTime - pTimeOffset into sTime
  else
try
put sTime + ((timeOffset*60)*60) into sTime
catch e
put the sTime & cr executionContexts & cr after msg
end try
  end if


--
 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: Odd data in message box

2020-10-16 Thread J. Landman Gay via use-livecode

On 10/16/20 10:46 AM, Dan Friedman via use-livecode wrote:


There is no problem with this function, and it's producing the correct time.   
However, when it's all said and done, I get this in the message box:

394,2185,1
465,2185,1
253,2185,1
241,2181,1,convertToLocalTime
353,0,0,stack "/Users/Dan1/Desktop/Ignite/MY App/App/main.livecode"
219,2130,9,convertToLocalTime
465,2130,9
253,2130,9
241,2129,1,convertKevinDate
353,0,0,stack "/Users/ Dan1/Desktop/Ignite/MY App/App/main.livecode"
219,38,41,convertKevinDate
119,38,41
118,38,41
118,38,41
465,38,41
241,38,1,FillInData
353,0,0,button id 1410 of card id 1406 of stack "Data Grid Templates 1571787360744" of 
stack "/Users/Dan1/Desktop/Ignite/MY App/App/main.livecode"
675,3536,1,FillInData
253,3536,1
253,3536,1
490,3536,1
253,3536,1


Here's a translation of the first few lines of the error codes (down through 
fillInData):

394 Operators +: error in left operand
465 put: error in expression
253 if-then: error in statement
241 Handler: error in statement
353 Object Name:
219 Function: error in function handler
465 put: error in expression
253 if-then: error in statement
241 Handler: error in statement
353 Object Name:
219 Function: error in function handler
119 Operators &: error in right operand
118 Operators &: error in left operand
118 Operators &: error in left operand
465 put: error in expression
241 Handler: error in statement



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Odd data in message box

2020-10-16 Thread Dan Friedman via use-livecode
Mark,

THANK YOU for the reply...   Line 2185 is:

put sTime + ((timeOffset*60)*60) into sTime


function convertToLocalTime sTime  //sTime is already been converted to seconds 
format
  //convert the time using the hour offset for local time zone
  put word 6 of the internet date into timeOffset
  put (abs(timeOffset))*1 into timeOffset
  put timeOffset/100 into timeOffset
  if char 1 of timeOffset = "-" then
put ((timeOffset*60)*60) into pTimeOffset
put sTime - pTimeOffset into sTime
  else
put sTime + ((timeOffset*60)*60) into sTime   //<- 2185
  end if

  return sTime
end convertToLocalTime


Thank you!  
 
Dan Friedman
CEO, ClearVision Technologies, LLC
Voice: 909/484-2052
http://www.clearvisiontech.com
 

On 10/16/20, 9:49 AM, "use-livecode on behalf of Mark Wieder via use-livecode" 
 wrote:

On 10/16/20 8:46 AM, Dan Friedman via use-livecode wrote:

> There is no problem with this function, and it's producing the correct 
time.   However, when it's all said and done, I get this in the message box:
> 
> 394,2185,1

what's line 2185 look like?

-- 
  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

___
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: Odd data in message box

2020-10-16 Thread Mark Wieder via use-livecode

On 10/16/20 8:46 AM, Dan Friedman via use-livecode wrote:


There is no problem with this function, and it's producing the correct time.   
However, when it's all said and done, I get this in the message box:

394,2185,1


what's line 2185 look like?

--
 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: Odd data in message box

2020-10-16 Thread Ralph DiMola via use-livecode
This what I get here in the eastern US time zone(gmt-4). Looks Correct to
me.

Command:

put the seconds into x;put convertToLocalTime(x) into y;convert x to
dateitems;convert y to dateitems;put x

Message box results:

2020,10,16,12,20,25,6

2020,10,16,16,20,25,6

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Dan Friedman via use-livecode
Sent: Friday, October 16, 2020 11:46 AM
To: How to use LiveCode
Cc: Dan Friedman
Subject: Odd data in message box

I get a bunch of data from my server.  In this array, there are some dates.
I roll through each one converting the date to local time:

function convertToLocalTime sTime  //sTime is already been converted to
seconds format
  //convert the time using the hour offset for local time zone
  put word 6 of the internet date into timeOffset
  put (abs(timeOffset))*1 into timeOffset
  put timeOffset/100 into timeOffset
  if char 1 of timeOffset = "-" then
put ((timeOffset*60)*60) into pTimeOffset
put sTime - pTimeOffset into sTime
  else
put sTime + ((timeOffset*60)*60) into sTime
  end if
  
  return sTime
end convertToLocalTime

There is no problem with this function, and it's producing the correct time.
However, when it's all said and done, I get this in the message box:

394,2185,1
465,2185,1
253,2185,1
241,2181,1,convertToLocalTime
353,0,0,stack "/Users/Dan1/Desktop/Ignite/MY App/App/main.livecode"
219,2130,9,convertToLocalTime
465,2130,9
253,2130,9
241,2129,1,convertKevinDate
353,0,0,stack "/Users/ Dan1/Desktop/Ignite/MY App/App/main.livecode"
219,38,41,convertKevinDate
119,38,41
118,38,41
118,38,41
465,38,41
241,38,1,FillInData
353,0,0,button id 1410 of card id 1406 of stack "Data Grid Templates
1571787360744" of stack "/Users/Dan1/Desktop/Ignite/MY
App/App/main.livecode"
675,3536,1,FillInData
253,3536,1
253,3536,1
490,3536,1
253,3536,1

Any thoughts? 

-Dan

___
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