Sort Cards

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

Post Reply
ncmac
Posts: 31
Joined: Thu Apr 27, 2006 10:29 pm

Sort Cards

Post by ncmac » Sun Mar 24, 2013 10:40 pm

Is it possible to sort the cards of a stack without automatically navigating to the first card? For example, sort cards of this stack by fld "Field" will navigate to card 1.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Sort Cards

Post by Dixie » Sun Mar 24, 2013 10:56 pm

nc mac, try...:-)

Code: Select all

on mouseUp
   lock screen
   push card
   -- do your sort
   pop card
end mouseUp
Dixie

ncmac
Posts: 31
Joined: Thu Apr 27, 2006 10:29 pm

Re: Sort Cards

Post by ncmac » Sun Mar 24, 2013 11:03 pm

Perfect! Thanks. Is unlock screen necessary at the end of the handler?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9848
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Sort Cards

Post by FourthWorld » Sun Mar 24, 2013 11:21 pm

It's only necessary to explicitly unlock the screen if you want an update to occur before idle. At idle the screen will redraw on its own.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”