Multiple palette stacks
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 11
- Joined: Thu Aug 23, 2018 2:14 pm
Multiple palette stacks
Hi all,
It's probably easy but I can't find out how to do it:
I've got a main stack and 2 substacks that I would like to open as palettes. I would like to allow for the user to see both palettes at the same time on top of the main stack (like with the tools palette and the project browser in livecode). What's a good way of doing that?
Thanks a lot for your help.
It's probably easy but I can't find out how to do it:
I've got a main stack and 2 substacks that I would like to open as palettes. I would like to allow for the user to see both palettes at the same time on top of the main stack (like with the tools palette and the project browser in livecode). What's a good way of doing that?
Thanks a lot for your help.
-
- Posts: 11
- Joined: Thu Aug 23, 2018 2:14 pm
Re: Multiple palette stacks
PS:
It actually works sometimes but more "accidentally" or because of a mechanism/command I cannot really track.
I've got a button for each substack on the main stack. Pressing a button opens the respective stack. The preOpen stack handler in the substack's script defines it as palette.
I've noticed this behaviour:
action 1: When I click the button to open substack/palette 1 it opens.
action 2: When I then click the other button to open substack 2, substack 2 opens and substack 1 closes.
action 3: When I then click button 1 substack 1 opens.
action 4: When I then click button 2 substack 2 opens but substack 1 remains open as well.
Just seems to work in this sequence of actions.
It actually works sometimes but more "accidentally" or because of a mechanism/command I cannot really track.
I've got a button for each substack on the main stack. Pressing a button opens the respective stack. The preOpen stack handler in the substack's script defines it as palette.
I've noticed this behaviour:
action 1: When I click the button to open substack/palette 1 it opens.
action 2: When I then click the other button to open substack 2, substack 2 opens and substack 1 closes.
action 3: When I then click button 1 substack 1 opens.
action 4: When I then click button 2 substack 2 opens but substack 1 remains open as well.
Just seems to work in this sequence of actions.
-
- Posts: 11
- Joined: Thu Aug 23, 2018 2:14 pm
Re: Multiple palette stacks
Correction:
Just found out that the second substack/palette is in the background but open.
What's the best way to have both substacks on top of the main stack?
Just found out that the second substack/palette is in the background but open.
What's the best way to have both substacks on top of the main stack?
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Multiple palette stacks
What is the mode of the mainstack?
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: Multiple palette stacks
I *think* what your looking for is this in your main stack :Summertime01 wrote: ↑Wed Oct 10, 2018 9:05 amWhat's the best way to have both substacks on top of the main stack?
Code: Select all
on openStack
// http://livecode.wikia.com/wiki/RaisePalettes
set the raisePalettes to true
end openStack
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Multiple palette stacks
Hi All
I played with 3 substacks and it works fine for me (LC 9.0.1)
I didn't find differences with raisepalettes true or false because there is only palette and edtable stacks.
Not sure I understand in which case raisepalettes could be useful Best regards
Jean-Marc
I played with 3 substacks and it works fine for me (LC 9.0.1)
I didn't find differences with raisepalettes true or false because there is only palette and edtable stacks.
Not sure I understand in which case raisepalettes could be useful Best regards
Jean-Marc
https://alternatic.ch
Re: Multiple palette stacks
On my Mac and Win "the raisepalettes" is TRUE by default, so maybe this is not the case on Linux?
Re: Multiple palette stacks
Dunno, until I set raisePalettes in the openStack handler here (Linux, q4os TDE desktop), the palettes would go under the main stack. Once set, the palettes stayed above the main stack as shown in the picture. Didn't test on other Os platforms, so couldn't comment.
Re: Multiple palette stacks
Hello
I am trying to redesign an app using multiple palettes.
That raises the question what the best approach would be considering that buttons of palette A might influence the appearance and/or behaviour of palette B and C (and vice versa). I just want to understand the best way how to design this before I start implementing features.
Thanks for your help.
I am trying to redesign an app using multiple palettes.
That raises the question what the best approach would be considering that buttons of palette A might influence the appearance and/or behaviour of palette B and C (and vice versa). I just want to understand the best way how to design this before I start implementing features.
Thanks for your help.
Re: Multiple palette stacks
My personal opinion: palettes should be used very sparingly if at all…. There is perhaps a niche for them but by and large they’re a pain for the user.
I would consider interface design carefully before going down that route. Fair enough if there is a clear reason to use these but otherwise would avoid.
Regarding code conflicts: I would keep most of the code in the mainStack, assuming your palettes are substacks.
You can reference buttons on each palette with “the target” and it should be possible to have no (or minimal) code in the palettes. Using script local variables in the mainstack will allow you to track properties/conditions etc.
But all of this is over complicating things I reckon….
I would consider interface design carefully before going down that route. Fair enough if there is a clear reason to use these but otherwise would avoid.
Regarding code conflicts: I would keep most of the code in the mainStack, assuming your palettes are substacks.
You can reference buttons on each palette with “the target” and it should be possible to have no (or minimal) code in the palettes. Using script local variables in the mainstack will allow you to track properties/conditions etc.
But all of this is over complicating things I reckon….
-
- VIP Livecode Opensource Backer
- Posts: 9732
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Multiple palette stacks
Hi.
I am with Stam.
What is the nature of the user interface such that you want to use palettes?
craig
I am with Stam.
What is the nature of the user interface such that you want to use palettes?
craig