NSDateFormatter refuses to format dates

2011-09-27 Thread Gerriet M. Denkmann
The following code produces an empty string: calender = [ [ NSCalendar autoupdatingCurrentCalendar ] retain ]; NSString *dateTemplate = @eeeddHHmmss; NSLocale *locale = [calender locale]; // en_IE NSString *dateFormat = [ NSDateFormatter

Re: Questions about -orderFrontTablePanel:

2011-09-27 Thread Ulf Dunkel
Hi Andreas. NSTextView has built-in support for text tables, which provides the easiest way to add table support to your text view. This table support is in the form of the action method orderFrontTablePanel:. This method inserts a table into the text view and opens a modeless utility window

Re: controller question

2011-09-27 Thread Keary Suska
On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote: On Sep 26, 2011, at 19:03 , Ariel Feinerman wrote: if I use persistence NSMutableArray as content array in NSArrayController so [arrayController setContent: m_array]; will controller copy one or retain? The array controller will *observe*

Re: NSDateFormatter refuses to format dates

2011-09-27 Thread Gerriet M. Denkmann
On 27 Sep 2011, at 21:39, Fritz Anderson wrote: On 27 Sep 2011, at 3:41 AM, Gerriet M. Denkmann wrote: [ dateFormatter setGeneratesCalendarDates: YES ]; ... NSLog(@ now \%@\, [dateFormatter stringFromDate: [NSDate date]]); NSCalendarDate is really most sincerely deprecated,

Re: NSDateFormatter refuses to format dates

2011-09-27 Thread glenn andreas
On Sep 27, 2011, at 9:53 AM, Gerriet M. Denkmann wrote: In general, what happens if you temporarily remove the locale and time zone settings? The time zone settings have been already removed, because setting the locale also sets the time zone. NSLocale has no idea about time zones -

Re: NSDateFormatter refuses to format dates

2011-09-27 Thread Gerriet M. Denkmann
On 27 Sep 2011, at 22:03, glenn andreas wrote: On Sep 27, 2011, at 9:53 AM, Gerriet M. Denkmann wrote: In general, what happens if you temporarily remove the locale and time zone settings? The time zone settings have been already removed, because setting the locale also sets the

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-27 Thread Jerry Krinock
On 2011 Sep 26, at 11:57, Dave Fernandes wrote: Does the deleted object have relationships? Yes. The object is of entity Foo which are classic tree nodes. There is a root Foo; Foo objects have to-one parents and to-many children, etc. What is the state of those objects? It's always the

Re: Why does Xcode define IBOutlet with @synthesize?

