Re: Your scripts as a flowchart

2023-09-16 Thread Geoff Canyon via use-livecode
Ah, okay, that explains it. In Navigator, *everything* is a script-only
stack behavior. In a few of the substacks there are scripts for a few
template objects or where script-only-stack behaviors were inconvenient (I
don't remember why, honestly).

That has it working, and the resulting diagram is nice. Navigator does a
similar survey (without the visualization, that's a neat trick).

Navigator reports:

302986 characters in
8092 lines in
112 scripts in
885 objects.

ScriptDependencies reports:

341 unique handler names - 407 commands, 124 functions, 1 setProps

regards,

Geoff

On Sat, Sep 16, 2023 at 6:24 PM Andreas Bergendal via use-livecode <
use-livecode@lists.runrev.com> wrote:

> As long as you include all the script-only stacks in the analysis, they
> will be handled.
> The tool will not look for behaviors and auto-include them. Every stack
> that has relevant code must be included manually in the project pane. If
> you have many SoSs, you can quickly add them all by adding the whole folder
> they are in.
>
> How many handlers does the analysis find?
>
> /Andreas
>
>
> > 16 sep. 2023 kl. 22:43 skrev Geoff Canyon via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > I didn't change anything before generating, and the flow chart is
> literally
> > blank -- unless it:
> >
> > 1. scrolls invisibly
> > 2. keeps returning the project name to the upper left while scrolling
> > 3. has *at least* 30 screens' worth of blank space at the top?
> >
> > On Sat, Sep 16, 2023 at 1:35 PM J. Landman Gay via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> That happened to me too with a very long script. To keep everything in
> >> view
> >> there's a lot of white space. Keep scrolling. This happens only if you
> >> have
> >> set it to use unlimited sizing.
> >> --
> >> Jacqueline Landman Gay | jac...@hyperactivesw.com
> >> HyperActive Software | http://www.hyperactivesw.com
> >> On September 16, 2023 11:15:00 AM Geoff Canyon via use-livecode
> >>  wrote:
> >>
> >>> Does it not handle script-only stack behaviors? I get a blank display
> for
> >>> Navigator (which has no code other than SoS behaviors).
> >>>
> >>> gc
>
>
> ___
> 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


Encoding in LC server - the final piece of the puzzle

2023-09-16 Thread Neville Smythe via use-livecode

Ralf wrote
> did you try:
> 
> put header "Content-Type: text/html; charset=" & quote & "UTF-8" & quote
> 
> before sending the output to the client?


That sounds exactly like the incantation I needed.

But I can’t get it to work.

The first 3 lines of my webPage.lc  file are





(Not sure that 3rd line is necessary with HTML5, but presumably it couldn’t 
hurt)

The header suggested just seems to be ignored when LC Server sends the output 
to Apache.  (Tried it with “put new header…” too after I found some 
documentation for the magic spell.) 

The default setting for Apache on Dreamhost is naturally the native encoding 
ISO-8859-1.(Is there any way to override that with htaccess, since all my 
WordPress pages are served as utf-8 already?)

Neville Smythe




___
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: Your scripts as a flowchart

2023-09-16 Thread Andreas Bergendal via use-livecode
As long as you include all the script-only stacks in the analysis, they will be 
handled.
The tool will not look for behaviors and auto-include them. Every stack that 
has relevant code must be included manually in the project pane. If you have 
many SoSs, you can quickly add them all by adding the whole folder they are in.

How many handlers does the analysis find?

/Andreas


> 16 sep. 2023 kl. 22:43 skrev Geoff Canyon via use-livecode 
> :
> 
> I didn't change anything before generating, and the flow chart is literally
> blank -- unless it:
> 
> 1. scrolls invisibly
> 2. keeps returning the project name to the upper left while scrolling
> 3. has *at least* 30 screens' worth of blank space at the top?
> 
> On Sat, Sep 16, 2023 at 1:35 PM J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> That happened to me too with a very long script. To keep everything in
>> view
>> there's a lot of white space. Keep scrolling. This happens only if you
>> have
>> set it to use unlimited sizing.
>> --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>> On September 16, 2023 11:15:00 AM Geoff Canyon via use-livecode
>>  wrote:
>> 
>>> Does it not handle script-only stack behaviors? I get a blank display for
>>> Navigator (which has no code other than SoS behaviors).
>>> 
>>> gc


___
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: Your scripts as a flowchart

2023-09-16 Thread Geoff Canyon via use-livecode
I didn't change anything before generating, and the flow chart is literally
blank -- unless it:

1. scrolls invisibly
2. keeps returning the project name to the upper left while scrolling
3. has *at least* 30 screens' worth of blank space at the top?

On Sat, Sep 16, 2023 at 1:35 PM J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> That happened to me too with a very long script. To keep everything in
> view
> there's a lot of white space. Keep scrolling. This happens only if you
> have
> set it to use unlimited sizing.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On September 16, 2023 11:15:00 AM Geoff Canyon via use-livecode
>  wrote:
>
> > Does it not handle script-only stack behaviors? I get a blank display for
> > Navigator (which has no code other than SoS behaviors).
> >
> > gc
> >
> > On Fri, Sep 15, 2023 at 10:32 AM Andreas Bergendal via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> Hi all!
> >>
> >> Those frequenting the forums may have seen this already, but I thought
> I'd
> >> share it here too now:
> >>
> >> If you want to see a graphic map of the inter-relations of all the
> >> handlers in the scripts of your LiveCode projects, my tool
> >> ScriptDependencies now features an extremely cool flowchart output
> (using
> >> the Mermaid javascript lib).
> >>
> >> Here’s an example of how a script flowchart can look:
> >>
> https://wheninspace.com/browseranimation/WIS_ScriptDependencies_example.png
> >>
> >> A few easy steps to test it on your own scripts:
> >>
> >> 1) Download ScriptDependencies here:
> >> https://github.com/wheninspace/WIS_ScriptDepedencies/releases/latest
> >>
> >> 2) Open the stack, click the top left cog wheel and add at least one
> stack
> >> (that has at least some handlers calling other handlers) to a project.
> >> 3) Close the project pane and click "Start mapping and analysis”.
> >> 4) Click ”Create flowchart”. Boom! :)
> >>
> >> On Mac, the browser widget can display the flowchart in-stack, enabling
> >> some interactivity (click a node to highlight the arrows to and from
> it).
> >> On Windows and Linux, where the browser widget has, er... room for
> >> improvement…, the flowchart is instead displayed in an external browser
> >> window (minus interactivity).
> >>
> >> My intention with ScriptDependencies is to provide a code analysis and
> >> live documentation tool (of some kind) for LiveCode projects. I need it
> >> myself for some big LC projects, and thought it might be useful also for
> >> other LC devs.
> >>
> >> The tool has been thoroughly tested by LC veterans like bn (Bernd),
> jacque
> >> (Jacqueline) and mwieder (Mike), who have all provided invaluable
> feedback
> >> and improvement suggestions, bringing the tool up to quite a
> professional
> >> level.
> >>
> >> I hope you’ll find use for it - or at least enjoy seeing your scripts
> >> presented as a bouquet of flowers, a piece of art! :)
> >>
> >> Any feedback is very welcome!
> >>
> >> /Andreas
> >> ___
> >> 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


Re: Your scripts as a flowchart

2023-09-16 Thread J. Landman Gay via use-livecode
That happened to me too with a very long script. To keep everything in view 
there's a lot of white space. Keep scrolling. This happens only if you have 
set it to use unlimited sizing.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On September 16, 2023 11:15:00 AM Geoff Canyon via use-livecode 
 wrote:



Does it not handle script-only stack behaviors? I get a blank display for
Navigator (which has no code other than SoS behaviors).

gc

On Fri, Sep 15, 2023 at 10:32 AM Andreas Bergendal via use-livecode <
use-livecode@lists.runrev.com> wrote:


Hi all!

Those frequenting the forums may have seen this already, but I thought I'd
share it here too now:

If you want to see a graphic map of the inter-relations of all the
handlers in the scripts of your LiveCode projects, my tool
ScriptDependencies now features an extremely cool flowchart output (using
the Mermaid javascript lib).

Here’s an example of how a script flowchart can look:
https://wheninspace.com/browseranimation/WIS_ScriptDependencies_example.png

A few easy steps to test it on your own scripts:

1) Download ScriptDependencies here:
https://github.com/wheninspace/WIS_ScriptDepedencies/releases/latest

2) Open the stack, click the top left cog wheel and add at least one stack
(that has at least some handlers calling other handlers) to a project.
3) Close the project pane and click "Start mapping and analysis”.
4) Click ”Create flowchart”. Boom! :)

