Dictionary rewrite - thoughts, please

This forum is a working group for community contributors to the LiveCode IDE included in the main LiveCode distribution.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Re: Dictionary rewrite - thoughts, please

Postby bn » Wed Feb 15, 2017 6:01 pm

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
Attachments
DictFromMsg.livecode.zip
(1.08 KiB) Downloaded 22 times
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3154
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Dictionary rewrite - thoughts, please

Postby bn » Wed Feb 15, 2017 7:06 pm

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
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3154
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Dictionary rewrite - thoughts, please

Postby capellan » Wed Feb 15, 2017 8:35 pm

Amazing Bernd! :D

Many, many thanks for posting this utility.
Later, today, I will install it in Windows
and Linux.

Al
capellan
 
Posts: 290
Joined: Wed Aug 15, 2007 11:09 pm

Re: Dictionary rewrite - thoughts, please

Postby keithglong » Fri Feb 17, 2017 12:18 am

Nice work Bernd! Thanks for sharing.

Cheers,

Keith "Boo" Long
Gulf Breeze, Florida
keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 337
Joined: Sun Jul 03, 2011 2:04 am
Location: Gulf Breeze, Florida

Re: Dictionary rewrite - thoughts, please

Postby capellan » Fri Feb 17, 2017 12:28 am

Works great in LC 8 and 9! :D

How could I retrieve a list of all entries in the dictionary,
like some kind of index?
capellan
 
Posts: 290
Joined: Wed Aug 15, 2007 11:09 pm

Re: Dictionary rewrite - thoughts, please

Postby bn » Fri Feb 17, 2017 1:06 am

Hi Alejandro,

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


Kind regards
Bernd
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3154
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Dictionary rewrite - thoughts, please

Postby capellan » Fri Feb 17, 2017 6:31 am

Works great! :D
Thanks a lot
capellan
 
Posts: 290
Joined: Wed Aug 15, 2007 11:09 pm

Re: Dictionary rewrite - thoughts, please

Postby Mikey » Sat Feb 18, 2017 1:02 pm

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.
Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 484
Joined: Fri Jun 27, 2008 9:00 pm

Re: Dictionary rewrite - thoughts, please

Postby bn » Sat Feb 18, 2017 5:11 pm

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
Attachments
DictionarySplitter_0_6.livecode.zip
(47.63 KiB) Downloaded 20 times
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3154
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Dictionary rewrite - thoughts, please

Postby Mikey » Sat Feb 18, 2017 7:29 pm

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!
Attachments
Screen Shot 2017-02-18 at 13.25.22.png
Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 484
Joined: Fri Jun 27, 2008 9:00 pm

Re: Dictionary rewrite - thoughts, please

Postby bn » Wed Feb 22, 2017 10:05 pm

Hi all,

here is a new version of a dictionary.

newVersion.png
for those that don't find the attachment below
newVersion.png (6.48 KiB) Viewed 407 times


DictionarySplitter_0_7_5_2.livecode.zip
(51.24 KiB) Downloaded 50 times



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
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3154
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Dictionary rewrite - thoughts, please

Postby capellan » Wed Feb 22, 2017 10:47 pm

Works great in Windows! :D
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"
capellan
 
Posts: 290
Joined: Wed Aug 15, 2007 11:09 pm

Re: Dictionary rewrite - thoughts, please

Postby bn » Wed Feb 22, 2017 11:20 pm

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.

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"


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.

Please explain what you have in mind.

Kind regards
Bernd
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3154
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Dictionary rewrite - thoughts, please

Postby Mikey » Thu Feb 23, 2017 3:12 am

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.
Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 484
Joined: Fri Jun 27, 2008 9:00 pm

Re: Dictionary rewrite - thoughts, please

Postby Brahmanathaswami » Thu Feb 23, 2017 3:45 am

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.
Brahmanathaswami
 
Posts: 46
Joined: Mon Jun 24, 2013 4:10 am
Location: Hawaii

PreviousNext

Return to IDE Contributors

Who is online

Users browsing this forum: No registered users and 2 guests