Hi All,
In a forum thread: http://forums.livecode.com/viewtopic.php?f=53&t=29207
there is a stack that lists all livecode stacks within a folder.
The user just have to click the stack's name to open.
Now, I am trying to add a group on topleft of every open stack
(A group with 4 buttons to select one of 4 fullscreen modes)
but could not find a way to do this on Android.
How could you place a group on a new stack on Android?
Thanks in advance!
Al
Placing a group on topleft of open stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Placing a group on topleft of open stack
The place command should do what you want..
Re: Placing a group on topleft of open stack
Al is not talking about the SAME stack!shaosean wrote:The place command should do what you want..

I guess this could work:
...
## in the standalone stack
copy grp "whatever"
go stack "the user selected other one"
paste
save this stack
...
But what do I know about mobile stuff?

Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 10049
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Placing a group on topleft of open stack
The "copy" command with the "to" option should do what you need, e.g.:
The great thing about using the "copy" command's "to" clause is that it doesn't alter the user's clipboard, just faithfully performs the copy while leaving whatever the user had copied intact.
Code: Select all
copy grp "Something" of stack "SomeStack" to this cd of stack "MyStack"
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: Placing a group on topleft of open stack
Many thanks for your answers and comments! 
Now, I have added two buttons for changing
group's position in the opened stack.
I have posted an updated stack in this thread:
http://forums.livecode.com/viewtopic.php?f=53&t=29207
Both scripts works in Desktop, but only Richard's script
works in Android.
Many Thanks again for your help!
Al

Now, I have added two buttons for changing
group's position in the opened stack.
I have posted an updated stack in this thread:
http://forums.livecode.com/viewtopic.php?f=53&t=29207
Both scripts works in Desktop, but only Richard's script
works in Android.
Code: Select all
-- Script of a locked text field
on mouseup
put fld "tPath" & slash & "test.livecode" into tOriginStack
-- fld "tPath" contains the stack's folder filepath, and this line
-- produce this result:
-- (windows) C:/Documents and Settings/User/My Documents/test.livecode
-- (android) /mnt/sdcard/Documents/test.livecode
put fld "tPath" & slash & the value of the clickline into tStack
-- the text field contains a list of all livecode stacks within a folder
-- the value of clickline is the stack's filename and this line
-- produce this result (for example):
-- (windows) C:/Documents and Settings/User/My Documents/mystack.livecode
-- (android) /mnt/sdcard/Documents/mystack.livecode
go stack url "binfile:" & tStack
-- open selected stack: mystack.livecode
copy grp "FullScreenModes" of stack tOriginStack to cd 1 of this stack
-- copy group from a closed stack (test.livecode)
-- into current opened stack (mystack.livecode)
end mouseup

Al