TreeView instability and fixing an extension
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
TreeView instability and fixing an extension
I'm being plagued, all the time, by the 'chunk index out of range' error (which was reported in your bug tracking, but remains unfixed for some reason; seems like a p1 showstopper to me I literally cannot do anything without getting that error in 8 and 9rc1 ); this doesn't allow me to use the tree view for anything useful at the moment. Nor can you by the way; the Extension Manager, when I go to 'Store' just hangs on producing that same error infinitely.
To I thought I would fix it; I changed treeview.lcb but I cannot get the dev environment to reload that file. How do I let it reload an extension sourcefile in memory so my changes will come into effect?
To I thought I would fix it; I changed treeview.lcb but I cannot get the dev environment to reload that file. How do I let it reload an extension sourcefile in memory so my changes will come into effect?
Re: TreeView instability and fixing an extension
For reference:
https://quality.livecode.com/show_bug.cgi?id=19753
Since it is part of the app, you will need to compile the widget in a separate directory outside of the app itself.
Do you think you have found/solved the issue? If so I can help getting a PR submitted in it.
https://quality.livecode.com/show_bug.cgi?id=19753
Since it is part of the app, you will need to compile the widget in a separate directory outside of the app itself.
Do you think you have found/solved the issue? If so I can help getting a PR submitted in it.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: TreeView instability and fixing an extension
Excuse my ignorance; I have no clue how to recompile and use extension source code. I know where the file is, I put it outside the project and changed it; how do I open + test it?
Re: TreeView instability and fixing an extension
I generally work on widgets included in the product from a full source build. I’ll need to pull this out later this evening to work out the full procedure. Essentially you will need a folder with just the one LCB file and supporting resources. Open the Extension Builder (tools menu). Click the folder icon to select the file (top right). Click the play icon to build/test (bottom left). Be sure to change the version number in the LCB file. You may need to rename the widget to test it though.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: TreeView instability and fixing an extension
Thanks a lot! Will test first thing in the morning!
Re: TreeView instability and fixing an extension
Ok,
The 'solution' is rather simple;
for v8 this is on line 849 and for 9 it's on line 872 .
No more crashes after that, but the extension is still not very nice to use; for some reason, left-clicking on rows some times select them and it's unclear when. When you hold left-mouse on a row it always works and when you right-click shortly it also always works. What you suspect is left click immediate selects and rightclick allows for context menus etc.
Any idea where in the code that is situated?
The 'solution' is rather simple;
Code: Select all
// Just return if the click was below all the data
if mHoverRow < 1 or mHoverRow > the number of elements in mDataList then
return
end if
No more crashes after that, but the extension is still not very nice to use; for some reason, left-clicking on rows some times select them and it's unclear when. When you hold left-mouse on a row it always works and when you right-click shortly it also always works. What you suspect is left click immediate selects and rightclick allows for context menus etc.
Any idea where in the code that is situated?
Re: TreeView instability and fixing an extension
I can see why your fix would avoid the range issue but am still trying to trace the why. I have not been able to trigger the problem so it is hard for me to validate the solution.
The code that handles clicks does not differentiate by button. The selection status of a line should toggle each time it is clicked.
I can’t reproduce the selection issue. What OS and LC versions are you using?
The code that handles clicks does not differentiate by button. The selection status of a line should toggle each time it is clicked.
I can’t reproduce the selection issue. What OS and LC versions are you using?
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: TreeView instability and fixing an extension
PR submitted against develop-9.0
https://github.com/livecode/livecode/pull/6461
https://github.com/livecode/livecode/pull/6461
Code: Select all
public handler OnClick() returns nothing
if mHoverRow < 1 then
put yPosToRowNumber(the y of the mouse position) into mHoverRow
end if
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: TreeView instability and fixing an extension
> I can’t reproduce the selection issue. What OS and LC versions are you using?
Ubuntu 17.04 with
LiveCode Community 8.1.9.x86_64
and
LiveCode Community 9.0.0 rc1 x86_64
The latter is absolutely unusable here to be honest, it makes windows disappear when I click other windows which is seriously making me want to throw my laptop against the wall
The issue ofcourse on Linux is not only the distribution but also the windows manager; under i3 it doesn't work at all, Unity and Fluxbox give me the above issues with 9.0.0rc1.
Actually; docking the windows to the background would solve all issues... Is that possible and did I just overlook something, because that would probably also get more people on board as it makes the IDE lose that 80's Smalltalk feel. All applications (and I guess I can move to another part of the forum as I am building app 45 with it today) I make have cards; I absolutely despise windows; it's a cluttered mess while one window and switching cards is excellent. In my opinion (which counts for nothing, I know); the IDE should be like that too, as all IDE's went that way over the past 20 years.
Maybe i'm talking nonsense and it's already possible, but I just have never found out how.
Ubuntu 17.04 with
LiveCode Community 8.1.9.x86_64
and
LiveCode Community 9.0.0 rc1 x86_64
The latter is absolutely unusable here to be honest, it makes windows disappear when I click other windows which is seriously making me want to throw my laptop against the wall
The issue ofcourse on Linux is not only the distribution but also the windows manager; under i3 it doesn't work at all, Unity and Fluxbox give me the above issues with 9.0.0rc1.
Actually; docking the windows to the background would solve all issues... Is that possible and did I just overlook something, because that would probably also get more people on board as it makes the IDE lose that 80's Smalltalk feel. All applications (and I guess I can move to another part of the forum as I am building app 45 with it today) I make have cards; I absolutely despise windows; it's a cluttered mess while one window and switching cards is excellent. In my opinion (which counts for nothing, I know); the IDE should be like that too, as all IDE's went that way over the past 20 years.
Maybe i'm talking nonsense and it's already possible, but I just have never found out how.
Re: TreeView instability and fixing an extension
I wouldn't say your opinion counts for nothing, the sentiment you mention has been brought up more than a few times, although not totally correct. Although the vast majority of IDEs do use the single window/docked layout style, not all do, and some offer both versions.
Lazarus, an IDE for Free Pascal, for instance, offers both SDI and MDI styles to a great extent, just like Delphi did originally. This is my personal favorite style, since it gives the user the option to roll it the way he wants to use it, all in one or out as needed.
As for solutions that might solve your problem as stated, they are not available from the default IDE, but plenty of smart people have resolved it in other ways. The two closest I can think of to what your asking for would be plugins made by Richard and Andy, respectively Devolution and TinyIDE. Devolution worked nicely across all the various window managers/desktops I tested it on and is very minimal, TinyIDE worked pretty well as well and lamps almost all of the dev tools into a bar across the top of your screen.
Hope some of that helps you out.
Re: TreeView instability and fixing an extension
Can you elaborate on the windows disappearing? I know that if you switch to another app then pallet windows hide, but have not noticed that when switching within the IDE.
On the Linux point... I think there is probably too much emphasis on distribution when the window manager is probably the driver for most display issues that are seen. That is mainly a hunch though. I’ve not tried 17.04 since 16.04 is what is tested against. I will download the next release though to check out the Unity replacement. I don’t do much on Linux but do want to get into it some.
On the Linux point... I think there is probably too much emphasis on distribution when the window manager is probably the driver for most display issues that are seen. That is mainly a hunch though. I’ve not tried 17.04 since 16.04 is what is tested against. I will download the next release though to check out the Unity replacement. I don’t do much on Linux but do want to get into it some.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: TreeView instability and fixing an extension
In Linux, unlike Windows and Mac, you have a multi fold issue to overcome. One is the WM, as you suspect. The others include the DM, which unlike windows and mac can vary greatly by distro/desktop, and even term confusion, where people lamp the WM, DM, etc together or even interchangeably.
To see some changes for yourself, on your VM play with some of the display managers on that page, you can switch from DM to DM by running
Code: Select all
sudo dpkg-reconfigure lightdm ##or whatever dm you are wanting to test...
*Edit - just to elaborate on the DMs, the DMs that Lc tends to run ok/ish on would be lightdm, gdm, and so forth. Then there are ones that produce truly weird effects, like slim (not terrible), nodm, etc.
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: TreeView instability and fixing an extension
Not so much when you know the history. MetaCard, LiveCode's predecessor, was originally written for *nix and the developer worked entirely in that platform. The first port was to Windows, followed later by Mac. When LiveCode acquired the product the focus switched to the most used platforms and support for the *nix flavors was trimmed down to only Linux. Unfortunately support for even that single distribution gets less attention than the others where most of the user base is.The older IDEs tend to handle the whole process far more gracefully than the newest versions do. To me, that is just mind boggling.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: TreeView instability and fixing an extension
Oh I know, Mc being a special study of mine as you know I found the interviews written at the time especially enlightening, as well as comments of people using it (or not) posted on the forums based around it. I really loved some of the comments I read that you posted about Mc, I can only imagine sitting there but they sound a lot like my posts
Come to think of it, that is probably the number 2 reason I like spending so much time in it.