Embedding a sub stack

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

Post Reply
bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Embedding a sub stack

Post by bidgeeman » Wed Jun 10, 2009 4:17 am

Hi.

Warning: New user question here :)
I'm trying to embed a substack in a mainstack so I can navigate between the substacks cards while working in the main window. Is there a way to do this or is there a bettwer way to go about it?

I followed the basic video tutorial on Tabs but they use a button to called them from a seperate stack. I would like the tabs to be there all the time set to ehave as a background but with it's own set of cards.

Many thanks
Bidge

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jun 10, 2009 8:15 am

Hi Bidge,

I'm not sure what you mean. You should probably reconsider your interface. One possibility is to use a palette with buttons for navigation.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Wed Jun 10, 2009 9:24 am

Hi Mark.

Yes....you're probably right about reconsidering the interface.
Is it possible to have two stacks locked together? So that when you move the mainstack the second stack follows it?

Cheers
Bidge

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Thu Jun 11, 2009 12:23 pm

Hi Bidge,

well, I also do not understand what you are after from your first post here?
bidgeeman wrote:Hi Mark.

Yes....you're probably right about reconsidering the interface.
Is it possible to have two stacks locked together?
So that when you move the mainstack the second stack follows it?

Cheers
Bidge
But this is definitively possible, see "movestack" in the docs.

This message is being sent continuously to a stack as long as the
user moves the window on the screen.

Example:
1. You have stack "A" and "B".
2. You want to stick stack "B" to the right side of stack "A" when the user moves stack "A".
3. Put this into the stack script of stack "A":

Code: Select all

on movestack
  ## Important!
  ## First check if stack "B" is really open!
  if "B" is not in the openstacks then
     exit movestack
  end if

  ## Stack "B" is open:
  set the topleft of stack "B" to the topright of stack "A"
end movestack
Now move your ass and your mind will follow!
Erm... I mean of course: move stack "A" and stack "B" will follow :-D


Best from germany

Klaus

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Thu Jun 11, 2009 12:42 pm

Ahh...thanks Klause.
The word I was looking for as "Dock" sorry :oops: Is it possible to dock a sub stack to a main stack.

I shall now go and move.....er....dock my Ass :)

Many thanks
Bidge

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Thu Jun 11, 2009 12:56 pm

Hi Bidge,
bidgeeman wrote:Ahh...thanks Klause.
The word I was looking for as "Dock" sorry :oops: Is it possible to dock a sub stack to a main stack.
Well, if you position your stack_to_dock "on preopenstack" where you want it
(like in the movestack handler) and with the above mentioned "movestack"
handler you should have the "dock" functionality, right?
There is no built-in "dock" thingie!
bidgeeman wrote:...
I shall now go and move.....er....dock my Ass :)

Many thanks
Bidge
Yeah, funky, funky :-D


Best

Klaus

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Post by WaltBrown » Thu Jun 11, 2009 3:43 pm

Docking a substack/palette in a main stack window (like having an undockable "stack field" object) would be very interesting. The Rev IDE is a good example - I use a large second monitor where I "park" the things I am working on, and move whatever is current to my main monitor. I would like to be able to just drag all of the Rev IDE between monitors at one time.
Walt Brown
Omnis traductor traditor

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Fri Jun 12, 2009 12:01 am

Hi Walt. Yes you're right...That, (Rev interface), is exaclty what made me think of it. I have another program that I use a lot written in Lua. It feature floating and dockable windows. I thought there may be a function in Rev thsat was similar.

Cheers
Bidge

Post Reply