The Dictionary . . . Again

All flavors welcome.
Forum rules
Be kind.
User avatar
tperry2x
Posts: 3488
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: The Dictionary . . . Again

Post by tperry2x »

richmond62 wrote: Thu Apr 10, 2025 10:47 am Thanks.

Something tells me I'm going to have a fairly dirty weekend . . .
Haha, actually - scrap that. Just thought of a far easier way.
Dictionary-ripped.7z
Currently browsing through this on Linux without LCC installed:
Screenshot at 2025-04-10 12-02-35.png
Screenshot at 2025-04-10 12-02-35.png (187.81 KiB) Viewed 4367 times
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Thanks.
-
SShot 2025-04-10 at 14.11.29.png
SShot 2025-04-10 at 14.11.29.png (185.77 KiB) Viewed 4362 times
-
One or 2 Bulgarian tinies in need of some pedagogical stimulation: catch you later. 8-)
-
SShot 2025-04-10 at 14.15.48.png
SShot 2025-04-10 at 14.15.48.png (300.59 KiB) Viewed 4361 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3488
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: The Dictionary . . . Again

Post by tperry2x »

Dark mode version available here too.
Screenshot at 2025-04-10 13-09-53.png
Screenshot at 2025-04-10 13-09-53.png (184.19 KiB) Viewed 4357 times
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

I am seriously smashed on a combination of bier Dunkel Weiss and Bulgarian Mastika that NOTHING is likely to happen преди събота so between Anglian dialect (pace 'biggin') and what my gowfer said, "You should get totally drunk once a year so know what to avoid the rest of the time/" (wise man that) . . . there wannae much forthcoming until the day eftir Palm Sunday. :lol:

Never, if you have any sense (which I, quite objously, do not have) mix German alcohol with Bulgarian alcohol. 8-)
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Why does OXT "Fat" RC5 have a browser widget and OXT Lite 1.10 does NOT?

Both on MacOS 12.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Pug Ugly . . . 8-)
-
Screenshot 2025-04-11 at 14.03.26.png
Screenshot 2025-04-11 at 14.03.26.png (170.08 KiB) Viewed 4150 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3488
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: The Dictionary . . . Again

Post by tperry2x »

richmond62 wrote: Fri Apr 11, 2025 10:10 am Why does OXT "Fat" RC5 have a browser widget and OXT Lite 1.10 does NOT?

Both on MacOS 12.
Have you checked to see if it's turned off?
Preferences > Compatibility
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

With a quick peep at a textField I'm off to bed . . .
-
Screenshot 2025-04-11 at 21.58.12.png
Screenshot 2025-04-11 at 21.58.12.png (178.41 KiB) Viewed 4095 times
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2795
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: The Dictionary . . . Again

Post by OpenXTalkPaul »

OK I'm going to go through this one more time...
The way the LC Team setup the Browser Widget version of the Dictionary is probably more complicated than it needs to be but here it is:

1) In the 'Engine' Repo (https://github.com/OpenXTalk-org/OpenXT ... 963.1/docs) there's category folders full of .lcdocs that contain one (can contain more) entry destined for the Dictionary. LCDOC is a MARKDOWN format, a system similar to what can be used in place of HTML on sites like GitHub INSTEAD of using HTML. The lcdoc markdown a very simple format, readable as a plain-text document.

Here is the source .lcdoc for 'the machine' from here
https://github.com/OpenXTalk-org/OpenXT ... hine.lcdoc:

Code: Select all

Name: machine

Type: function

Syntax: the machine

Syntax: machine()

Summary:
<return|Returns> the type of hardware the <application> is running on.

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Example:
the machine

Example:
if the machine contains "Powerbook" then checkBattery

Returns (enum):
The <machine> <function> <return|returns> a <string>.

-   x86: windows 32 bit based system
-   x86_64: windows 64 bit based system
-   iPod Touch: the device is one of the iPod Touch models
-   iPhone: the device is one of the iPhone models
-   iPhone Simulator: the device is a simulated iPhone
-   iPad: the device is the iPad
-   iPad Simulator: the device is a simulator iPad


Description:
Use the <machine> function to detect what type of system your
application is running on.

On Mac OS systems, the <machine> <function> uses the Gestalt() system
call to determine the machine type.

On Unix systems, the <machine> <function> uses the uname() system
function. 

On Android devices, the <machine> <function> returns the manufacturer's
name for the device. For example, if running on a Google Nexus One, the
string is "Nexus One".

References: function (control structure), processor (function),
application (glossary), return (glossary), string (keyword)
2) The Markdown (which often have a '.md' filename extension) simple-tagged texts are then typically converted into normal HTML by some sort of tooling. In the case of our inherited IDE that tool is the revDocParser (I can't check the exact filename at the moment) IDE script.

3) At first revDocParser converts the contents of those .lcdoc files into keyed entries in an sqlite DB that it creates. The 'keys' of those entrees are the first word in a line that has a colon after it. So "Type:" is going to have something like 'function', command, message, property, glossary, etc. after it, and that will become the value for the key/value pair. I made a list somewhere of the valid keys that can be used (I don't think any of them are required), the keys are like Syntax:, Summary:, Parameters:, Description:, etc. Some with some inline entrees such as Name: or Parameters: If the key is missing the revDocsParser is smart enough to try to guess what parameters a function expects (based on the handler it documents) and may automatically add that info to the entree in the database when parsing inline docs.

4) That database is then used to generate javascript, entrees re-encoded as JSON data that is then used to format and display as HTML in the Browser Widget.