2011-09-27 Thread Matt Neuburg
On Fri, 23 Sep 2011 22:08:43 -0700, Jerry Krinock je...@ieee.org said: Yes. After studying this some more I see that, in older code, I did not declare outlets as properties. Instead, I put the IBOutlet directive on the ivar, @interface MyWinCon : NSWindowController { IBOutlet FooView

Re: Why does Xcode define IBOutlet with @synthesize?

2011-09-27 Thread David Duncan
On Sep 27, 2011, at 10:06 AM, Matt Neuburg wrote: On Fri, 23 Sep 2011 22:08:43 -0700, Jerry Krinock je...@ieee.org said: Yes. After studying this some more I see that, in older code, I did not declare outlets as properties. Instead, I put the IBOutlet directive on the ivar,

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 07:40 , Keary Suska wrote: On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote: On Sep 26, 2011, at 19:03 , Ariel Feinerman wrote: if I use persistence NSMutableArray as content array in NSArrayController so [arrayController setContent: m_array]; will controller copy one

Re: controller question

2011-09-27 Thread Ariel Feinerman
Thank you for your letters. So it is good news. Do -insertObject: atIndex:, -removeObject: or removeObjects: use KVO? I guess they do. 2011/9/27 Quincey Morris quinceymor...@rivergatesoftware.com On Sep 27, 2011, at 07:40 , Keary Suska wrote: On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote:

Re: controller question

2011-09-27 Thread Kyle Sluder
Whoops, apparently only sent this to Quincey. So unfortunately, no good news for you, Ariel. You need to either bind the controller's contentArray binding, or manually set its contentObject property. The insertion and removal methods on NSArray cannot possibly be KVO-compliant because NSArray in

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 12:18 , Ariel Feinerman wrote: So it is good news. Do -insertObject: atIndex:, -removeObject: or removeObjects: use KVO? I guess they do. If you use these methods, you don't have to write any manual synchronization code. Your original array will contain the modified

Re: Why does Xcode define IBOutlet with @synthesize?

2011-09-27 Thread Greg Parker
On Sep 27, 2011, at 10:06 AM, Matt Neuburg wrote: On Fri, 23 Sep 2011 22:08:43 -0700, Jerry Krinock je...@ieee.org said: Yes. After studying this some more I see that, in older code, I did not declare outlets as properties. Instead, I put the IBOutlet directive on the ivar, @interface

debugging crashes in dyld?

2011-09-27 Thread Martin Wierschin
Hello everyone, I have a user reporting a crash whenever they try to first save a file. It is reproducible for the user (though not be me) and I'm wondering how to best debug this problem remotely. I've included the crash stack below (all other threads are waiting/trapped). I'm no expert on

Re: Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-27 Thread Eric Wing
On 9/21/11, Jens Alfke j...@mooseyard.com wrote: On Sep 21, 2011, at 7:42 PM, Eric Wing wrote: I have been using the delegate callback textField:shouldChangeCharactersInRange:replacementString for UITextField. I am trying to port code over to Mac using NSTextField. Is there something that

Re: NSDateFormatter refuses to format dates

2011-09-27 Thread Vincent Spader
On Sep 27, 2011, at 1:41 AM, Gerriet M. Denkmann wrote: The following code produces an empty string: calender = [ [ NSCalendar autoupdatingCurrentCalendar ] retain ]; NSString *dateTemplate = @eeeddHHmmss; NSLocale *locale = [calender locale]; // en_IE

Re: debugging crashes in dyld?

2011-09-27 Thread Greg Parker
On Sep 27, 2011, at 2:06 PM, Martin Wierschin wrote: I have a user reporting a crash whenever they try to first save a file. It is reproducible for the user (though not be me) and I'm wondering how to best debug this problem remotely. I've included the crash stack below (all other threads

Re: Equivalent of UITextField's textField:shouldChangeCharactersInRange:replacementString for NSTextField

2011-09-27 Thread Aki Inoue
Eric, We really recommend looking at the approach I described earlier using NSFormatter subclass for input validation. - (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString

Re: Numeric Entry and Formatting With NSNumberFormatter Won't Append Zeros

2011-09-27 Thread Philip McIntosh
Subject: Re: Numeric Entry and Formatting With NSNumberFormatter Won't Append Zeros To: Philip McIntosh ndpmcint...@earthlink.net Cc: cocoa-dev@lists.apple.com Message-ID: 62796e49-61ed-4b4a-8315-bdeaabeb4...@manoverboard.org Content-Type: text/plain; charset=windows-1252 On 23 Sep

Re: NSDateFormatter refuses to format dates

2011-09-27 Thread Gerriet M. Denkmann
On 28 Sep 2011, at 04:51, Vincent Spader wrote: On Sep 27, 2011, at 1:41 AM, Gerriet M. Denkmann wrote: The following code produces an empty string: calender = [ [ NSCalendar autoupdatingCurrentCalendar ] retain ]; NSString *dateTemplate = @eeeddHHmmss; NSLocale

Re: controller question

2011-09-27 Thread Ariel Feinerman
So in the case of insertion to m_array, we just have to reset content property: // somewhere in the code [self willChangeValueForKey: @content]; [m_array insertObject: url atIndex: 0]; [self didChangeValueForKey: @content]; // in the -observeValue... [controller setContent: m_array]; well?

Trouble creating dictionary

2011-09-27 Thread Dale Satterfield
I have the following code which creates two arrays of 97 elements each, then creates an NSDictionary. However, the dictionary only has 30 elements in it, and reports no errors during creation. None of the keys should be a duplicate . tzKeys = [NSArray

Re: Trouble creating dictionary

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 18:21 , Dale Satterfield wrote: tzDict = [NSDictionary dictionaryWithObjects:tzKeys forKeys:tzValues]; Don't you mean: tzDict = [NSDictionary dictionaryWithObjects:tzValues forKeys:tzKeys]; ___ Cocoa-dev mailing

Re: Trouble creating dictionary

2011-09-27 Thread Graham Cox
On 28/09/2011, at 11:21 AM, Dale Satterfield wrote: tzDict = [NSDictionary dictionaryWithObjects:tzKeys forKeys:tzValues]; You've transposed the values and the keys here, and since the values are not unique, you end up with only 30 unique keys (which are really the values). --Graham

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 17:51 , Ariel Feinerman wrote: So in the case of insertion to m_array, we just have to reset content property: // somewhere in the code [self willChangeValueForKey: @content]; [m_array insertObject: url atIndex: 0]; [self didChangeValueForKey: @content]; //

Validating form input w/o core data

2011-09-27 Thread William Squires
Hi, I have a need for a complex data-entry form (window). Some fields are supposed to only accept alpha characters (upper or lower), some are supposed to only take integers, others to only take floats (but no negative values allowed). Is there a general way of validating the contents of a