Dictionary rewrite - thoughts, please
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: Dictionary rewrite - thoughts, please
I have just modified Bernd's last upload to include parameter and value entries of the dictionary items. eg, see entry for "textencode"
All the changes were in the behaviour of the Modfield, btn "behavMTF".
James
All the changes were in the behaviour of the Modfield, btn "behavMTF".
James
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Hi James,
that looks good. I was hesitating about adding this because I was pondering how to best display parameter and values as tables.
But this might work just as well. We'll have to see how it works with LCB dictionary. LCB dictionary makes heavy use of tabular display.
Interestingly "Field" (object) has more entries in Livecode Dictionary than in the community dictionary.
Gee, and I thought my code was so convoluted that it was kind of encrypted..
Could you please use strict compilation mode for code changes i.e. declare all variables, thank you. And also please prepend your local variables with t and script local variables with s. That way it the scope of the variale is immediately obvious.
Thanks for this very useful addition
Kind regards
Bernd
that looks good. I was hesitating about adding this because I was pondering how to best display parameter and values as tables.
But this might work just as well. We'll have to see how it works with LCB dictionary. LCB dictionary makes heavy use of tabular display.
Interestingly "Field" (object) has more entries in Livecode Dictionary than in the community dictionary.
Gee, and I thought my code was so convoluted that it was kind of encrypted..
Could you please use strict compilation mode for code changes i.e. declare all variables, thank you. And also please prepend your local variables with t and script local variables with s. That way it the scope of the variale is immediately obvious.
Thanks for this very useful addition
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: Dictionary rewrite - thoughts, please
Hi Bernd,
Yes, it took a little time to find the script and then work out what you were doing.
Here is an update. Seems "value" can be the end of a line as well as heading.
Changed the heading to "Values"
Given that each section is identified by the offset of ["heading" & cr] it is possible that any lines ending with one of the heading words, preceding the respective heading, will upset the formatting for that heading. In the case I just fixed a preceding line ended with the characters "value" and so the lineoffset of ["value" & cr] found that line and not the heading, which was later on.
I have adjusted the variables as requested and declared them, turned on strict compilation mode to ensure.
BTW the "Field" object entry has an extra section called "Property" which is a listing of all properties of the object. This is not in the field.ldoc. It is also not in the array entry for "Field <object>" so it must get generated by LC's dictionary. I notice that other "objects" have the Property table too.
James
Yes, it took a little time to find the script and then work out what you were doing.
Here is an update. Seems "value" can be the end of a line as well as heading.
Changed the heading to "Values"
Given that each section is identified by the offset of ["heading" & cr] it is possible that any lines ending with one of the heading words, preceding the respective heading, will upset the formatting for that heading. In the case I just fixed a preceding line ended with the characters "value" and so the lineoffset of ["value" & cr] found that line and not the heading, which was later on.
I have adjusted the variables as requested and declared them, turned on strict compilation mode to ensure.
BTW the "Field" object entry has an extra section called "Property" which is a listing of all properties of the object. This is not in the field.ldoc. It is also not in the array entry for "Field <object>" so it must get generated by LC's dictionary. I notice that other "objects" have the Property table too.
James
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Hi all,
to keep the versions in sync I post here a version that incorporates the changes James Hale made i.e. he added Parameter and Value to the dictionary.
Additionally this version has minor bug fixes and a collapse/expand option. In the search bar there is an icon with a - minus sign which collapses the dictionary. Currently only hard coded into widget "toggleSize" -> the one with the minus sign. You would have to change it there if you want the collapsed dictionary to appear somewhere else.
Until there is a preference system it has to be hard coded I guess.
Kind regards
Bernd
to keep the versions in sync I post here a version that incorporates the changes James Hale made i.e. he added Parameter and Value to the dictionary.
Additionally this version has minor bug fixes and a collapse/expand option. In the search bar there is an icon with a - minus sign which collapses the dictionary. Currently only hard coded into widget "toggleSize" -> the one with the minus sign. You would have to change it there if you want the collapsed dictionary to appear somewhere else.
Until there is a preference system it has to be hard coded I guess.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Hi James,
midair collision. I just posted also a version of the same name. Will incorporate your changes into a next update.
The joys of collaborative work.
I also noted that e.g. the field(object) in the Livecode dictionary has an enumerations which is not contained in the big array. I did not investigate that yet.
Kind regards
Bernd
midair collision. I just posted also a version of the same name. Will incorporate your changes into a next update.
The joys of collaborative work.
I also noted that e.g. the field(object) in the Livecode dictionary has an enumerations which is not contained in the big array. I did not investigate that yet.
Kind regards
Bernd
Re: Dictionary rewrite - thoughts, please
Before sending this to the mother ship, we should move it over to git, and move the various behaviors into script-only-stacks. That would also fix the collision issue.
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: Dictionary rewrite - thoughts, please
Hi Bernd,
Yes I was worried that might happen. After I made the corrections I looked at the field object entries. Should have posted first
Anyway, trust you got my point about the current method of identifying the section heading. Might need a tweak'?
Also I am pretty sure the <object> entries must trigger an extra handler that collates all the property entries that have the <object> mentioned. This would not be difficult to do, but it would be a bugger to try and format without a table. Maybe just listing the properties (as links) would be enough?
James
Yes I was worried that might happen. After I made the corrections I looked at the field object entries. Should have posted first
Anyway, trust you got my point about the current method of identifying the section heading. Might need a tweak'?
Also I am pretty sure the <object> entries must trigger an extra handler that collates all the property entries that have the <object> mentioned. This would not be difficult to do, but it would be a bugger to try and format without a table. Maybe just listing the properties (as links) would be enough?
James
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Dictionary rewrite - thoughts, please
Hi Bernd and others dictionary workers,
Thanks a lot for your work.
I just dowloaded "DictionarySplitter_0_7_6_2".
First feeling is very nice. Simple, clear, shrink/expand dictionary is very useful.
Remains an important question "where is the best place for "DarkTheme" button
Kind regards
Jean-Marc
Thanks a lot for your work.
I just dowloaded "DictionarySplitter_0_7_6_2".
First feeling is very nice. Simple, clear, shrink/expand dictionary is very useful.
Remains an important question "where is the best place for "DarkTheme" button
Kind regards
Jean-Marc
Last edited by jmburnod on Fri Mar 10, 2017 7:28 am, edited 1 time in total.
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Hi Jean-Marc,
Thank you.
Kind regards
Bernd
Thank you.
I consider the left hand pane as an area for configuration. This is not done yet.Remains an important question "wehre is the best place for "DarkTheme" button
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
Hi all,
it has been a while but now I have uploaded a new version to "Sample Stacks".
It is "tinyDictionary"
James Hale contributed to tinyDictionary
http://livecodeshare.runrev.com/stack/8 ... ry_0_7_7_7
Thanks to all that made suggestions and tested. Comments and bug reports welcome.
Kind regards
Bernd
it has been a while but now I have uploaded a new version to "Sample Stacks".
It is "tinyDictionary"
James Hale contributed to tinyDictionary
http://livecodeshare.runrev.com/stack/8 ... ry_0_7_7_7
Thanks to all that made suggestions and tested. Comments and bug reports welcome.
Kind regards
Bernd
Re: Dictionary rewrite - thoughts, please
How could we add to this Dictionary all confirmed bugs and workarounds?
Re: Dictionary rewrite - thoughts, please
I think Berns is talking about a user section
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Dictionary rewrite - thoughts, please
@Alejandro, what do you mean by
@Mikey, I am exploring the option of user notes. But this is in early stages and needs some consideration. Since tinyDictionary currently is only the empty stack and the dictionary is pulled from the current version of LiveCode and only preferences are saved externally. A user notes system has to be fairly robust and reliable and also stored externally. Imagine the user notes get somehow corrupted. I would not like to answer that support question if it turns out that it was a bug I did not catch.
So user notes are a bit further down the road.
Kind regards
Bernd
where is that information coming from? Or do you mean user notes that the user maintains himself.How could we add to this Dictionary all confirmed bugs and workarounds?
@Mikey, I am exploring the option of user notes. But this is in early stages and needs some consideration. Since tinyDictionary currently is only the empty stack and the dictionary is pulled from the current version of LiveCode and only preferences are saved externally. A user notes system has to be fairly robust and reliable and also stored externally. Imagine the user notes get somehow corrupted. I would not like to answer that support question if it turns out that it was a bug I did not catch.
So user notes are a bit further down the road.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: Dictionary rewrite - thoughts, please
The current release of this stack (with user notes!) is now available on livecodeshare.
you can access from within LC by clicking on the "Sample Stascks" button in the toolbar or you can go to the livecodeshare site:
http://livecodeshare.runrev.com/stack/8 ... Dictionary
currently version 8.1 as of this writing.
you can access from within LC by clicking on the "Sample Stascks" button in the toolbar or you can go to the livecodeshare site:
http://livecodeshare.runrev.com/stack/8 ... Dictionary
currently version 8.1 as of this writing.
Re: Dictionary rewrite - thoughts, please
Hi Bernd, Sorry for replying so late, but I lost track of this message thread
Look, for example, comment number 13 from this bug report:
http://quality.livecode.com/show_bug.cgi?id=16612
A really useful addition that could be included in this Dictionary.
Al
This information comes from releases notes (PDF files), bug reports (LC Quality Center), forum postings and mail list messages. Collecting this information requires participation from users and developers.bn wrote:@Alejandro, what do you mean by: How could we add to this Dictionary all confirmed bugs and workarounds? Where is that information coming from? Or do you mean user notes that the user maintains himself.
Look, for example, comment number 13 from this bug report:
http://quality.livecode.com/show_bug.cgi?id=16612
This is exactly the kind of information that I am talking about.Hi all,
Neil Roger observed something very useful:
[[ I've come across this issue before when LiveCode was present in the "Security"section of System preferences.
To test, Go to "System Preferences--->Security & Privacy--->Privacy" and in the tab "Accessibility" check that LiveCode is **not** present in the section "Allow the apps below to control your computer"
I tested this tonight and when LiveCode is in here, it takes between 15- 30 secs for the file dialog to appear and my system locks up until it shows. ]]
I just tried this and I confirm his findings.
Could you please check if this improves the problem for you?
Best regards,
Panos
A really useful addition that could be included in this Dictionary.
Al