5) The IDE includes a library for getting entries from the Dictionary Database.
I used the revDocsParser to extract the inline- documentation from the IDE Docs library, here is a list of functions that it includes:
ideDocsFetchExtensionData function ideDocsFetchExtensionData(pID,pEntryName)
ideDocsFetchExtensionDataOfType function ideDocsFetchExtensionDataOfType(pID,pEntryName,pType)
ideDocsFetchExtensionElementOfType function ideDocsFetchExtensionElementOfType(pID,pEntryName,pType,pElement)
ideDocsFetchExtensionElementsOfType function ideDocsFetchExtensionElementsOfType(pID,pType)
ideDocsFetchExtensionEntries function ideDocsFetchExtensionEntries(pID)
ideDocsFetchLCBData function ideDocsFetchLCBData(pEntryName)
ideDocsFetchLCBDataOfType function ideDocsFetchLCBDataOfType(pEntryName,pType)
ideDocsFetchLCBElementOfType function ideDocsFetchLCBElementOfType(pEntryName,pType,pElement)
ideDocsFetchLCBElementsOfType function ideDocsFetchLCBElementsOfType(pType)
ideDocsFetchLCBEntries function ideDocsFetchLCBEntries()
ideDocsFetchLCSData function ideDocsFetchLCSData(pEntryName)
ideDocsFetchLCSDataOfType function ideDocsFetchLCSDataOfType(pEntryName,pType)
ideDocsFetchLCSElementOfType function ideDocsFetchLCSElementOfType(pEntryName,pType,pElement)
ideDocsFetchLCSElementsOfType function ideDocsFetchLCSElementsOfType(pType)
ideDocsFetchLCSEntries function ideDocsFetchLCSEntries()
ideDocsFetchLibraryEntries function ideDocsFetchLibraryEntries(pLibraryName)
ideDocsFetchLibraryNames function ideDocsFetchLibraryNames()
ideDocsFetchScriptData function ideDocsFetchScriptData(pEntryName)
Functions like ideDocsFetchScriptData(pEntryName) are used in the scriptEditor for that 'mini-docs' display in the lower pane. If I recall correctly these handlers return a keyed Array that can then be used to format THE style and then you can display the data anyway you like.

