Page 2 of 2

Re: Hiding stacks from the Project Browser

Posted: Sun Sep 08, 2019 12:29 am
by mwieder

Re: Hiding stacks from the Project Browser

Posted: Sun Sep 08, 2019 1:19 pm
by AndyP
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.

Re: Hiding stacks from the Project Browser

Posted: Sun Sep 08, 2019 6:02 pm
by mwieder
I'm not clear on what you're suggesting... you want a way to toggle the option via a plugin script?

Re: Hiding stacks from the Project Browser

Posted: Tue Sep 10, 2019 8:01 am
by AndyP
Yes exactly, i think that would be useful.

Re: Hiding stacks from the Project Browser

Posted: Tue Sep 10, 2019 2:22 pm
by Mikey
This sounds like a hacktoberfest project, but never mind, you couldn't wait until hacktober to submit it...

Re: Hiding stacks from the Project Browser

Posted: Tue Sep 10, 2019 4:25 pm
by mwieder
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).

Re: Hiding stacks from the Project Browser

Posted: Wed Sep 25, 2019 8:08 pm
by mwieder
...and as a hint to anyone who wants this implemented *everywhere*, you might try monkeypatching function __ideFilterStackNameListWithPreference() in stack revidelibrary.8.livecodescript.

Re: Hiding stacks from the Project Browser

Posted: Mon Oct 14, 2019 3:47 pm
by bogs
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?