O'Reilly logo

LiveCode Mobile Development Beginner's Guide by Colin Holgate

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – making the Home card buttons work

The Sort by Location button's script is quite something. You should look forward to that! But first, we'll start with the Sort by Time button.

  1. Edit the script of the Sort by Time button, on the first card.
  2. Type in this short handler:
    on mouseUp
       global gReminderData
       set the itemdelimiter to tab
       sort gReminderData numeric by item 4 of each 
       showdata
       writedata
    end mouseUp

    Note

    LiveCode's sort command is powerful, and in the above case, it is sorting the list of reminders based on the notification seconds value. Once the lines are sorted, the list for the user to see is recreated, and the text file is rewritten.

  3. Get mentally prepared and then edit the script of the Sort by Location button.
  4. Type in all of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required