Docset Reader now on LiveCode Share

Are you developing tools to extend the LiveCode environment? This is the place to talk about the nuts and bolts of extending our nuts and bolts. If you want to use a LiveCode or third party Environment extension, visit the Using Evironment Extensions forum.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Docset Reader now on LiveCode Share

Post by bogs » Sat Nov 03, 2018 5:18 pm

Wow, sorry I couldn't get back into the discussion sooner!
jacque wrote:
Fri Nov 02, 2018 7:11 pm
The reader hung the first time I ran it too until I figured out it was taking a long time to load the docset. If I waited long enough it was okay.
Huh, on both OSX and Win testing here, it opened each time very quickly, but I think we're talking about two different parts of it. The part I'm talking about where it hangs in 'nix is right after you click the download from the samples screen. On both of the above other systems, this immediately opens the dialog to look for a docset, and by 'immediately' I mean "really REALLY fast", almost felt like that dialog showed up before I released the dl button.

Even though this works on both Windows and OSX as a standalone when compiled for those platforms, I tried to additionally compile it for 64bit 'nix from the windows side, the failure of which is listed above in all its glory.

In both of the 'working' cases, after choosing the docset to read in, the program took only a moderate amount of time to actually load the docset. On OSX and Win, it appears to work well, and compiles with no issues. I just tested the last version on OSX, and if anything it worked even better. Nice job James!

On 'nix, at least on a fresh install of the supported distro, not so much, which is why I said that it maybe something not entirely coming from James program at that time (although the db conn not being removed certainly might have been the cause, which I will check today).

I used two IDEs to check it with, Lc 9.0.1 and 8.1.5, 9.x is the one that just hung after the download, 8.x gave the db error for the reason.

Not being a mobile user, I couldn't make any better recommendations than you did for that platform. I *think* it might make the index area cumbersome to go through if in landscape, though, maybe alter the placement of the fields based on orientation? The layout as offered works pretty good for the desktop is all I know :)

I'll also add 1 to your liking in that I like the implementation too. Some may have guessed that I like standalone references, since I've been using Lc I've converted 3 already made versions to standalone programs and am working on a 4th :D
jameshale wrote:
Sat Nov 03, 2018 12:56 am
Ok, seems there are cross platform issues I need to look at.
LOL, welcome to my world, a smattering of 'nix, BSD, os7-9, CLI dos, and early Win! At some point, I am looking to add Pi and arduino to the mix, just to keep from getting too bored (but not this year :( )Please leave your sanity at the door, you'll get a hat check ticket to pick it up later :wink:
jameshale wrote:
Sat Nov 03, 2018 12:56 am
For me on my machine it is almost instant in loading and drawing the tree.
On the machines I tested where it got past the dialog asking for the docset, it does run great on the previous version.
The only part that required any real wait time was, as Jacque mentioned, reading in the docset initially, and that should be expected I think.
jameshale wrote:
Sat Nov 03, 2018 3:35 am
I probably should have omitted the "Info" and "Font Size" buttons as they are really not required on a standalone given you make the standalone and can move around the stack without them.
I wouldn't take them out, but I also believe in giving the end user a *lot* of control over what they are looking at. My eyesight isn't what it was once, and someone else might want the text to be tiny.

What I might suggest is maybe making the buttons a tad smaller though :)
jameshale wrote:
Sat Nov 03, 2018 3:35 am
It seems only 3 of us are interested and only 1 has any use for it so I am open to suggestions as to future changes/features.
Your topic currently has 246 views, you sure only 3 of us are 'interested' and only 1 would use it? You only just made the announcement 2 days ago my friend, I think it may take a *little* while for word to spread :mrgreen:
Selection_079.png
Oh my!
Image

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Docset Reader now on LiveCode Share

Post by bogs » Sat Nov 03, 2018 7:06 pm

Things are improving on the 'nix side :mrgreen:

The IDE did not hang, and I saw that you added a check to the copy process! Progress!!
Copy dialog...
Selection_080.png
Copy Problem...
Error...
StepOsTesters [Running] - Oracle VM VirtualBox_083.png
Error...
And as a bonus, there was a completely weird thing I didn't notice previously. Apparently on 'nix, the cefBrowser can look 'detached' for lack of a better word. See for yourselves !
StepOsTesters [Running] - Oracle VM VirtualBox_082.png
What the h...
:twisted:
Image

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Docset Reader now on LiveCode Share

