Hiding stacks from the Project Browser
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hiding stacks from the Project Browser
As it stands at the moment, if you want to hide a stack from the Project Browser the only option seems to be to prefix the stack name with rev and then set to hide rev stacks in the preferences.
With the advent of script only stacks a plugin may now have many behavior stacks which may swamp the Project Browser leaving the stack you are working on lost in the list.
So my question is, does anyone know of a recipe for hiding stacks from the Project Browser that doesn't rely on the rev prefix?
With the advent of script only stacks a plugin may now have many behavior stacks which may swamp the Project Browser leaving the stack you are working on lost in the list.
So my question is, does anyone know of a recipe for hiding stacks from the Project Browser that doesn't rely on the rev prefix?
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Hiding stacks from the Project Browser
It would seem useful to request an engagement that provides an option to hide plugin stacks from the PB.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Hiding stacks from the Project Browser
Yes indeed, maybe in the plugin settings so that each plugin can have the option to hide if required.
As there is an option to hide rev stacks in the preferences has anyone been able to track down the code that actually achieves this? I had a look but ended up going round in circles!!
As there is an option to hide rev stacks in the preferences has anyone been able to track down the code that actually achieves this? I had a look but ended up going round in circles!!
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
Re: Hiding stacks from the Project Browser
I can't think of any other way, but that isn't a surprise either.
Re: Hiding stacks from the Project Browser
Time for an enhancement request me thinks.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
Re: Hiding stacks from the Project Browser
You know what I wonder (and haven't tested), is whether you can change the name of the stack in say, the preOpenStack handler, then change it back in the closeStack handler. Something like...
The real question becomes, will you get that annoying dialog that asks you if you really want to do that or not
*Edit - a second real question becomes, whats the problem with just naming the stacks with the rev prefix??
Code: Select all
on preOpenStack
set the name of stack "myBehaviorStack" to "revBehaviorStack"
end preOpenStack
on closeStack
set the name of stack "revBehaviorStack" to "myBehaviorStack"
pass closeStack
end closeStack
*Edit - a second real question becomes, whats the problem with just naming the stacks with the rev prefix??
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Hiding stacks from the Project Browser
I made the suggestion a while back, but we weren't able to come up with a good criterion for selecting which stacks to hide. Navigator, for example, has a zillion (I counted them) script-only behavior stacks which pollute the stack listing in the Project Browser if you're looking at system stacks. They're already named "rev..." so that keeps them out of view if you don't have that option checked.
There *is* another option... if the stack has a custom property of "_ideoverride" set the true then that's the same as the "rev" prefix for the stack name. See the comment before revIDEStackNameIsIDEStack() in stack revIDElibrary.8.livecodescript.
A modest suggestion: In the revFilterStacksList() function in the revcommonlibrary.livecodescript stack script there's a dispatch to revHookIsUserStack() and a check to see if the returned value is false. If there's no function in the messagepath with that name (currently the situation) then the given stack is placed on the list of displayable stacks.
So leveraging that (a multi-part proposal) by
1. adding an option to the Project Browser to set a "hide script-only stacks" property in the Preferences stack
2. creating a revHookIsUserStack() function in a backscript so it's in the message path (I'd suggest adding it to "revIDEProjectBrowserLibrary"
There *is* another option... if the stack has a custom property of "_ideoverride" set the true then that's the same as the "rev" prefix for the stack name. See the comment before revIDEStackNameIsIDEStack() in stack revIDElibrary.8.livecodescript.
A modest suggestion: In the revFilterStacksList() function in the revcommonlibrary.livecodescript stack script there's a dispatch to revHookIsUserStack() and a check to see if the returned value is false. If there's no function in the messagepath with that name (currently the situation) then the given stack is placed on the list of displayable stacks.
So leveraging that (a multi-part proposal) by
1. adding an option to the Project Browser to set a "hide script-only stacks" property in the Preferences stack
2. creating a revHookIsUserStack() function in a backscript so it's in the message path (I'd suggest adding it to "revIDEProjectBrowserLibrary"
Code: Select all
function revHookIsUserStack pStackLongID
local tReturn
put true into tReturn
if the hideScriptOnlyStacks of stack "revIDEPreferences" then
if pStackLongID ends with "livecodescript" then
put false into tReturn
end if
end if
return tReturn
end revHookIsUserStack
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Hiding stacks from the Project Browser
I'd forgotten about that. With things being so open in LC, a custom property may be as good as it gets. We just have to promote its use by plugin makers. And it might be nice if someone made a tool to add it to stack files in the Plugins folders.mwieder wrote: ↑Fri Sep 06, 2019 12:25 amI made the suggestion a while back, but we weren't able to come up with a good criterion for selecting which stacks to hide.
...
There *is* another option... if the stack has a custom property of "_ideoverride" set the true then that's the same as the "rev" prefix for the stack name.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Hiding stacks from the Project Browser
I recently discovered that property, and it enabled me to rename the "revPowerDebug" stack to "PowerDebug".
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Hiding stacks from the Project Browser
The custom property of "_ideoverride" looks like the way to go. Didn't know about this one.
It would be great to rename my plugins omitting the rev suffix as it make editing the binary stack sooo much easier.
Thanks for all the suggestions and help on this one....time to code!
It would be great to rename my plugins omitting the rev suffix as it make editing the binary stack sooo much easier.
Thanks for all the suggestions and help on this one....time to code!
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
Re: Hiding stacks from the Project Browser
Another interesting thing I just noticed is that if you have a folder such as TinyIDE_Behaviors in the plugins folder containing script only stacks these will automatically be displayed in the Project Browser, whereas if the folder is named for example TinyIDE_Scripts then these will not be automatically displayed and boy did it take me a long time to figure this one out. This helps to explain why I was seeing the Project Browser fill.
edit> No this is a red herring! just restarted LC and all the behavior scripts are displaying again..aHHH!
However what does seem to the issue is how the behaviour file is named.
so, button_Btn2108Web_10010.livecodescript will automatically be displayed
but, button_Btn2108Web_10010_.livecodescript with (_) at the end of the name does not display.
So I'm off to rename all the behavior files and re-link... what fun!
edit> No this is a red herring! just restarted LC and all the behavior scripts are displaying again..aHHH!
However what does seem to the issue is how the behaviour file is named.
so, button_Btn2108Web_10010.livecodescript will automatically be displayed
but, button_Btn2108Web_10010_.livecodescript with (_) at the end of the name does not display.
So I'm off to rename all the behavior files and re-link... what fun!
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
Re: Hiding stacks from the Project Browser
Thank you so much for that!!
Re: Hiding stacks from the Project Browser
So the saga is finally at an end .. what a frustrating day.
So what was happening was that every time I started LC all the scriptonly files for TinyIDE would automatically populate the Project Browser .. what!
This was with every thing else removed from the plugins folder just leaving the scriptonly files.
A couple of times I thought I had sorted the problem by renaming part of the files, renaming the folder etc etc .. but restarting LC a couple of times would then show the problem again, this still made no sense.
I had done the usual deleting of the preferences .. many times, still no joy.
I went as far as uninstalling all copies of LC, deleting all runrev and LC files and folders in the AppData folder, shutting down the computer, restarting and reinstalling LC and ... directly I set the path to plugins in the preferences, up the files would pop again...ARGGGHH!!
Now then, I created a new script only file and placed it in the TinyIDE folder, it did not show up in the PB..erm?
I took the contents from one of the existing files deleted the original and named the new file the same as the original, it showed up.
I did the same but saved the new file under a different name, it didn't show up...progress at last.
What it turned out to be is that if you have scriptonly files whose names start with button_, field_ , stack_, card_ etc in a sub folder of your plugins folder these (at least on my computer) are automatically loaded into the PB at launch ..scratch head.
Anyway I can start up LC and not see all the stack only files..now a happy bunny again.
Renamed files now absent from PB
So what was happening was that every time I started LC all the scriptonly files for TinyIDE would automatically populate the Project Browser .. what!
This was with every thing else removed from the plugins folder just leaving the scriptonly files.
A couple of times I thought I had sorted the problem by renaming part of the files, renaming the folder etc etc .. but restarting LC a couple of times would then show the problem again, this still made no sense.
I had done the usual deleting of the preferences .. many times, still no joy.
I went as far as uninstalling all copies of LC, deleting all runrev and LC files and folders in the AppData folder, shutting down the computer, restarting and reinstalling LC and ... directly I set the path to plugins in the preferences, up the files would pop again...ARGGGHH!!
Now then, I created a new script only file and placed it in the TinyIDE folder, it did not show up in the PB..erm?
I took the contents from one of the existing files deleted the original and named the new file the same as the original, it showed up.
I did the same but saved the new file under a different name, it didn't show up...progress at last.
What it turned out to be is that if you have scriptonly files whose names start with button_, field_ , stack_, card_ etc in a sub folder of your plugins folder these (at least on my computer) are automatically loaded into the PB at launch ..scratch head.
Anyway I can start up LC and not see all the stack only files..now a happy bunny again.
Renamed files now absent from PB
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Hiding stacks from the Project Browser
I've got a patch to the Project Browser on the way that will allow you to show or hide script-only stacks as desired.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Hiding stacks from the Project Browser
Looking forward to it
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search