Re: NSControl Subclass and First Responder

2011-05-10 Thread Wood, Tobias C
For posterity, if anyone needs the answer to this, I discovered that I need to also over-ride needsPanelToBecomeKey to return YES so that a mouse-click can give focus to the control. I found this in the ClockControl example, I'd not seen that method before. Toby On 5 May 2011, at 23:40, Wood, T

Why NSClassFromString(@"CADisplayLink")?

2011-05-10 Thread Brian Bruinewoud
Hi All, Just curious, why does this work (compiles and runs): displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget: tapped selector:@selector(respond:)]; But this doesn't link because the CADisplayLink class is missing: displayLink = [CADisplayLink

Re: transitionWithView:duration:options:animations:completion: still defeats me

2011-05-10 Thread Roland King
On 10-May-2011, at 3:12 AM, Matt Neuburg wrote: > >> Date: Mon, 09 May 2011 21:43:38 +0800 >> From: Roland King >> Subject: transitionWithView:duration:options:animations:completion: >> still defeats me >> >> I seem to have a lot of trouble with this method! A few months ago I had my >>

Re: Why NSClassFromString(@"CADisplayLink")?

2011-05-10 Thread Hank Heijink (Mailinglists)
On May 10, 2011, at 6:34 AM, Brian Bruinewoud wrote: > Hi All, > > Just curious, why does this work (compiles and runs): > >displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget: > tapped selector:@selector(respond:)]; > > But this doesn't link because the CADisplayLink

Re: IB 3x plug-in: How to add custom control which is NSMatrix with custom controls inside?

2011-05-10 Thread Laurent Daudelin
Open the view that contains the matrix in IB. Then, open the matrix. The first cell should be called "Prototype Button Cell (Radio)" or something like that. Select that prototype cell. Select "Tools -> Identity Inspector". The class identity lets you select which class this cell should be. -La

Re: Why NSClassFromString(@"CADisplayLink")?

2011-05-10 Thread David Duncan
On May 10, 2011, at 3:34 AM, Brian Bruinewoud wrote: > But this doesn't link because the CADisplayLink class is missing: > >displayLink = [CADisplayLink displayLinkWithTarget: > tapped selector:@selector(respond:)]; > > ?? > > Link error is: > > Undefined symbols for

Re: setState has no effect on an NSButton

2011-05-10 Thread David Duncan
On May 9, 2011, at 9:55 PM, Graham Cox wrote: > Why bother? Because it's more readable than all those if/else constructions, > and hence, less prone to bugs. Also, if( st == YES)...else if(st == NO) is > redundant - a BOOL can only be YES or NO. The optimiser might optimise away > the second co

Call NSView's -drawRect method manually

2011-05-10 Thread Nick
helloo. Can someone explain please, when an NSView's call -drawRect (being called manually - not by a framework) actually initiates redrawing of the frame and displaying everything that it had drawn, and when this call "doesn't initiate a thing"? in some Apple samples is see that often to display

Re: Call NSView's -drawRect method manually

2011-05-10 Thread Nick
Thank you But there is no way to call "drawRect" manually? Maybe to call it manually and then tell NSView that it had processed that method? I just found out why in Apple sample code CIVideoDemoGL drawRect could be called directly - because the drawing job was delegated to the OpenGL, and drawn by

Re: Call NSView's -drawRect method manually

2011-05-10 Thread Kyle Sluder
On Tue, May 10, 2011 at 9:45 AM, Nick wrote: > But there is no way to call "drawRect" manually? Maybe to call it > manually and then tell NSView that it had processed that method? Nope. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Re: Why NSClassFromString(@"CADisplayLink")?

2011-05-10 Thread Wim Lewis
On 10 May 2011, at 3:34 AM, Brian Bruinewoud wrote: > Just curious, why does this work (compiles and runs): > >displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget: > tapped selector:@selector(respond:)]; > > But this doesn't link because the CADisplayLink class is missi

Re: Call NSView's -drawRect method manually