I suspect that Tom's conversion missed some keys like Parameters: or is missing some things the revDocs parser infers from the handler it's documenting (if it's 'inline' Docs). Or perhaps he didn't realize some of more nuanced issues about parsing those .lcdoc files, like that an entree can have multiple 'sub-keys', for example if a function takes multiple parameters each parameter is it's own sub-key of the 'Parameters:' key , like other keys it should be separated by a line-break and full empty line before the next line that starts with a key.

This system seems a bit convoluted to me, but that's the way it was setup when we got the thing.
The modified dictionary that includes extra docs for things like the IDE library is here:
https://openxtalk-org.github.io/OpenXTa ... ictionary/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Not perfect: but it does display MORE data than . . .
-
SShot 2025-04-14 at 13.08.11.png
SShot 2025-04-14 at 13.08.11.png (69.51 KiB) Viewed 3501 times
Attachments
Richard III.oxtstack
(4.01 MiB) Downloaded 75 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

If anyone is wondering why Richard III, that is because the short version of Richard is Dick (= Dictionary).

Of course Shakepeare's version of Richard III was the best, and Vincent Price's take on that (in Theatre of Blood) just rocked:
-
https://youtu.be/9RwLnkaIwt4
Attachments
SShot 2025-04-14 at 15.20.16.png
SShot 2025-04-14 at 15.20.16.png (212.58 KiB) Viewed 3436 times
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2795
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: The Dictionary . . . Again

Post by OpenXTalkPaul »

richmond62 wrote: Mon Apr 14, 2025 10:10 am Not perfect: but it does display MORE data than . . .
-
SShot 2025-04-14 at 13.08.11.png
The loop in your search fld "ZZZ" is slow and makes the message queue get clogged up with pending new loops as one types their search word.
The filter command is much faster for this kind of thing, and Perl regex expressions can be used to search.

This worked well for me:

Code: Select all

on keyDown KP
   put KP after me -- fld "ZZZ"
   lock screen
   put empty into fld "xlist"
   filter lines of fld "FLIST" with "*" & me & "*" into fld "xlist"
   unlock screen
end keyDown

on backspaceKey
   lock screen
   delete the last char of me -- of fld "ZZZ"
   put empty into fld "xlist"
   filter lines of fld "FLIST" with "*" & me & "*" into fld "xlist"
   unlock screen
end backspaceKey
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Thank you very much. 8-)
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Right: a loooong day and so forth.

However, will implement that script improvement & tweak the Reload button tomorrow.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Good Morning:

1. Implemented Paul's more efficient filter script in the search field.

2. Tweaked the RELOAD button to work more quickly.

3. Added formatting information for 'constant' and 'command'.
-
SShot 2025-04-15 at 10.46.49.png
SShot 2025-04-15 at 10.46.49.png (176.81 KiB) Viewed 2826 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

SShot 2025-04-15 at 10.51.32.png
SShot 2025-04-15 at 10.51.32.png (15.71 KiB) Viewed 2825 times
-
SShot 2025-04-15 at 10.51.45.png
SShot 2025-04-15 at 10.51.45.png (15.96 KiB) Viewed 2825 times
-
This stack takes up a vast area of screen space (1500 pixels wide): quite obviously it can be shrunk. 8-)
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

I have used the RELOAD button:
-
SShot 2025-04-15 at 10.58.40.png
SShot 2025-04-15 at 10.58.40.png (15.35 KiB) Viewed 2820 times
-
To load the documentation files at:

OpenXTalk Lite.app/Contents/Tools/Documentation/html_viewer/resources/data/api/exports/builder/resaved

(MacOS 15)

The button can be used to reload that set of Dictionary data in the event that its contents are edited or added to, or to load an entirely different data set.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Good Afternoon.

* Added formatting information for 'keyword'.
-
SShot 2025-04-15 at 15.42.22.png
SShot 2025-04-15 at 15.42.22.png (20.39 KiB) Viewed 2609 times
Attachments
Richard III.oxtstack
(4.01 MiB) Downloaded 56 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

Now I'm a bit stuck . . .
-
Screenshot 2025-04-16 at 18.33.34.png
Screenshot 2025-04-16 at 18.33.34.png (97.17 KiB) Viewed 1154 times
-
as, while this is all very sexy and so on . . .

in a perfect world two of the lines should be colourised according to my scriptEditor preferences . . .

Including this line in the formatting script:
-
Screenshot 2025-04-16 at 18.37.19.png
Screenshot 2025-04-16 at 18.37.19.png (162.77 KiB) Viewed 1154 times
-
does colourise the WHOLE text (a bit silly really) according to the settings in my preferences stack, subsequent routines to insert images and colourise specific terms make that colourisation disappear again.

including that line after subsequent routines to insert images and colourise specific terms colourises everything as per the scriptEditor setting, but wipes out previous colourisations,
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5232
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: The Dictionary . . . Again

Post by richmond62 »

And so it goes:
-
Screenshot 2025-04-16 at 20.31.08.png
Screenshot 2025-04-16 at 20.31.08.png (27.07 KiB) Viewed 1024 times
-
Screenshot 2025-04-16 at 20.57.20.png
Screenshot 2025-04-16 at 20.57.20.png (476.6 KiB) Viewed 1024 times
-
Minimise, Maximise, Drop-Down Menu.
https://richmondmathewson.owlstown.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests