DASH docset updated to LC 10 dp4 what yoy
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
DASH docset updated to LC 10 dp4 what yoy
Hi everyone,
I have updated the DASH docset for LC 10 dp4 and loaded it to the Kapelli site.
LCD10 dp4 had some improvements to dictioany entries.
You should be able to update your current version.
Interestingly, if you are using the iOS version of DASH it doesn’t seem to appear under the list of user contributions but if you have auto updates turned on, DASH recognizes it has been updated and offers to download it. Very strange.
BTW I make these using the make docset stack I have on the sample stacks site. Weirdly when I do the resulting docset has no syntax coloring. I then spend a while trying to trace the code to see what’s going on. After a few checks here and there (has the underlying call to the IDE function charged?)
I run it again and the color is back!!
If anyone has used the make docset stack and feels like investigating please let me know what you find.
I have updated the DASH docset for LC 10 dp4 and loaded it to the Kapelli site.
LCD10 dp4 had some improvements to dictioany entries.
You should be able to update your current version.
Interestingly, if you are using the iOS version of DASH it doesn’t seem to appear under the list of user contributions but if you have auto updates turned on, DASH recognizes it has been updated and offers to download it. Very strange.
BTW I make these using the make docset stack I have on the sample stacks site. Weirdly when I do the resulting docset has no syntax coloring. I then spend a while trying to trace the code to see what’s going on. After a few checks here and there (has the underlying call to the IDE function charged?)
I run it again and the color is back!!
If anyone has used the make docset stack and feels like investigating please let me know what you find.
Re: DASH docset updated to LC 10 dp4 what yoy
Thanks James - very much appreciated!
I’ve been running your stack to create documentation for the newer LC versions and just assumed lack of syntax colouring was par for the course! (Neither can I say that’s an issue, as code fragments tend to be quite short - I probably prefer it uncoloured!).
I’ll switch to yours as soon as back from work… and at some point if time permits will have a look (though previous looks revealed a complexity that compelled not to get involved in!)
I presume the colouring is based on source data from LC and this includes CSS or some such? How does colouring work with dark mode etc in Dash.app?
S.
I’ve been running your stack to create documentation for the newer LC versions and just assumed lack of syntax colouring was par for the course! (Neither can I say that’s an issue, as code fragments tend to be quite short - I probably prefer it uncoloured!).
I’ll switch to yours as soon as back from work… and at some point if time permits will have a look (though previous looks revealed a complexity that compelled not to get involved in!)
I presume the colouring is based on source data from LC and this includes CSS or some such? How does colouring work with dark mode etc in Dash.app?
S.
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: DASH docset updated to LC 10 dp4 what yoy
Hi stam,
I use a function fro the script editor that applies syntax coloring to the contents of a field. This works fine, but somewhere later on something happens that removes all the color tags. I actually convert all the color tags to css entries (so if you change the css definitions you can change the colors. There is a button to access and edit that.)
As for dark mode I don’t think the iOS version hours it.
The coloring still looks ok, at least to me.
I use a function fro the script editor that applies syntax coloring to the contents of a field. This works fine, but somewhere later on something happens that removes all the color tags. I actually convert all the color tags to css entries (so if you change the css definitions you can change the colors. There is a button to access and edit that.)
As for dark mode I don’t think the iOS version hours it.
The coloring still looks ok, at least to me.
Re: DASH docset updated to LC 10 dp4 what yoy
James - whatś this all about? I am new to this area - web links to get started?
Rodney
Rodney
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: DASH docset updated to LC 10 dp4 what yoy
DASH is a documentation/snippet manger details can be found -> https://kapeli.com/dash
DASH allows user contributed documentation sets (docsets) and I provide one for LC.
i also have a stack in the user stacks section (available from the help menu in LC’s IDE) which constructs the LC docset.
DASH allows user contributed documentation sets (docsets) and I provide one for LC.
i also have a stack in the user stacks section (available from the help menu in LC’s IDE) which constructs the LC docset.
Re: DASH docset updated to LC 10 dp4 what yoy
James beat me to it - but in more detail:
Dash an API documentation software and snippet manager for MacOS. Zeal and Velocity are apps that do the same (with the same docsets) on Win/Linux.
James has very generously both created a stack that creates the required docset and also a reader for this (available in sample stacks), but Dash works best - well worth the price of paid software for me. James also generously provides a periodically updated docset to Dash, which you can just subscribe to from within the app.
https://kapeli.com/dash -- Mac only, paid (or available on a Setapp subscription, which is what i do as i use many of the apps there).
https://velocity.silverlakesoftware.com - nagware but can be used free (Windows only)
https://zealdocs.org - free, Win/Linux
Dash is like a super-powered Dictionary but for any number of languages and with many extra features (eg being able to sub-search APIs, really handly on long ones like the Data Grid). Have a look at the Dash website to get a better idea.
Re: DASH docset updated to LC 10 dp4 what yoy
Thanks James - i have interest in this as i'm working on a little helper app that generates script to add to my stacks - Mark was kind enough to post an example of how to auto-indent this, curious to see if i can colour it as well - can you post the function?
Sadly i think the author must have removed the iOS version from the appstore - or at least i can't find it. But in any case, I was referring to the desktop version of Dash, which is what i use daily and does use dark mode...
I can confirm the colouring works fine now - i'm sure that at some point previously it all went a monochrome dark purple, which was also fine.
Interestingly, the colouring is respected in Dark mode as well - black text becomes white etc. I guess that's down to clever CSS?
Many thanks once again for providing this,
Stam
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: DASH docset updated to LC 10 dp4 what yoy
Hi stam,
The function I use:
I lifted the call from the scriptColorize command located in "com.livecode.scripteditor.behavior.editorcommon"
Don't know where the actual function itself is.
The function I use:
Code: Select all
function colorscript ptoken
--use SE utils to colorise syntax
--ptoken is the syntax to colorise
-- color field -> fld "fToColor"
local thtml
put ptoken into fld "fToColor"
_internal script colorize char 1 to (the number of chars in field "fToColor") of field "fToColor"
--now need to convert the html to use css
put the htmltext of fld "fToColor" into thtml
--return thtml
--from the IDE
replace "<font color=" & quote & "#000000" & quote & ">" with "<span class=" & quote & "normal" & quote & ">" in thtml
replace "<font color=" & quote & "#7F7F00" & quote & ">" with "<span class=" & quote & "command" & quote & ">" in thtml
replace "<font color=" & quote & "#007F7F" & quote & ">" with "<span class=" & quote & "property" & quote & ">" in thtml
replace "<font color=" & quote & "#007F00" & quote & ">" with "<span class=" & quote & "comment" & quote & ">" in thtml
replace "<font color=" & quote & "#7F007F" & quote & ">" with "<span class=" & quote & "function" & quote & ">" in thtml
replace "<font color=" & quote & "#7F007F" & quote & ">" with "<span class=" & quote & "keyword" & quote & ">" in thtml
replace "<font color=" & quote & "#00007F" & quote & ">" with "<span class=" & quote & "normal" & quote & ">" in thtml
replace "</font>" with "</span>" in thtml
--return colorised text
return thtml
end colorscript
Code: Select all
command scriptColorize pOption, pValue
if pOption is "script" then
_internal script colorize char 1 to (the number of chars of field "Script" of me) of field "Script" of me
else if pOption is "line" then
_internal script colorize line pValue to pValue of field "Script" of me
end if
end scriptColorize
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: DASH docset updated to LC 10 dp4 what yoy
_internal is a catch-all entry point in the engine which allows the team to quickly implement things they need C speed for in the IDE but are too specialized to be worth building out a parsing infrastructure for.
I've been trying to find where the "script colorize" directive obtains its lookup table. Your code suggests you didn't find it either.
If anyone here finds a script in the IDE that sets the colors _internal uses it seems a few of us could use that.
I've been trying to find where the "script colorize" directive obtains its lookup table. Your code suggests you didn't find it either.
If anyone here finds a script in the IDE that sets the colors _internal uses it seems a few of us could use that.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 125
- Joined: Tue Apr 11, 2006 7:02 pm
- Location: Seattle, WA
- Contact:
Re: DASH docset updated to LC 10 dp4 what yoy
You can drop this code into a front script.
Code: Select all
command seColorizationLoadScheme pScheme, @rPreferencesArray
if not the hilite of button "Dark Theme" of card "development tools" of stack "DEV TOOLS" then
put "group commands none 73,116,200" & return & \
"group properties none 50,50,50" & return & \
"group functions none 246,127,23" & return & \
"class error none 255,0,0" & return & \
"class singlecomment bold 250,175,190" & return & \
"class multicomment italic 250,175,190" & return & \
"class identifier none 50,50,50" & return & \
"class literal none 50,50,50" & return & \
"class number none 50,50,50" & return & \
"class keyword none 50,50,50" & return & \
"class operator none 50,50,50" & return & \
"class continuation none 50,50,50" & return & \
"keyword command none 50,50,50" & return & \
"keyword private none 50,50,50" & return & \
"keyword on none 155,155,0" & return & \
"keyword end none 155,155,0" & return & \
"keyword if none 155,155,0" & return & \
"keyword then none 155,155,0" & return & \
"keyword else none 155,155,0" & return & \
"keyword function none 155,155,0" & return & \
"keyword setprop none 50,50,50" & return & \
"keyword getprop none 50,50,50" & return & \
"keyword repeat none 155,155,0" & return & \
"keyword switch none 155,155,0" & return & \
"keyword try none 155,155,0" & return & \
"keyword catch none 155,155,0" & return & \
"keyword case none 155,155,0" & return & \
"keyword default none 155,155,0" & return & \
"keyword finally none 155,155,0" & return & \
"keyword next none 155,155,0" & return & \
"keyword ; none 155,155,0" & return & \
"keyword exit none 155,155,0" & return into rPreferencesArray["colorization,config"]
break
pass seColorizationLoadScheme
end if
switch pScheme
case "default"
put "group commands none 173,216,230" & return & \
"group properties none 252,252,252" & return & \
"group functions none 246,127,23" & return & \
"class error none 255,0,0" & return & \
"class singlecomment bold 250,175,190" & return & \
"class multicomment italic 250,175,190" & return & \
"class identifier none 252,252,252" & return & \
"class literal none 252,252,252" & return & \
"class number none 252,252,252" & return & \
"class keyword none 252,200,252" & return & \
"class operator none 252,252,252" & return & \
"class continuation none 252,252,252" & return & \
"keyword command none 252,252,252" & return & \
"keyword private none 252,252,252" & return & \
"keyword on none 255,255,0" & return & \
"keyword end none 255,255,0" & return & \
"keyword if none 255,255,0" & return & \
"keyword then none 255,255,0" & return & \
"keyword else none 255,255,0" & return & \
"keyword function none 255,255,0" & return & \
"keyword setprop none 252,252,252" & return & \
"keyword getprop none 252,252,252" & return & \
"keyword repeat none 255,255,0" & return & \
"keyword switch none 255,255,0" & return & \
"keyword try none 255,255,0" & return & \
"keyword catch none 255,255,0" & return & \
"keyword case none 255,255,0" & return & \
"keyword default none 255,255,0" & return & \
"keyword finally none 255,255,0" & return & \
"keyword next none 255,255,0" & return & \
"keyword ; none 255,255,0" & return & \
"keyword exit none 255,255,0" & return into rPreferencesArray["colorization,config"]
--set the ink of field "Script" of grp "Editor" of cd "Main" of stack "revNewScriptEditor 1" to "blendSrcOver"
break
--COBALT
--IDEAL BACKGROUND: 23,47,82
--IDEAL HILITECOLOR: 62,62,23
case "revolution classic"
put "group commands none 0,255,192" & return & \
"group properties none 255,98,140" & return & \
"group functions none 0,255,192" & return & \
"group structures none 202,5,23" & return & \
"class error none 255,30,0" & return & \
"class singlecomment none 0,160,255" & return & \
"class multicomment none 0,160,255" & return & \
"class identifier none 225,239,255" & return & \
"class literal none 58,217,0" & return & \
"class number none 58,217,0" & return & \
"class keyword none 225,239,255" & return & \
"class operator none 225,239,255" & return & \
"keyword on none 255,255,0" & return & \
"keyword command none 255,255,0" & return & \
"keyword private none 255,255,0" & return & \
"keyword end none 255,255,0" & return & \
"keyword if none 255,255,0" & return & \
"keyword then none 255,255,0" & return & \
"keyword else none 255,255,0" & return & \
"keyword function none 255,255,0" & return & \
"keyword setprop none 226,239,255" & return & \
"keyword getprop none 226,239,255" & return & \
"keyword repeat none 255,255,0" & return & \
"keyword switch none 255,255,0" & return & \
"keyword try none 255,255,0" & return & \
"keyword catch none 255,255,0" & return & \
"keyword case none 255,255,0" & return & \
"keyword default none 255,255,0" & return & \
"keyword finally none 255,255,0" into rPreferencesArray["colorization,config"]
--set the ink of field "Script" of grp "Editor" of cd "Main" of stack "revNewScriptEditor 1" to "blendDifference"
break
case "no colorization"
put "group commands none 0,0,0" & return & \
"group properties none 0,0,0" & return & \
"group functions none 0,0,0" & return & \
"class error none 0,0,0" & return & \
"class singlecomment none 0,0,0" & return & \
"class multicomment none 0,0,0" & return & \
"class identifier none 0,0,0" & return & \
"class literal none 0,0,0" & return & \
"class number none 0,0,0" & return & \
"class keyword none 0,0,0" & return & \
"class operator none 0,0,0" & return & \
"keyword on none 0,0,0" & return & \
"keyword end none 0,0,0" & return & \
"keyword if none 0,0,0" & return & \
"keyword then none 0,0,0" & return & \
"keyword else none 0,0,0" & return & \
"keyword function none 0,0,0" & return & \
"keyword setprop none 0,0,0" & return & \
"keyword getprop none 0,0,0" & return & \
"keyword repeat none 0,0,0" & return & \
"keyword switch none 0,0,0" & return & \
"keyword try none 0,0,0" & return & \
"keyword catch none 0,0,0" & return & \
"keyword case none 0,0,0" & return & \
"keyword default none 0,0,0" & return & \
"keyword finally none 0,0,0" into rPreferencesArray["colorization,config"]
break
end switch
end seColorizationLoadScheme
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: DASH docset updated to LC 10 dp4 what yoy
Thanks, Mark. Where in the IDE is that handler defined? My best sleuthing effort failed after several minutes of poking around.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 125
- Joined: Tue Apr 11, 2006 7:02 pm
- Location: Seattle, WA
- Contact:
Re: DASH docset updated to LC 10 dp4 what yoy
Hi Richard,
You will find it in the stack "revseutilities"
You will find it in the stack "revseutilities"
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: DASH docset updated to LC 10 dp4 what yoy
Thank you, Mark. In hindsight the name makes sense, and knowing what it is makes it easy to look for. I'd tried tracing the call chain, but I'm guessing that function is a callback from _intetnal, or did I miss where it's called from script?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 4028
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: DASH docset updated to LC 10 dp4 what yoy
As a little help in trying to understand the flow of commands in the IDE I made a small stack that checks stacks in LC root/Tools for the occurence of the search term. When using a handler name it will usually find the handler and from where it is called.FourthWorld wrote: ↑Wed Aug 31, 2022 6:22 amThank you, Mark. In hindsight the name makes sense, and knowing what it is makes it easy to look for. I'd tried tracing the call chain, but I'm guessing that function is a callback from _intetnal, or did I miss where it's called from script?
If you have a hit you can click on the line to open the script and it opens the stack at the indicated line number. If there are more than one hit click at the number at the end of the hit to go there.
The stack is not polished but can be useful in a situation like Richard described.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: DASH docset updated to LC 10 dp4 what yoy
Super. Thanks, Bernd.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn