Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Mon Aug 26, 2013 8:14 am
hello
To switch to another substack I use the name of each stack.
example:
But I can not use next and previous
if I use:
this message appears:
button "vers 2": execution error at line 3 (Handler: error in statement), char 1
How is it possible to use these principles (next-previous) with substack.
Pascal
-
BvG
- VIP Livecode Opensource Backer

- Posts: 1239
- Joined: Sat Apr 08, 2006 1:10 pm
-
Contact:
Post
by BvG » Mon Aug 26, 2013 10:50 am
You can only go next card, because they're in a specific order, wheras stacks are not.
if you look at the dictionary, it says this about the "go" syntax:
go [invisible] [to] card [of stack] [as mode|in [a] new window|in window]
go [invisible] [to] {first | prev[ious]| next | last | any} [marked] [card]
go [invisible] [to] {recent | start | finish | home} card
go [invisible] [to] {forward | forth | back[ward]} [number]} [card[s]]
See how only the first line mentions stacks, and all other usages are only for cards.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Mon Aug 26, 2013 2:55 pm
It is strange, however substacks have a numerical order. The first substack is recognized as number 1 stack, and so on. From mainstack, it is possible to go to any substack using GO TO STACK (ORDER NUMBER). Is it really not possible to use this order to go from the previous to the next?
In fact, I'm looking for a way to create forms that are different sizes and positions (and of course with next / previous control buttons). But all the cards in a stack are locked to the limits and the position of the stack, is not it?
How can I do?
Pascal
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Aug 26, 2013 3:12 pm
Hiu Pascal,
pascalh4 wrote:It is strange, however substacks have a numerical order. The first substack is recognized as number 1 stack, and so on. From mainstack, it is possible to go to any substack using GO TO STACK (ORDER NUMBER). Is it really not possible to use this order to go from the previous to the next?
Do you really think we are concealing somthing from you?
Create your own numbered stack list and use that for your PREVIOUS and NEXT stack navigation!
pascalh4 wrote:In fact, I'm looking for a way to create forms that are different sizes and positions (and of course with next / previous control buttons). But all the cards in a stack are locked to the limits and the position of the stack, is not it?
Yes, CARD size/form etc = stack size/form etc.
I think you are looking for WINDOWSHAPE, see dictionary.
But this will affect the complet stack (and thus all cards in it!).
Best
Klaus
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Mon Aug 26, 2013 4:23 pm
Hi Klaus
Do you really think we are concealing somthing from you?
Yes, of course, also all is in English just for that.
Create your own numbered stack list and use that for your PREVIOUS and NEXT stack navigation!
I tried, but I did not really succeed. Should the numérotion automatically by a copy of stack, for example. I am looking for!
I think you are looking for WINDOWSHAPE, see dictionary.
It is not exactly that! I seek only the way to display standard windows of different sizes and at different locations. I don't want to have an original form, however.
Pascal
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Aug 26, 2013 4:51 pm
Bonjour Pascal,
pascalh4 wrote:Hi Klaus
Do you really think we are concealing somthing from you?
Yes, of course, also all is in English just for that.

Mon dieu, quelle impertinence
pascalh4 wrote:Create your own numbered stack list and use that for your PREVIOUS and NEXT stack navigation!
I tried, but I did not really succeed. Should the numérotion automatically by a copy of stack, for example. I am looking for!

l
I thought that you create a list inclusive enumaration of the substacks by yourself and use THAT list to go PREVIOUS and NEXT!
So YOU decide what next ans previous stack will be!
pascalh4 wrote:I think you are looking for WINDOWSHAPE, see dictionary.
It is not exactly that! I seek only the way to display standard windows of different sizes and at different locations.
Just use and place your substacks wherever you like!
pascalh4 wrote:I don't want to have an original form, however.l
Sorry, don't understand.
A stack is ALWAYS a rectangle unless you set its WINDOWSHAPE!?
Best
Klaus
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Mon Aug 26, 2013 5:27 pm
hi,
A stack is ALWAYS a rectangle unless you set its WINDOWSHAPE!?
Exactly, I want to keep a rectangular shape and, therefore, I do not think I need windowshape.
Just use and place your substacks wherever you like!
That I understood. This is the way to go from one to another that interests me.
I thought that you create a list inclusive enumaration of the substacks by yourself and use THAT list to go PREVIOUS and NEXT!
So YOU decide what next ans previous stack will be!
Here, I don't understand the method!
I looked at the ID property in the dictionary but again I find it hard to understand the process
Pascal
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Mon Aug 26, 2013 10:12 pm
Lets say your stacks are named:
S1
S2
S3
S4
--go previous
put char 2 of the name of this stack into tNum
add - 1 to tNum
if tNum <= 0 then put 4 into tNum
go stack "S" & tNum
"go next" should be clear.
Simon
EDIT: should be "put char 2 of the short name of this stack into tNum"
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Mon Aug 26, 2013 11:12 pm
Thank you Simon
I think I understand the method.
Pascal
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Aug 27, 2013 10:49 am
Yep, that's what I meant!
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Tue Aug 27, 2013 11:23 am
Hi Klaus
Sorry for not having understood your explanation.
I'm really "au raz des paquerettes
*" in this purview.
* French expression that means the lowest level.
Note: now that I understand, I'm going to use too to increment the names of my new stacks.
"I'am very happy" (quote from the droopy looney tunes) from your attentiveness.
See you soon for another question.
Pascal
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Mon Sep 02, 2013 8:04 pm
Hi everyone.
I return to this topic.
I understood the explanation of Simon, but I had not tested.
I did and I get an error message.
my code
Code: Select all
on mouseUp
hide button "Nouvelle Fiche"
show button "Sauver la fiche"
put substacks of stack "Outils de création" into it
go to it
put char 2 of the name of stack it into tNum
add 1 to tNum
Here error message to last line (add 1 to tNum)!
button "Nouvelle Fiche": execution error at line 7 (add: destination has a bad format (numeric?)), char 1
Did I forget something?
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Mon Sep 02, 2013 8:30 pm
Possibly
I'm not clear on:
"put substacks of stack "Outils de création" into it"
but, you shouldn't use the "it" variable as it is an LC variable.
Also that line looks like you are placing more than 1 stack into "it"? Which then says "go to all of these stacks"?
"put char 2 of the name of stack it into tNum"
If there is more then one stack in it...which one?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
pascalh4
- Posts: 81
- Joined: Thu Aug 22, 2013 12:50 pm
Post
by pascalh4 » Mon Sep 02, 2013 10:20 pm
hi
the name of my substack is "s0"
Code: Select all
put substacks of stack "Outils de création" into it
this code reference to "s0" without naming.
With this direct test, it is ok (my reply is 0+1)
Code: Select all
put substacks of stack "Outils de création" into it
put char 2 of it into tNum
add 1 to tNum
put tNum into field 1 of stack "s0" -- check
my error was here (worlds in bold)
put char 2
of the name of stack it into tNum
I'll redo my work using this principle.
Good evening
Pascal
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Tue Sep 03, 2013 5:26 am
Hi Pascal,
Not to harp on about it, but again really don't use "it" as a variable just change it to something else like tVar.
Trouble example:
Code: Select all
put substacks of stack "Outils de création" into it
answer "Are you sure you want to process this file"
That will happily replace your "it" variable.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!