Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 May, 2013, 04:22:06 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Timers in the Nspire -  (Read 773 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 00:47:15
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« on: 22 October, 2011, 19:29:27 »
0

Its quite easy:
Spoiler for Lua:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
msg = "tick"
function on.create ()
   timer.start(1) --start the timer, make it tick every second
end
function on.paint(gc)
    gc:drawString(msg, 10, 10, "top")
end

function on.timer()
    if msg == "tick" then
        msg = "tack"
    else
        msg = "tick"
    end
    platform.invalidate()
end

Sorry, I thought this was a lua question Cheesy
« Last Edit: 22 October, 2011, 19:32:25 by jimbauwens » Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.186 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.