On Mac, the browser widget can display the flowchart in-stack, enabling
some interactivity (click a node to highlight the arrows to and from it).
On Windows and Linux, where the browser widget has, er... room for
improvement…, the flowchart is instead displayed in an external browser
window (minus interactivity).

My intention with ScriptDependencies is to provide a code analysis and
live documentation tool (of some kind) for LiveCode projects. I need it
myself for some big LC projects, and thought it might be useful also for
other LC devs.

The tool has been thoroughly tested by LC veterans like bn (Bernd), jacque
(Jacqueline) and mwieder (Mike), who have all provided invaluable feedback
and improvement suggestions, bringing the tool up to quite a professional
level.

I hope you’ll find use for it - or at least enjoy seeing your scripts
presented as a bouquet of flowers, a piece of art! :)

Any feedback is very welcome!

/Andreas
___
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


Re: Your scripts as a flowchart

2023-09-16 Thread Geoff Canyon via use-livecode
Does it not handle script-only stack behaviors? I get a blank display for
Navigator (which has no code other than SoS behaviors).

gc

On Fri, Sep 15, 2023 at 10:32 AM Andreas Bergendal via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi all!
>
> Those frequenting the forums may have seen this already, but I thought I'd
> share it here too now:
>
> If you want to see a graphic map of the inter-relations of all the
> handlers in the scripts of your LiveCode projects, my tool
> ScriptDependencies now features an extremely cool flowchart output (using
> the Mermaid javascript lib).
>
> Here’s an example of how a script flowchart can look:
> https://wheninspace.com/browseranimation/WIS_ScriptDependencies_example.png
>
> A few easy steps to test it on your own scripts:
>
> 1) Download ScriptDependencies here:
> https://github.com/wheninspace/WIS_ScriptDepedencies/releases/latest
>
> 2) Open the stack, click the top left cog wheel and add at least one stack
> (that has at least some handlers calling other handlers) to a project.
> 3) Close the project pane and click "Start mapping and analysis”.
> 4) Click ”Create flowchart”. Boom! :)
>
> On Mac, the browser widget can display the flowchart in-stack, enabling
> some interactivity (click a node to highlight the arrows to and from it).
> On Windows and Linux, where the browser widget has, er... room for
> improvement…, the flowchart is instead displayed in an external browser
> window (minus interactivity).
>
> My intention with ScriptDependencies is to provide a code analysis and
> live documentation tool (of some kind) for LiveCode projects. I need it
> myself for some big LC projects, and thought it might be useful also for
> other LC devs.
>
> The tool has been thoroughly tested by LC veterans like bn (Bernd), jacque
> (Jacqueline) and mwieder (Mike), who have all provided invaluable feedback
> and improvement suggestions, bringing the tool up to quite a professional
> level.
>
> I hope you’ll find use for it - or at least enjoy seeing your scripts
> presented as a bouquet of flowers, a piece of art! :)
>
> Any feedback is very welcome!
>
> /Andreas
> ___
> 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: Encoding in LC server - the final piece of the puzzle

2023-09-16 Thread Ralf Bitter via use-livecode

Neville, did you try:

put header "Content-Type: text/html; charset=" & quote & "UTF-8" & quote

before sending the output to the client?


Ralf


On 16.09.2023 03:11, Neville Smythe via use-livecode wrote:

With the help of forum readers  I have textEncode/Decode working in LC Server 
so that I can handle file names with ute-8 encoding and talking to mysql in 
tongues.

But now I want to produce html documents including Chinese characters encoded with utf-8, 
using LC Server to output an .lc file to publish on the web. I had naively thought that 
putting in the “” header at the top would do it, but no, LC 
Server apparently serves up html with charset=ISO-8859-1 (the native encoding) declared by 
default, and that overrides the header in the .lc file. The encoding declared was checked 
using "Rex Swains HTTP Viewer”. I am reasonably confident the actual content of the 
file is correct utf-8, since the Chinese glyphs are rendered as garbage ISO-Latin 
characters not as 

The next step was adding a line such as

AddCharset UTF-8 .lc

to .htaccess. No help. I note that other web pages on the server are created by 
WordPress, and they have the charset=utf-8 declared.

I presume I am ignorant of some environment setting which controls what 
HTTPHeader is declared in the output from LCServer? The obvious choice “the 
HTTPHeaders” but that is not the answer it seems.

[I know I can get individual unicode characters to render using html escapes such 
as  even when the  page is declared with a non-unicode encoding, but 
that is not a viable solution here.]

Neville Smythe


___
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