Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Newbie Obj-C question

Newbie Obj-C question
Thread Tools
Mac Enthusiast
Join Date: Jan 2001
Status: Offline
Reply With Quote
Apr 30, 2001, 10:40 PM
 
ok, I've begun to teach myself Obj-C, and so far, PB and Interface builder ROCK!!!

Anyway, I've figured out how to modify the DotView program to include another slider that changes the width of the balls (hey, its a start) and ive made a button that calls a function "doThis"...

what I am asking, is that when i call doThis, within a for loop, i want to increment the height of the ball, call it variable y. so i have this:

- (void)doThis id)sender {
for(y = 10 ; y < 100 ; y++) {
//PAUSE FOR A HALF A SECOND
[self setNeedsDisplay:YES];
}
}
how can i pause it for half a second every cycle so that i can see the height changing gradually?

Thanks for your help
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
May 1, 2001, 06:28 AM
 
You may want to stick this in X-Dev.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:10 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2