Re: Advice on document handling

2014-06-20 Thread John Brownie
___ 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.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Re: Advice on document handling

2014-06-20 Thread Quincey Morris
On Jun 20, 2014, at 16:44 , John Brownie wrote: > I have a complex document bundle, and I'm trying to figure out which files > within the package have unsaved changes, and it looks like there's no support > for that model in NSDocument. I haven’t been following this thread very closely, so I m

Re: Advice on document handling

2014-06-20 Thread John Brownie
Jerry Krinock wrote: On 2014 Jun 19, at 22:15, John Brownie wrote: Looks like I need to keep a local flag for when the document gets changed and when it gets saved. No, you can just use -[NSDocument isDocumentEdited]. Back when Auto Save first appeared, in OS X 10.7, I too found that it was

Re: Advice on document handling

2014-06-20 Thread Jerry Krinock
On 2014 Jun 20, at 10:53, Kyle Sluder wrote: > As per the documentation, the first thing that -[NSDocument > autosaveWithImplicitCancellability:…] does is send > -hasUnautosavedChanges to itself and bail if that method returns NO. I don’t know, Kyle. Indeed, I’ve done more than my share of pu

Re: supportedInterfaceOrientations in Swift

2014-06-20 Thread Greg Parker
On Jun 19, 2014, at 5:39 PM, Roland King wrote: > On 20 Jun, 2014, at 5:04 am, Greg Parker wrote: >>> >>> override func supportedInterfaceOrientations() -> Int >>> { >>> } >>> >>> which makes some sense. I'm tripping over myself trying however to return >>> the correct Int without casting my c

Re: Advice on document handling

2014-06-20 Thread Kyle Sluder
On Fri, Jun 20, 2014, at 10:33 AM, Jerry Krinock wrote: > > On 2014 Jun 19, at 22:15, John Brownie wrote: > > > Looks like I need to keep a local flag for when the document gets changed > > and when it gets saved. > > No, you can just use -[NSDocument isDocumentEdited]. > > Back when Auto Sav

Re: Advice on document handling

2014-06-20 Thread Jerry Krinock
On 2014 Jun 19, at 22:15, John Brownie wrote: > Looks like I need to keep a local flag for when the document gets changed and > when it gets saved. No, you can just use -[NSDocument isDocumentEdited]. Back when Auto Save first appeared, in OS X 10.7, I too found that it was pestering me too

Re: NSReleasePool issue

2014-06-20 Thread Sean McBride
Given the backtrace, I'd say the OP is using Mac OS, not iOS. I just created a new project in Xcode, and main() looks like this on OS X: int main(int argc, const char * argv[]) { return NSApplicationMain(argc, argv); } On Fri, 20 Jun 2014 09:32:48 -0700, Steve Christensen said: >My ma

Re: NSReleasePool issue

2014-06-20 Thread Steve Christensen
My main() looks like this. Does yours specify an autorelease pool? int main(int argc, char* argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, @"MyDelegateClassName"); } } On Jun 19, 2014, at 5:45 PM, Varun Chandramohan wrote: > I w

Re: Send msg to object by nameed NSString;

2014-06-20 Thread Trygve Inda
>> I would think 'copy' would still be ok with this (for example in the case of >> NSStrings) since that should still be released. For 'assign' I can see the >> advantage. > > It’s not just an advantage, it’s avoiding a crasher, most likely, and where > it’s not, it’s avoiding silently corrupting

Re: Send msg to object by nameed NSString;

2014-06-20 Thread Graham Cox
On 20 Jun 2014, at 7:13 pm, Daniel DeCovnick wrote: > No, because unless you also override -setNilValueForKey: for your classes > that do this, you will raise an NSInvalidArgumentException. That's not the case for object properties, only for scalar properties. It's perfectly fine to pass ni

Re: Bindings setup with NSCollectionViews

2014-06-20 Thread Hajder Rabiee
Thanks. That did it ! On Thu, Jun 19, 2014 at 6:07 PM, Willeke wrote: > Bind the Selection Indexes of the master collection view to > selectionIndexes of the BoardArrayController. > I would bind the Contents of the detail collection view to arrangedObjects > of the ListArrayController. > > Will

Re: Send msg to object by nameed NSString;

2014-06-20 Thread Daniel DeCovnick
On Jun 18, 2014, at 4:54 PM, Graham Cox wrote: > > On 19 Jun 2014, at 4:53 am, Daniel DeCovnick wrote: > >> Yes. You can either use key-value coding: [[self valueForKey:myString] >> release]; > > >> [value release]; > > > > These invocations of -release appear to be erroneous. Why do y