• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Continuity -Cocoa is Awesome
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Continuity -Cocoa is Awesome


  • Subject: Re: Continuity -Cocoa is Awesome
  • From: email@hidden
  • Date: Fri, 9 May 2003 18:32:23 -0400

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.

  • Follow-Ups:
    • Re: Continuity -Cocoa is Awesome
      • From: publiclook <email@hidden>
References: 
 >Re: Continuity (From: email@hidden)

  • Prev by Date: NSMovie init
  • Next by Date: Re: NSMovie init
  • Previous by thread: Re: Continuity
  • Next by thread: Re: Continuity -Cocoa is Awesome
  • Index(es):
    • Date
    • Thread