Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Quincey Morris
On Mar 26, 2013, at 14:14 , Conrad Shultz wrote: > Step #1 in my hypothetical was that in the future a *required* delegate > method be added, in which case there would be no -respondsToSelector: check. 1. Your earlier suggestion of having *two* delegate objects would certainly be one way of en

custom insertion point

2013-03-26 Thread Peng Gu
Hi, I'm changing the insertion point size by overriding *-(void)drawInsertionPointInRect:(NSRect)aRect color:(NSColor *)aColor turnedOn:(BOOL)flag, *But it doesn't handle the first blink (when you move the insertion point, it goes back to normal) I managed to handle the first blink by overriding

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Conrad Shultz
On Mar 26, 2013, at 2:05 PM, Marco S Hyman wrote: >> 3) The TKOutlineView then later attempts to send the >> message from #1 above to its delegate. > > The code noted earlier used introspection to ensure the delegate responded > to the selector before the message was sent. A non TKOutlineVie

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Marco S Hyman
> 3) The TKOutlineView then later attempts to send the > message from #1 above to its delegate. The code noted earlier used introspection to ensure the delegate responded to the selector before the message was sent. A non TKOutlineViewDelegate conforming object won't respond to the selector. T

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Conrad Shultz
On Mar 26, 2013, at 1:40 PM, Quincey Morris wrote: > On Mar 26, 2013, at 13:11 , Conrad Shultz wrote: > >> If code expecting an NSOutlineView receives a TKOutlineView instance it may >> break or behave unexpectedly since it may well try to set a delegate >> conforming to but you have made

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Seth Willits
On Mar 26, 2013, at 1:40 PM, Quincey Morris wrote: >> If code expecting an NSOutlineView receives a TKOutlineView instance it may >> break or behave unexpectedly since it may well try to set a delegate >> conforming to but you have made your class require a >> delegate conforming to the more s

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Quincey Morris
On Mar 26, 2013, at 13:11 , Conrad Shultz wrote: > If code expecting an NSOutlineView receives a TKOutlineView instance it may > break or behave unexpectedly since it may well try to set a delegate > conforming to but you have made your class require a > delegate conforming to the more specif

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Chris Tracewell
On Mar 26, 2013, at 1:11 PM, Conrad Shultz wrote: > If code expecting an NSOutlineView receives a TKOutlineView instance it may > break or behave unexpectedly since it may well try to set a delegate > conforming to but you have made your class require a > delegate conforming to the more speci

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Conrad Shultz
On Mar 26, 2013, at 12:58 PM, Chris Tracewell wrote: > On Mar 26, 2013, at 12:38 PM, Quincey Morris > wrote: > >> 2. Redeclare the "delegate" property: >> >> @interface TKOutlineView : NSOutlineView {} >> @property (nonatomic,readonly) id delegate; >> @end >> >> @impleme

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Chris Tracewell
On Mar 26, 2013, at 12:38 PM, Quincey Morris wrote: > 2. Redeclare the "delegate" property: > > @interface TKOutlineView : NSOutlineView {} > @property (nonatomic,readonly) id delegate; > @end > > @implementation TKOutlineView > @dynamic delegate; > … >

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Chris Tracewell
On Mar 26, 2013, at 12:38 PM, Quincey Morris wrote: > 2. Redeclare the "delegate" property: > > @interface TKOutlineView : NSOutlineView {} > @property (nonatomic,readonly) id delegate; > @end > > @implementation TKOutlineView > @dynamic delegate; > … >

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Quincey Morris
On Mar 26, 2013, at 10:30 , Chris Tracewell wrote: > How can I get [self delegate] to recognize my custom methods? There are two ways, one simpleminded, the other a bit sophisticated: 1. Use a local variable: id delegate = [self delegate]; … [delegate outlineView:self

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Lee Ann Rucker
On Mar 26, 2013, at 10:30 AM, Chris Tracewell wrote: > @protocol TKOutlineViewDelegate // because we need to > use "respondsToSelector" Try @protocol TKOutlineViewDelegate ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Better way to create a 'grouped' array from a NSArray?

2013-03-26 Thread Seth Willits
On Mar 26, 2013, at 1:12 AM, Diederik Meijer | Ten Horses wrote: > But I'd like to know if there is a quicker or more efficient way to do this, > with less code. If so, please let me know. More efficient, yes. Better? Different way to look at it at least: NSArray * orderedHits = [[result val

Re: Custom Delegate - Using _delegate works but not delegate or [self delegate]

2013-03-26 Thread Chris Tracewell
On Mar 25, 2013, at 7:33 PM, Conrad Shultz wrote: > In the code you shared you had used "delegate" in one place and "[self > delegate]" in another; the second case is the correct one. If you replace all > naked uses of "delegate" with "[self delegate]" and you continue to get > compile-time er

Re: Master - Detail

2013-03-26 Thread Alex Kac
We've had a lot of success with this: https://github.com/mattgemmell/MGSplitViewController though we've customized the heck out of it too... On Mar 26, 2013, at 10:34 AM, Fritz Anderson wrote: > On 25 Mar 2013, at 7:13 PM, koko wrote: > >> The Master - Detail template for an iOS app is a good

Re: Master - Detail

2013-03-26 Thread Fritz Anderson
On 25 Mar 2013, at 7:13 PM, koko wrote: > The Master - Detail template for an iOS app is a good place to start but, …. > > … how does one size the split view to proportions dictated by the new app > being developed? You don't. UISplitViewController is hard-coded to make the master view 320 po

Better way to create a 'grouped' array from a NSArray?

2013-03-26 Thread Diederik Meijer | Ten Horses
Dear list, I need to create a grouped array from a simple array, it then populates a grouped UITableView. Below is my code, which works fine (the project uses ARC). But I'd like to know if there is a quicker or more efficient way to do this, with less code. If so, please let me know. NSArray