Re: Stupid block syntax!

2012-07-03 Thread Lee Ann Rucker
> Could the stupid block syntax be any less intuitive? Sure. It could be a C++ block syntax and mix some '*', '&' and 'const's in there :) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: Stupid block syntax!

2012-07-03 Thread Quincey Morris
On Jul 3, 2012, at 22:40 , Graham Cox wrote: > NSComparisonResult (^comp)( id, id > ) = ^( id a, id b ) Actually, for a block literal, it's: … = ^NSComparisonResult ( id a, id b ) { … } The literal syntax puts the return type after the [unparenthesized] "^", unlike the pointer

Re: Stupid block syntax!

2012-07-03 Thread Charles Srstka
On Jul 4, 2012, at 12:40 AM, Graham Cox wrote: > > Could the stupid block syntax be any less intuitive? There’s a reason that the very first items in the Code Snippets inspector are block declarations. Charles ___ Cocoa-dev mailing list (Cocoa-dev@l

Re: Stupid block syntax!

2012-07-03 Thread Ken Thomases
On Jul 4, 2012, at 12:40 AM, Graham Cox wrote: > Why doesn't this compile? > > > NSComparisonResult (^comp)( id, id > ) = ^( id a, id b ) > { > if( a.index < b.index ) > return NSOrderedAscending; > else if ( a.index > b.index ) >

Re: Stupid block syntax!

2012-07-03 Thread Roland King
Put 'NSComparisonResult' after = and before ^ to declare the return value of the block in the code below. When that fails. Err. Not sure. > NSComparisonResult (^comp)( id, id ) = ^( > id a, id b ) { On 4 Jul, 2012, at 13:40, Graham Cox wrote: > Why doesn't this compile? > > >NSCo

Stupid block syntax!

2012-07-03 Thread Graham Cox
Why doesn't this compile? NSComparisonResult (^comp)( id, id ) = ^( id a, id b ) { if( a.index < b.index ) return NSOrderedAscending; else if ( a.index > b.index ) return NSOrderedDescending;

[MEET] Toronto Cocoaheads / tacow - July 10

2012-07-03 Thread David LeBer
tacow's next meeting is scheduled for 6:30 PM on Tuesday, July 10, 2012 in meeting room 303 of Metro Hall. Derek Longmuir will be discussing continuous deployment for iOS using Jenkins. Additional details can be found at . All are welcome, and we look forward to seeing you t

Re: CheckEventQueueForUserCancel() equivalent in Cocoa ?

2012-07-03 Thread Charles Srstka
On Jul 3, 2012, at 10:16 AM, Eric Matecki wrote: > everything is in the subject, what's the equivalent for > CheckEventQueueForUserCancel() in Cocoa ? There are multiple ways to implement a user cancel operation, depending on your design. Probably the easiest way to do it is to put your worker-

Re: iCloud/Core Data docs for Mac ?

2012-07-03 Thread Kyle Sluder
On Jul 3, 2012, at 10:23 AM, Koen van der Drift wrote: > Are there any Apple OSX docs on how to use iCloud and Core Data? All I > could find was some release notes for iOS: > http://developer.apple.com/library/ios/#releasenotes/DataManagement/RN-iCloudCoreData/_index.html. There is no special Co

iCloud/Core Data docs for Mac ?

2012-07-03 Thread Koen van der Drift
Are there any Apple OSX docs on how to use iCloud and Core Data? All I could find was some release notes for iOS: http://developer.apple.com/library/ios/#releasenotes/DataManagement/RN-iCloudCoreData/_index.html. Thanks, - Koen. ___ Cocoa-dev mailing l

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Rainer Brockerhoff
On Jul 3, 2012, at 12:11 , Andy Lee wrote: > On Jul 3, 2012, at 10:31 AM, Rainer Brockerhoff wrote: >> Now that's an interesting idea, thanks Andy! I'll look into it soon, I hope. > > P.P.S. I'm not sure how to deal with autolayout constraints that might get > broken. Does replaceSubview:with: t

CheckEventQueueForUserCancel() equivalent in Cocoa ?

2012-07-03 Thread Eric Matecki
Hi, everything is in the subject, what's the equivalent for CheckEventQueueForUserCancel() in Cocoa ? Thanks. -- Keep intel OUTSIDE my Mac ! Hiii !!! I can see Intel chips creeping around my G5 ! Eric M. ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Andy Lee
On Jul 3, 2012, at 10:31 AM, Rainer Brockerhoff wrote: > > On Jul 3, 2012, at 11:03 , Andy Lee wrote: > >> I haven't used RBSplitView, but it sounds like it might be handy to have a >> method for replacing an already-set-up NSSplitView with an RBSplitView. >> Maybe it could be a category meth

Re: Write Finder plugin

2012-07-03 Thread Rakesh Singhal
Hi All, Thanks to all of you for your response. I will use Services. I hope, I would get some sample code with proper documentation to implement this. Please let me know if it is possible to do in python. Regards, Rakesh Singhal On Tue, Jul 3, 2012 at 2:33 AM, John C. Randolph wrote: > > On Ju

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Andy Lee
On Jul 3, 2012, at 10:31 AM, Rainer Brockerhoff wrote: > On Jul 3, 2012, at 11:03 , Andy Lee wrote: > >> I haven't used RBSplitView, but it sounds like it might be handy to have a >> method for replacing an already-set-up NSSplitView with an RBSplitView. >> Maybe it could be a category method on

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Rainer Brockerhoff
On Jul 3, 2012, at 11:03 , Andy Lee wrote: > I haven't used RBSplitView, but it sounds like it might be handy to have a > method for replacing an already-set-up NSSplitView with an RBSplitView. Maybe > it could be a category method on NSSplitView, something like this: > ... > This way you can s

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Andy Lee
I haven't used RBSplitView, but it sounds like it might be handy to have a method for replacing an already-set-up NSSplitView with an RBSplitView. Maybe it could be a category method on NSSplitView, something like this: - (RBSplitView *)replaceWithRBSplitView { // Retain and autorelease

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Rainer Brockerhoff
On Jul 3, 2012, at 01:46 , cocoa-dev-requ...@lists.apple.com wrote: > Date: Tue, 03 Jul 2012 10:14:21 +1000 > From: Graham Cox > Message-ID: > > On 03/07/2012, at 12:21 AM, Motti Shneor wrote: > >> I really need an advice here. > > This will sound flippant but it's not meant to be: implement

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Motti Shneor
Thanks again Graham and all the rest --- We're going somewhere now. On 3 ביול 2012, at 08:22, Graham Cox wrote: > > On 03/07/2012, at 2:46 PM, Motti Shneor wrote: > >> have the feeling I "almost got it", and I even think I understand why and >> when delegate methods are being called. Rollin