Post by jameshale » Sun Nov 04, 2018 12:44 am

Thanks for your kind words bogs.
The db error is I suspect due to the copy problem.
Initially the copy commands I used were non linux (!!?) so I moved over to the revcopyfile and revcopyfolder commands that then required to be called a little later in the chain.
The load new docset handler is still not quite correct for linux hence the error you see.
Perhaps I got the deletion of the previous docset wrong or maybe it is trying to do the copy before it has completely deleted the old. Not have a linux box I can’t tell.

The browser I am using is the browser widget.
It is also used by the dictionary in the IDE which I know doesn’t work on all linux distributions.
I suppose I could checkmand use revbrowser in stead for linux.
As far as I know there is a working linux equivalent to DASH available for linux that can read in user contributed docsets (although with a bit of fiddling- see discussion in the make docset thread in this forum.)
I am currently looking at improving the font adjustment and speeding up part of the tree list’s initialization.
And thanks, hadn’t thought to look at views to see if others are interested.

James

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Docset Reader now on LiveCode Share

Post by bogs » Sun Nov 04, 2018 12:13 pm

jameshale wrote:
Sun Nov 04, 2018 12:44 am
Not have a linux box I can’t tell.
Well, you can setup virtual box and plop 'buntu on it (both free) if you want to take a look at what is going on. My testing boxes are all vm's with clean installs of particular OSes my end users run. That particular combo (depending on your hardware speed) takes about 20-40 mins to create/install, and depending on which version, another 20 mins for the updates here (16.x = lots of updates, 18.x less updates). Best of all, of course, while it is just installing, you can be doing something else more productive :)

Alternately, you can tell me what it is your looking to see during the process either here or in pm, and I'll be happy to take a look.
jameshale wrote:
Sun Nov 04, 2018 12:44 am
The browser I am using is the browser widget.
It is also used by the dictionary in the IDE which I know doesn’t work on all linux distributions.
Yes, the widget is the cef reference I made earlier. I don't know why I call it cefBrowser, other than the first time I looked at a reference folder with it included, I must have been looking at the libbrowserCefProcess to see if it had been potentially mucking up a program running. It is basically the interface Lc uses to put chrome in the widget, if I understand it correctly.
Selection_079.png
cefBrowser...LOL
The 'problem on linux' with it is that it won't run on **32bit distros from my understanding, it does work on 'nix64 itself. You can certainly *use revBrowser on 'nix if you want to support both 32 and 64 bit, or alternately, you can just launch the browser part from the system it is running on, or you could leave it like it is. It isn't like a LOT of people run 32 bit 'nix anymore, I do because I am a unique snowflake :twisted:

Of course, I can also fix it for myself, so you really shouldn't have to change that.

The 'lifting' of the browser widget from the interface, so that the dialog can wind up between the main program and the layer the browser is on, is something I hadn't seen before. I guess I'll have to test a bit more and see if there is a bug report on it, because I can tell you it is interesting to try and get those dialog boxes out from that position :shock: but it is hardly the fault of your program, and it is something that Lc would need fixed if possible.

* Or maybe not, I seem to think I remember revBrowser doesn't work on 'nix from a conversation I had previously... Ah -
Selection_080.png
revBrowser...
** Or maybe it does work on 32bit distros, these things change so much it is hard to keep track at times :D
bug.id=20791

There was also this report (Bug 18025 - Widget problems in Ubuntu 16.04 ) which had a LOT of related issues to the dictionary.

Edit - After reading through a number of BRs on this topic, I came across this fascinating thought from Richard...
Richard Gaskin 2016-02-09 18:04:52 GMT wrote: The content in the Dictionary is text, and LC's field object does a wonderful job of rendering text.

I can appreciate the benefits of using markdown, but given how easy it is to translate markdown to htmlText...<sic>... and how wonderfully robust and platform-independent the field object is, I have to wonder why it's necessary to take the RAM/complexity hit of using a browser object at all for this.
It was something I sure hadn't thought of, but it might be a way to go as well.
Image

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Docset Reader now on LiveCode Share