2011-05-10 Thread Guillem Palou
You may bypass the message queue by calling [theView display] but be aware not to draw too many times. Guillem On 10/05/2011, at 18:59, Kyle Sluder wrote: > On Tue, May 10, 2011 at 9:45 AM, Nick wrote: >> But there is no way to call "drawRect" manually? Maybe to call it >> manually and then te

Re: Call NSView's -drawRect method manually

2011-05-10 Thread Kyle Sluder
On Tue, May 10, 2011 at 10:31 AM, Guillem Palou wrote: > You may bypass the message queue by calling [theView display] but be > aware not to draw too many times. Rather than do this, it's better to learn how the framework actually works, and behave accordingly. Don't fight the framework. --Kyle

iOS Decode H.264 video frames

2011-05-10 Thread Andy Bell
Hi All, I have a RTSP stream of H.264 video and I would like to decode the video stream. I am aware of ffmpeg but I was wondering if there are any alternatives to decoding the stream on iOS 4.x Thanks, Andy ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: Call NSView's -drawRect method manually

2011-05-10 Thread Ken Thomases
On May 10, 2011, at 11:26 AM, Nick wrote: > Can someone explain please, when an NSView's call -drawRect > (being called manually - not by a framework) actually initiates > redrawing of the frame and displaying everything that it had drawn, > and when this call "doesn't initiate a thing"? When the

A long, convoluted path... made shorter?

2011-05-10 Thread William Squires
After using Xcode/Obj-C/Cocoa to make an iPhone project (a custom phone-book app for my employer), I've come to the following conclusion(s), and maybe some of you have, also: 1) There needs to be a way to 'wrap' the .h, .m, and .xib file all into one nice 'package' (a .xhm file, maybe?), though

Re: A long, convoluted path... made shorter?

2011-05-10 Thread John Joyce
On May 10, 2011, at 8:26 PM, William Squires wrote: > 5) Along with #1 above, a way to encrypt/decrypt the .m part so that the > whole shebang could be sold to other developers without exposing the > 'how-does-it-work' underneath (unless they pay extra for the right to view > the source!) Ther

Re: A long, convoluted path... made shorter?

2011-05-10 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Most of this doesn't have anything to do with Cocoa so I will be brief and respond only to the relevant portions. On 5/10/11 6:26 PM, William Squires wrote: > After using Xcode/Obj-C/Cocoa to make an iPhone project (a custom > phone-book app for my em

PDFDocument and CGPDFDocument

2011-05-10 Thread Graham Cox
Are CGPDFDocument and PDFDocument toll-free bridged? If not, how can I get a PDFDocument from a CGPDFDocumentRef? I need to use the lower level API to extract graphic entities from a PDF, but I'd like to use PDFKit up-front to implement a page chooser. --Graham __

What state does an iOS app retain after being quit that causes it to crash on relaunch?

2011-05-10 Thread G S
We have a network-dependent app that will suffer from lengthy delays if connectivity is poor. We've found that if the user quits the app during a long network activity, the app will often crash upon its next launch. Why? It shouldn't be retaining any state between launches. Thanks for any insig

Re: What state does an iOS app retain after being quit that causes it to crash on relaunch?

2011-05-10 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/10/11 8:44 PM, G S wrote: > We have a network-dependent app that will suffer from lengthy delays if > connectivity is poor. We've found that if the user quits the app during a > long network activity, the app will often crash upon its next launch

Re: What state does an iOS app retain after being quit that causes it to crash on relaunch?

2011-05-10 Thread G S
Ah, that sounds vagely familiar now. Thanks for the pointer, Conrad. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.c

Re: What state does an iOS app retain after being quit that causes it to crash on relaunch?

2011-05-10 Thread Glenn L. Austin
On May 10, 2011, at 9:14 PM, Conrad Shultz wrote: > Your app delegate gets various notifications/messages that it can use to > perform appropriate actions at the various points in the life cycle, and > it sounds like you might need to do this. These are discussed in detail > in the section "The