Re: Continuity -Cocoa is Awesome
Re: Continuity -Cocoa is Awesome
- Subject: Re: Continuity -Cocoa is Awesome
- From: publiclook <email@hidden>
- Date: Fri, 9 May 2003 19:11:44 -0400
I don't think you want to continually create repeating timers. One
repeating timer or many one shot timers are probably what you want.
On Friday, May 9, 2003, at 06:32 PM, email@hidden wrote:
I fixed the problem. All I did was add this method to my custom view:
- (void)timerDrawingThread: (id) argument
{
NSAutoreleasePool* pool = [NSAutoreleasePool new];
[NSTimer scheduledTimerWithTimeInterval: 0.1 target: self
selector: @selector(drawFrame:) userInfo:
nil repeats: YES];
[[NSRunLoop currentRunLoop] run];
[pool release];
}
then in the awakeFromNib method of the view, I created a thread with
the view:
[NSThread detachNewThreadSelector: @selector(timerDrawingThread:)
toTarget: self withObject: nil];
That did it!
On Thursday, May 8, 2003, at 10:57 PM, email@hidden wrote:
I found that the problem is in continuing the drawing of the frames.
The purpose of the slider is to change the scaling of the coordinate
system in real time, but the drawing of the frames (and the timer
which triggers new frames) are all halted. I suppose the remedy is to
place the NSTimer and NSView in a separate thread. Would this work?
On Thursday, May 8, 2003, at 08:22 PM, John C. Randolph wrote:
On Thursday, May 8, 2003, at 04:28 PM, email@hidden wrote:
I have selected the continuous option for an NSSlider in Interface
Builder, but no action is being sent to the target with every move.
What is the problem? Thanks.
Have you made sure that:
1) the target is connected?
2) you've saved the file in IB after checking the "continuous" box?
3) the target does in fact implement the action you've selected?
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.