Hiding stacks from the Project Browser

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

mwieder
VIP Livecode Opensource Backer
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

Post by mwieder » Sun Sep 08, 2019 12:29 am


AndyP
Posts: 615
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Hiding stacks from the Project Browser

Post by AndyP » Sun Sep 08, 2019 1:19 pm

by mwieder
Pull request submitted.

https://github.com/livecode/livecode-ide/pull/2080
This works wonderfully..just patched into my copy of LC.

ScriptOnly.png

Many thanks for your efforts.

So next just need to work out how to activate this form script in the main stack of a plugin.
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

mwieder
VIP Livecode Opensource Backer
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

Post by mwieder » Sun Sep 08, 2019 6:02 pm

I'm not clear on what you're suggesting... you want a way to toggle the option via a plugin script?

AndyP
Posts: 615
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Hiding stacks from the Project Browser

Post by AndyP » Tue Sep 10, 2019 8:01 am

Yes exactly, i think that would be useful.
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

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Hiding stacks from the Project Browser

Post by Mikey » Tue Sep 10, 2019 2:22 pm

This sounds like a hacktoberfest project, but never mind, you couldn't wait until hacktober to submit it...

mwieder
VIP Livecode Opensource Backer
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

Post by mwieder » Tue Sep 10, 2019 4:25 pm

I admit to not seeing the advantage of toggling this in other situations unless you're trying to create your own PB, but nonetheless...

this patch provides a second optional argument to the revIDEStacksForDataView() function. If you're invoking that function yourself then adding a true argument would give you the filtered stack array. If you just want a filtered list then you could duplicate what I've added to that function:

1. get the entire list of stacks
2. for each stack in the list, eliminate any whose long id contains ".livecodescript"

(and note that "ends with" as a filter won't work because the long id is in quotes and so the "ends with" part is actually the whole filename).

mwieder
VIP Livecode Opensource Backer
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

Post by mwieder » Wed Sep 25, 2019 8:08 pm

...and as a hint to anyone who wants this implemented *everywhere*, you might try monkeypatching function __ideFilterStackNameListWithPreference() in stack revidelibrary.8.livecodescript.

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

Re: Hiding stacks from the Project Browser

Post by bogs » Mon Oct 14, 2019 3:47 pm

mwieder wrote:
Fri Sep 06, 2019 12:25 am
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.
I take it that option is limited to 8.x and above eh? 7 and below you would still need to stick 'rev' at the front of the name?
Image

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”