Post by jacque » Sun Nov 04, 2018 9:53 pm

Huh, on both OSX and Win testing here, it opened each time very quickly, but I think we're talking about two different parts of it.
Okay, unless someone else has the same problem, it's starting to look like there is something unique to my system that's interfering. So far I haven't heard anyone else complain. I'm so special.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Docset Reader now on LiveCode Share

Post by bogs » Sun Nov 04, 2018 11:32 pm

jacque wrote:
Sun Nov 04, 2018 9:53 pm
I'm so special.
I've always thought so :wink:
Image

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Docset Reader now on LiveCode Share

Post by jameshale » Mon Nov 05, 2018 1:24 am

@bogs
Htmltext would have been my preference too. I make extensive use of it in my ebook app.
The reason for using the browser widget here as opposed to htmltext is very simple.
Tables cannot be rendered in htmltext.
For litle things, we worked around it in “tiny dictionary” but once you try to list all the properties of say a button it just gets messy. I also shudder to think of having to re-process the colored syntax on the fly as well.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Docset Reader now on LiveCode Share

Post by bogs » Mon Nov 05, 2018 1:37 pm

jameshale wrote:
Mon Nov 05, 2018 1:24 am
Tables cannot be rendered in htmltext.
I can see I certainly still have a lot of catching up to do <sigh>
Image

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Docset Reader now on LiveCode Share

Post by jameshale » Mon Nov 05, 2018 4:53 pm

Just an update.
Given my initial aim here was to provide Android and possibly linux users with a docset reader I am making some mods which I should be able to post in a day or two. The stack no longer uses a tree view but a wipe to display entries for a particular type. The actual display will then wipe across to occupy the screen (if in portrait orientation). I still need to work on some things for landscape.
With Hermann’s help on the user list I can now provide increasing or decreasing the text size in all areas, and, as a bonus, no longer need to modify the css. I will need to save a pref file but that should be ok.
The docset will now be saved to the specialfolderpath(“resources”) so can be bundled with the standalone.
It will mean that a new standalone will need to be built for an updated docset, at least on Android.
Anyway, more to come.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Docset Reader now on LiveCode Share

Post by bogs » Mon Nov 05, 2018 8:18 pm

Sounds like a great set of updates, looking forward to getting my grubby little hands on it :twisted:
Image

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Docset Reader now on LiveCode Share

Post by jacque » Tue Nov 06, 2018 4:19 pm

bogs wrote:
Mon Nov 05, 2018 8:18 pm
Sounds like a great set of updates, looking forward to getting my grubby little hands on it :twisted:
Ditto! So grateful for James' dedication to us OS outliers.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Docset Reader now on LiveCode Share

Post by jameshale » Tue Nov 06, 2018 4:59 pm

Here goes.

I have uploaded the next version.

It is a major rewrite and still very much a work in progress.

Limitations - Not really ready to make standalone
Standalones will not change orientation.
Font size adjustments will not be remembered between uses.

This is still for testing in the IDE.
There are still some hiccups.

The stack is now 400x800
You can choose either portrait or landscape as your orientation.
I have moved the location of the docset to the specialFolderPath("resources")
Hopefully I have correctly URLEncoded the files paths (needed a bit of a fiddle.)

The 4 black icons at the bottom of the card appear in the IDE only.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Docset Reader now on LiveCode Share

Post by bogs » Tue Nov 06, 2018 5:23 pm

WOW that worked GREAT!
DocsetReader_079.png
Docset reader 'nix WOOHOO!
I really like that folding the index out of the way part, I can only imagine on Android that would be a boon to have.

I'll have to give this a real work out later and see if I can break it in any way, but so far looks GREAT!
Image

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Docset Reader now on LiveCode Share

Post by jameshale » Tue Nov 06, 2018 5:48 pm

Thanks @bogs.
Still a rough cut.
Transitions still to have visual effect, resizing to tablet (well whatever the screen offers), auto orientation, saving prefs to name just a few.
But I think were getting there.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Docset Reader now on LiveCode Share

Post by jacque » Tue Nov 06, 2018 7:22 pm

Oh boy, I am so on this. Back at you after I do my civic duty here in the states and vote.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Making IDE Plugins”