Re: the script of with line numbers?

2022-08-29 Thread Richard Gaskin via use-livecode

Another option: Automate it, replacing Bugzilla's web UI with LC

Mod Ken Ray's RevZilla to retrieve support emails, reformat them however 
needed, tuck them in the DB, integrate the report display with things 
like double-clicking a line in the executtionContexts to open scripts, etc.


http://www.sonsothunder.com/devres/livecode/downloads/RevZilla2.htm

One-stop shopping for a fully integrated software support system.

A similar approach could be used with Nextcloud's Deck APIs, or a wide 
range of other issue tracking systems, even Github.


--
 Richard Gaskin
 Fourth World Systems


___
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: the script of with line numbers?

2022-08-29 Thread Pi Digital via use-livecode
Using The earlier example, you could use

put theErrorLineNum into tLineNum
put the script of stack “myScript” into tScript
split tScript using cr
logError tLineNum, tScript[tLineNum]

Or something like that. 

Sean


>>> Is there a way (an existing function or command in the language or IDE) to 
>>> get the script of an object WITH the line numbers as you see them in the 
>>> IDE script editor?
>> 
>> While some clever solutions have been posted, I gotta ask WHY?
>> 
> 
> In our applications, we trap the script error dialog and replace the default 
> with our own. That dialog lets customers send the executionContexts and some 
> other debugging information to us to report an error (if one gets by 
> quality/beta testing).
> 
> So we get the executionContext that say "error such and such occurred at line 
> 342 of some handler". The line number is the line of the whole script the 
> handler is in.
> 
> When we et the message and log the problem in our instance of Bugzilla, one 
> of the 1st things is to look at the script and see what the line of code 
> references actually says.
> 
> It could reduce a trouble should step to include the line numbers 
> programmatically in the error report.
___
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: the script of with line numbers?

2022-08-29 Thread Mark Wieder via use-livecode

On 8/29/22 16:11, Paul Dupuis via use-livecode wrote:

It could reduce a trouble should step to include the line numbers 
programmatically in the error report.


No a huge priority in the scheme of things, but a "nice to have" sort of 
thing. Does that answer the "why?"


Somewhat. If you already have the line number from the error message, 
why not just grab that line of script? Or preface it with the line 
number you already have in your possession?


But I find that the executionContexts gives me more information than 
just where the error occurred, since the actual problem may be farther 
up the line and it's only the end symptom that triggers 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: the script of with line numbers?

2022-08-29 Thread Bob Sneidar via use-livecode
As long as Mathesar is happy, I'm happy.

Bob S


On Aug 29, 2022, at 16:11 , Paul Dupuis via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

No a huge priority in the scheme of things, but a "nice to have" sort of thing. 
Does that answer the "why?"

___
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: the script of with line numbers?

2022-08-29 Thread Paul Dupuis via use-livecode

On 8/29/2022 6:58 PM, Mark Wieder via use-livecode wrote:

On 8/29/22 14:36, Paul Dupuis via use-livecode wrote:
Is there a way (an existing function or command in the language or 
IDE) to get the script of an object WITH the line numbers as you see 
them in the IDE script editor?


While some clever solutions have been posted, I gotta ask WHY?



In our applications, we trap the script error dialog and replace the 
default with our own. That dialog lets customers send the 
executionContexts and some other debugging information to us to report 
an error (if one gets by quality/beta testing).


So we get the executionContext that say "error such and such occurred at 
line 342 of some handler". The line number is the line of the whole 
script the handler is in.


When we et the message and log the problem in our instance of Bugzilla, 
one of the 1st things is to look at the script and see what the line of 
code references actually says.


It could reduce a trouble should step to include the line numbers 
programmatically in the error report.


No a huge priority in the scheme of things, but a "nice to have" sort of 
thing. Does that answer the "why?"



___
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: the script of with line numbers?

2022-08-29 Thread Bob Sneidar via use-livecode
That question always reminds me of Mathesar when he discoveres that Commander 
Peter Quincy Taggert has been lying all along. :-)

Bob S


On Aug 29, 2022, at 15:58 , Mark Wieder via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On 8/29/22 14:36, Paul Dupuis via use-livecode wrote:
Is there a way (an existing function or command in the language or IDE) to get 
the script of an object WITH the line numbers as you see them in the IDE script 
editor?

While some clever solutions have been posted, I gotta ask WHY?

--
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: the script of with line numbers?

2022-08-29 Thread Mark Wieder via use-livecode

On 8/29/22 14:36, Paul Dupuis via use-livecode wrote:
Is there a way (an existing function or command in the language or IDE) 
to get the script of an object WITH the line numbers as you see them in 
the IDE script editor?


While some clever solutions have been posted, I gotta ask WHY?

--
 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: the script of with line numbers?

2022-08-29 Thread Bob Sneidar via use-livecode
Maybe marginally better:

...
sort it by word 1 of each

Bob S


On Aug 29, 2022, at 14:50 , J. Landman Gay via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On 8/29/22 4:36 PM, Paul Dupuis via use-livecode wrote:
Is there a way (an existing function or command in the language or IDE) to get 
the script of an object WITH the line numbers as you see them in the IDE script 
editor?
OR
Do I just have to do something like:
put the script of tObject into tScript
repeat with i=1 to the number of lines in tScript
  put i &space before line i of tScript
end repeat
Any secret IDE or LCS knowledge welcome. Thank you in advance.

How about:

 get the script of 
 split it by cr
 combine it by cr and tab
 sort it numeric



--
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: the script of with line numbers?

2022-08-29 Thread Bob Sneidar via use-livecode
Correction:

sort it numeric by word 1 of each

Bob S


On Aug 29, 2022, at 14:55 , Bob Sneidar 
mailto:bobsnei...@iotecdigital.com>> wrote:

Maybe marginally better:

...
sort it by word 1 of each

Bob S


On Aug 29, 2022, at 14:50 , J. Landman Gay via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On 8/29/22 4:36 PM, Paul Dupuis via use-livecode wrote:
Is there a way (an existing function or command in the language or IDE) to get 
the script of an object WITH the line numbers as you see them in the IDE script 
editor?
OR
Do I just have to do something like:
put the script of tObject into tScript
repeat with i=1 to the number of lines in tScript
  put i &space before line i of tScript
end repeat
Any secret IDE or LCS knowledge welcome. Thank you in advance.

How about:

 get the script of 
 split it by cr
 combine it by cr and tab
 sort it numeric



--
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: the script of with line numbers?

2022-08-29 Thread J. Landman Gay via use-livecode

On 8/29/22 4:36 PM, Paul Dupuis via use-livecode wrote:
Is there a way (an existing function or command in the language or IDE) to get the script of an 
object WITH the line numbers as you see them in the IDE script editor?


OR

Do I just have to do something like:

put the script of tObject into tScript
repeat with i=1 to the number of lines in tScript
   put i &space before line i of tScript
end repeat

Any secret IDE or LCS knowledge welcome. Thank you in advance.


How about:

  get the script of 
  split it by cr
  combine it by cr and tab
  sort it numeric



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


the script of with line numbers?

2022-08-29 Thread Paul Dupuis via use-livecode
Is there a way (an existing function or command in the language or IDE) 
to get the script of an object WITH the line numbers as you see them in 
the IDE script editor?


OR

Do I just have to do something like:

put the script of tObject into tScript
repeat with i=1 to the number of lines in tScript
  put i &space before line i of tScript
end repeat

Any secret IDE or LCS knowledge welcome. Thank you in advance.



___
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