Re: Unable to disassemble objc_assign_strongCast

2009-11-03 Thread Quincey Morris
On Nov 2, 2009, at 22:18, Kyle Sluder wrote: On Mon, Nov 2, 2009 at 10:06 PM, Roland King wrote: Haven't there been several threads recently telling people *never* to use the if( saveError ) check because saveError may be set even if the method succeeds. You can use it to determine if th

Re: Unable to disassemble objc_assign_strongCast

2009-11-02 Thread Kyle Sluder
On Mon, Nov 2, 2009 at 10:06 PM, Roland King wrote: > Haven't there been several threads recently telling people *never* to use > the if( saveError ) check because saveError may be set even if the method > succeeds. You can use it to determine if there is an error object available. If the method

Re: Unable to disassemble objc_assign_strongCast

2009-11-02 Thread Roland King
Important nitpick: NSError *saveError = nil; [importContext save:&saveError]; Methods that follow the NSError** convention are not required to actually assign a value to the saveError pointer, so you'll want to make sure to initialize saveError to nil since its a local variable. Wouldn'

Re: Unable to disassemble objc_assign_strongCast

2009-11-02 Thread Bryan Henry
Here's the normal way to do it: NSError *saveError; [importContext save:&saveError]; Important nitpick: NSError *saveError = nil; [importContext save:&saveError]; Methods that follow the NSError** convention are not required to actually assign a value to the saveError pointer, so you'll w

Re: Unable to disassemble objc_assign_strongCast

2009-11-02 Thread Stephen J. Butler
On Mon, Nov 2, 2009 at 9:47 PM, Leonardo Borsten wrote: >        NSError **saveError; >        [importContext save:saveError];  // <--- crashes here Think for a minute about what the parameter is trying to do: return an object. To do that it needs to assign to a variable the caller provides. Is t