Dictionary rewrite - thoughts, please
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
the question mark
here is a stack that inserts a back script. Click on button "setBackScript" and it will insert the script of button "bBack" into back.
The stack has it's destroyStack property set so closing the stack will remove it from memory. You could easily trigger the insertion in a opencard script and then close the stack right away. Or make it a plugin that start when LC starts and add a script that it closes right away.
Now type a ? and a keyword in quotes into the message box. It will put the unformatted data for the keyword into the message box.
Currently it retuns the
Display name
Syntax
Summary
Example
Description
Kind regards
Bernd
here is a stack that inserts a back script. Click on button "setBackScript" and it will insert the script of button "bBack" into back.
The stack has it's destroyStack property set so closing the stack will remove it from memory. You could easily trigger the insertion in a opencard script and then close the stack right away. Or make it a plugin that start when LC starts and add a script that it closes right away.
Now type a ? and a keyword in quotes into the message box. It will put the unformatted data for the keyword into the message box.
Currently it retuns the
Display name
Syntax
Summary
Example
Description
Kind regards
Bernd
- Attachments
-
- DictFromMsg.livecode.zip
- (1.08 KiB) Downloaded 747 times
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Sorry, I was wrong, the stack that inserts a handler for the ? "Keyword" from the dictionary has to stay open for the backscript to work.
Actually this is my first attempt at a back script, usually I try to stay inside my stacks.
Kind regards
Bernd
Actually this is my first attempt at a back script, usually I try to stay inside my stacks.
Kind regards
Bernd
Re: Dictionary rewrite - thoughts, please
Amazing Bernd!
Many, many thanks for posting this utility.
Later, today, I will install it in Windows
and Linux.
Al
Many, many thanks for posting this utility.
Later, today, I will install it in Windows
and Linux.
Al
-
- VIP Livecode Opensource Backer
- Posts: 348
- Joined: Sun Jul 03, 2011 2:04 am
- Location: Gulf Breeze, Florida
Re: Dictionary rewrite - thoughts, please
Nice work Bernd! Thanks for sharing.
Cheers,
Keith "Boo" Long
Gulf Breeze, Florida
Cheers,
Keith "Boo" Long
Gulf Breeze, Florida
Re: Dictionary rewrite - thoughts, please
Works great in LC 8 and 9!
How could I retrieve a list of all entries in the dictionary,
like some kind of index?
How could I retrieve a list of all entries in the dictionary,
like some kind of index?
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Hi Alejandro,
Kind regards
Bernd
Code: Select all
local sAllArray
on mouseUp
getNameListFromDict
end mouseUp
on getNameListFromDict
dispatch ideDocsFetchLCSEntries() to stack "revIDEDocumentationLibrary"
put the result into sAllArray
if sAllArray is not an array then
put "something went wrong" && the milliseconds
exit getNameListFromDict
end if
repeat for each key aKey in sAllArray
put sAllArray[aKey]["display name"] & cr after tCollect
end repeat
delete last char of tCollect -- a return
sort tCollect
put tCollect
end getNameListFromDict
Bernd
Re: Dictionary rewrite - thoughts, please
Works great!
Thanks a lot
Thanks a lot
Re: Dictionary rewrite - thoughts, please
So, Bernd, are you continuing to run with this? I so, I'm going to cross it off my list and just make suggestions, as they come up. I like where it's going, and you've certainly made more progress, more quickly than I could have.
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Mikey,
here is version 0.6 of the attempt...
It now has linked text (the cursor changes to hand over the links) but no history yet.
Formatting the raw data, especially links, took me a while and is not perfect yet.
Double clicking on the details field now pops up the details field to full height and low an behold, there is at the right upper corner a X that you can click to hide it. Also ESC will hide the popped up details field.
You might want to give this a try.
Comments as always welcome.
Kind regards
Bernd
here is version 0.6 of the attempt...
It now has linked text (the cursor changes to hand over the links) but no history yet.
Formatting the raw data, especially links, took me a while and is not perfect yet.
Double clicking on the details field now pops up the details field to full height and low an behold, there is at the right upper corner a X that you can click to hide it. Also ESC will hide the popped up details field.
You might want to give this a try.
Comments as always welcome.
Kind regards
Bernd
- Attachments
-
- DictionarySplitter_0_6.livecode.zip
- (47.63 KiB) Downloaded 747 times
Re: Dictionary rewrite - thoughts, please
1) At least on a Mac, there is a rendering issue for the top line when you open. See attached
2) When I double-click on an entry, I get full-window, but the "X" only shows the first time I do that (beyond that, no "X"), and the esc key doesn't work unless I click inside the full-sized field, first.
This is looking pretty sweet!
2) When I double-click on an entry, I get full-window, but the "X" only shows the first time I do that (beyond that, no "X"), and the esc key doesn't work unless I click inside the full-sized field, first.
This is looking pretty sweet!
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Hi all,
here is a new version of a dictionary.
I think I got the topLine issue nailed and also the popUp / ESC button for the details field on double-click.
The links now work better but still not allright, I probably have to rewrite the parsing for the click-links.
Problems are links on details to dictionary entries for <, >, <>, <=, >= which are hard to tell from the mark up signs in the raw data.
New is a History of visited entries. I hope it is self explanatory.
Kind regards
Bernd
here is a new version of a dictionary.
I think I got the topLine issue nailed and also the popUp / ESC button for the details field on double-click.
The links now work better but still not allright, I probably have to rewrite the parsing for the click-links.
Problems are links on details to dictionary entries for <, >, <>, <=, >= which are hard to tell from the mark up signs in the raw data.
New is a History of visited entries. I hope it is self explanatory.
Kind regards
Bernd
Re: Dictionary rewrite - thoughts, please
Works great in Windows!
Just one thing: I could see a small square after every line.
This small square was not visible in previous versions.
By the way, How could I read in a single text document
every example of all Dictionary entries?
I would like to test all these examples using a field
with a script like: "do the clickline of fld "dictionaryexamples"
Just one thing: I could see a small square after every line.
This small square was not visible in previous versions.
By the way, How could I read in a single text document
every example of all Dictionary entries?
I would like to test all these examples using a field
with a script like: "do the clickline of fld "dictionaryexamples"
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Thanks Alejandro,
What you see in Windows a small square is an "invisible" (at least on a Mac) sign I started to use to mark sections. When I rewrite the parsing I will probably get rid of it.
Please explain what you have in mind.
Kind regards
Bernd
What you see in Windows a small square is an "invisible" (at least on a Mac) sign I started to use to mark sections. When I rewrite the parsing I will probably get rid of it.
I don't understand what exactly you are trying to do. Do you want to test the script examples? They are not all functional. It is planned that all examples will compile and work. Devin Asay is doing a great job reworking the dictionary and also the examples.By the way, How could I read in a single text document
every example of all Dictionary entries?
I would like to test all these examples using a field
with a script like: "do the clickline of fld "dictionaryexamples"
Please explain what you have in mind.
Kind regards
Bernd
Re: Dictionary rewrite - thoughts, please
Someone is having waaaaaaaaaay too much fun with this.
Looks good and works good on a Mac. The previous bugs all seem to be gone.
Looks good and works good on a Mac. The previous bugs all seem to be gone.
-
- Posts: 52
- Joined: Mon Jun 24, 2013 4:10 am
- Location: Hawaii
- Contact:
Re: Dictionary rewrite - thoughts, please
I've been away working on editorial/print production... just came back here. Wow! thanks Bernd for your hard work... working here on my Mac! R U planning filters in the empty column on the left? Where we only see 'theme switcher now.
IN most of my in house apps I use a double search/filter routine, as I find this help offer some "fuzzy logic" to searching. it is very often the case that we don't know exactly what we are looking for, so i will build in very "loose" search params where searchString1 filters all results and then searchString2 filters those results, This is better most users than Boolean "AND" or "OR in a single search text field, both of these get too many extraneous results.
I give users two fields. and the search goes through all text e.g. enter "mobile" in searchstring1 and "transition" in searchString2
if you really don't know what you are looking for you can do short terms like "mobile" "vis" and the would bring up all entries where those two strings are present *anywhere* in the entry.
IN most of my in house apps I use a double search/filter routine, as I find this help offer some "fuzzy logic" to searching. it is very often the case that we don't know exactly what we are looking for, so i will build in very "loose" search params where searchString1 filters all results and then searchString2 filters those results, This is better most users than Boolean "AND" or "OR in a single search text field, both of these get too many extraneous results.
I give users two fields. and the search goes through all text e.g. enter "mobile" in searchstring1 and "transition" in searchString2
if you really don't know what you are looking for you can do short terms like "mobile" "vis" and the would bring up all entries where those two strings are present *anywhere* in the entry.