Multiwindows 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
Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Multiwindows Stack

Post by Pascal » Thu Jul 15, 2010 9:12 am

Hello,

I suppose the question has been already asked (and answered) but I have not find where.
Then... how do I manage to create a stack with two or more windows (containig or not the same fields) ?

Thanks
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Multiwindows Stack

Post by doc » Thu Jul 15, 2010 11:21 am

Hello Pascal,
If you are wanting to do it using code, then try doing a search on the "clone" and/or "create stack" commands in the RunRev dictionary. That should get you started.

-Doc-

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Multiwindows Stack

Post by Pascal » Thu Jul 15, 2010 11:43 am

As a matter of fact, I do no see the point using code.
I want, when developping my project, create a stack with two or more layouts to present the data.
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Multiwindows Stack

Post by Pascal » Thu Jul 15, 2010 2:25 pm

Or, told an other way.(I read, some place, that one stack can have only one window)
What is the easiest way to create substacks that are exactly all the same, any change in any stack being automatically pasted in the other stacks ?...

Thanks
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Multiwindows Stack

Post by dunbarx » Thu Jul 15, 2010 2:34 pm

Do you mean that you want two separate windows on the screen at the same time? Or that you want to be able to change "screens" within a single window?

If the second, you only need to create a stack with two or more cards, and each card can have its own layout. If the first, you can create a substack of a main stack, and see both at once.

Each is very easy to do. Write back with more information on your design.

Craig Newman

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Multiwindows Stack

Post by dunbarx » Thu Jul 15, 2010 2:43 pm

1- Create a new mainstack. Name it and save it.
2- In the file menu, you will see a menuItem to create a substack of your mainstack. Do so, and save it.

In the inspector for the substack you will that its "mainstack" menu is already set. This is all possible under script control, of course, and the mainstack can be switched to any other stack in memory.

Now you can navigate between stacks as you wish. The main advantage of having a mainstack and a substack instead of two separate mainstacks in that both reside in the same file. This might be critical if you need to make a standalone.

Craig Newman

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Multiwindows Stack

Post by Pascal » Thu Jul 15, 2010 6:03 pm

Thanks,

Trying it and coming back to tell.
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Multiwindows Stack

Post by Pascal » Fri Jul 16, 2010 9:49 am

Had a little time to try.
Let me explain my project, that I thought would be easy to do :cry: , it is just a place to store my passwords
Every card of the stack contains the name of the web site, my login, my password, and a place to store comments or the "secret questions". Four fields in each card nos much to begin with I thought.
I want to have a layout where I enter the data, and another one where the data of all cards appears in columns.
Easy job for FMPro, but I wanted to try Revolution
you only need to create a stack with two or more cards, and each card can have its own layout.
Well, it does not work.
you can create a substack of a main stack, and see both at once
I suppose that the substack would be the second layout.
But, how do I proceed to transfer the data from the main stack to the substack (and how do I manage to update data) ?

Thanks for your ideas.
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Multiwindows Stack

Post by dunbarx » Mon Jul 19, 2010 2:58 pm

It sounds to me like the data cards all have the same layout. Each card has the same four fields, perhaps with a title field for the name of the website that has different text on each card. Is this so?

Why not make a single stack with the first card your data entry card, the second card your collected data card, and card 3 the common layout? You would group the controls in card 3 when you first create them, and set their backgroundbehavior to "true". Whenever you make additional cards the controls will all be duplicated as per card 3. The data in those fields can all have different text, and you can have as many as you want.

Unless I am still not getting it...

Craig Newman

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Multiwindows Stack

Post by Pascal » Mon Jul 19, 2010 9:41 pm

Well, it is me who does not undertand what you suggest me.
I Join a capture showing my aim.
Attachments
testPW.jpg
testPW.jpg (58.51 KiB) Viewed 8075 times
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Multiwindows Stack

Post by dunbarx » Wed Jul 21, 2010 3:14 pm

Right.

You already have the first two cards. It seems to me these are the only ones you need.

But if you want to follow your original idea, make a third card with the controls you want. Group those controls and set their backgroundBehavior to "true". Whenever you create a new card, from data you enter on card 1, the data will appear there, and is also loaded onto card 2. But why have these cards if all the data can be found on card 2?

But will the application have a lot of cards? If so, you need to change the layout of card 2, or it will become ungainly. I think a datagrid or even a table field would be much better, and you can scroll as far as you need to when the number of entries gets large. This is much better than having all those fields on card 2. You can also have a find function that will locate the data.

The size of the cards is different, I see. You have to change the stack size as you navigate, which is not a problem, but I would change the layout so that each style fits into the same size card.

Keep responding...

Craig Newman

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Multiwindows Stack

Post by Pascal » Fri Jul 23, 2010 8:40 am

Thanks for your help.
But why have these cards if all the data can be found on card 2
I could say that it is "for the fun of it", but it is not true. Sometime, when you process data, you have a place when you enter the data, and other places where it is more convenient to have them (or some part of it) in a list. The list may also be built with data coming from other "tables" like it is in relational databases.
I'm going to try with array variables.
Has you or someone else an example of relational databases (or lookalike) built with Revolution ?
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

Post Reply