Card Order

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
ds_tx
Posts: 17
Joined: Sat Jul 21, 2007 6:56 pm

Card Order

Post by ds_tx » Sat Nov 10, 2007 12:33 am

How can I change card order? Application browser shows a card number for each card in the order I created them. But I'd like to rearrange the cards in the stack. How do I go about doing that in Mac OS X?
ds_tx

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

Post by Mark » Sat Nov 10, 2007 1:42 am

Hi ds_tx,

There are several ways to do this.

set the number of this cd to 1

or

sort cards by fld "New Number" of each

or

Code: Select all

on foo
  cut this cd
  go cd 25
  paste -- after cd 25
end foo
and even

sort cards by (the number of this card <> 6) of each

to bring cd 6 to front.

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

ds_tx
Posts: 17
Joined: Sat Jul 21, 2007 6:56 pm

Post by ds_tx » Sat Nov 10, 2007 4:13 am

Mark,

Nothing happens when I paste code you provided into script editor with the card number I want, nor when i type in script editor "set the number of this card to ..." that number. Is there something I'm leaving out of the code? I even closed ap and removed from memory, then restarted but that didn't help.
ds_tx

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

Post by Mark » Sat Nov 10, 2007 10:06 am

Hi ds_tx,

What do you expect to see happening? Have you checked the card number before and after executing the code (put number of this card)? Are you sure the code is even executing?

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

Post Reply