[moderator] Reminder - Mac OS X 10.8 beta is under non-disclosure. Do not discuss here.

2012-05-08 Thread Scott Anguish
The Mac OS X 10.8 beta is still under NDA, and shouldn’t be discussed here. Apple has forums at devforums.apple.com that in some cases allow this discussion. Discussion of it here will cause moderation and possible expulsion. Same for unreleased iOS versions. Thanks for your cooperation folks.

Window cascading

2012-05-08 Thread ecir hana
Hello, I create a window like this: id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO] autorelease]; [window cascadeTopLeftFromPoint:NSMakePoint(20,20)]; but it cascades just vertically - the next wi

Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare

2012-05-08 Thread Gregory Weston
Martin Wierschin wrote: >> If I understand Quincey correctly, that's exactly what he's saying: the >> semantics of localizedCaseInsensitiveCompare: might be such that it is not >> appropriate for such algorithms. > > As Jens mentioned, that doesn't make any sense. What good is a localized > co

Re: monitoring changes in a local property

2012-05-08 Thread Koen van der Drift
On Tue, May 8, 2012 at 12:27 AM, Quincey Morris wrote: > It's not obvious why you need a "mySelection" property at all. It's used in a master-detail setup in my application. Briefly, my application has the familiar Mail layout: A column (outlineview) on the left with groups, then a column (tabl

iOS launch Music app?

2012-05-08 Thread Eric E. Dolecki
I know I can launch the iTunes app from my own (itms-apps://) What is the prefix for Apple's Music.app? I'd like to launch it from a button. Thanks, Eric ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Window cascading

2012-05-08 Thread Richard Somers
On May 8, 2012, at 3:01 AM, ecir hana wrote: > I create a window like this: > > id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, > 200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered > defer:NO] autorelease]; > [window cascadeTopLeftFromPoint:NSMakePoint(20,20

Re: My app thinks it is a phone. Why?

2012-05-08 Thread Alex Zavatone
On May 7, 2012, at 10:14 PM, Gerriet M. Denkmann wrote: > > On 8 May 2012, at 01:08, David Duncan wrote: > >> On May 5, 2012, at 10:15 PM, Gerriet M. Denkmann wrote: >> >>> My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a >>> window, just two objects, one of this is a

Re: Window cascading

2012-05-08 Thread ecir hana
Thank you for the reply! Yes, document-based. However, not sure if it is an issue, but I have my own subclassed window controller. The docs also say that the default for "shouldCascadeWindows" is YES. I tried to set it to YES in "setShouldCascadeWindows:", without luck. I look at the EnhancedDat

Re: Window cascading

2012-05-08 Thread Richard Somers
On May 8, 2012, at 8:51 AM, ecir hana wrote: > Yes, document-based. > > However, not sure if it is an issue, but I have my own subclassed window > controller. The docs also say that the default for "shouldCascadeWindows" is > YES. I tried to set it to YES in "setShouldCascadeWindows:", without

Re: Window cascading

2012-05-08 Thread ecir hana
Thanks! Will look at it. On Tue, May 8, 2012 at 5:22 PM, Richard Somers wrote: > On May 8, 2012, at 8:51 AM, ecir hana wrote: > > > Yes, document-based. > > > > However, not sure if it is an issue, but I have my own subclassed window > controller. The docs also say that the default for "shouldCas

Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare

2012-05-08 Thread Jens Alfke
On May 8, 2012, at 3:18 AM, Gregory Weston wrote: > How about simply being able to test for equivalence? Then it shouldn’t claim to support ordering, i.e. it would just be - (BOOL) localizedCaseInsensitiveIsEqualToString: (NSString*)str; —Jens ___

saveDocument:

2012-05-08 Thread ecir hana
Hello, please, could you clarify one thing for me? In document-based apps, if I were to implement my own document controller, how would I trigger the saving of a file? In other words, in menu there is an item which fires "saveDocument:" and in document there is a method "saveDocument:" - how does

self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
Hi, I have a text field that when I try to set it to a literal string fails: This is the code: self.myTextField.stringValue = @""; (It also fails if the literal string is not empty). This is the (partial) backtrace: 2012-05-08 18:09:28.516 MyApp[18775:507] *** Assertion failure in -[NSTextFiel

Re: Strange issue in stroking a bezier path

2012-05-08 Thread Peter Teeson
On 2012-05-05, at 7:55 PM, Kyle Sluder wrote: > On May 5, 2012, at 4:46 PM, Jens Alfke wrote: >> >> (IIRC there are some AppKit geometry utility functions that will adjust >> coordinate values to fit pixel boundaries in a resolution-independent way. I >> don’t remember their names offhand.) > -

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Charlie Dickman
Read the message... Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] Invalid parameter not satisfying: aString != nil On May 8, 2012, at 12:15 PM, Antonio Nunes wrote: > Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] > Invalid parameter not sati

Re: saveDocument:

2012-05-08 Thread Fritz Anderson
On 8 May 2012, at 11:11 AM, ecir hana wrote: > please, could you clarify one thing for me? In document-based apps, if I > were to implement my own document controller, how would I trigger the > saving of a file? In other words, in menu there is an item which fires > "saveDocument:" and in document

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Jens Alfke
On May 8, 2012, at 9:28 AM, Charlie Dickman wrote: > @"" is the nil string and the compiler is smart enough to make the > substitution. Um … pardon me, but WTF? There is no such thing as a “nil string” object. @“” is a perfectly valid NSString instance with a non-nil pointer. It just happens

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Eeyore
There's definitely a nil being passed somewhere it shouldn't, I don't have any insights on that based on what was posted. However, I don't think @"" will be nil (at least it isn't in Xcode 4.3.2 for iOS 5.1): NSString* theString = @""; NSLog(@"%p", theString); prints 2012-05-08 09:54:20.270 i

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Jens Alfke
On May 8, 2012, at 9:15 AM, Antonio Nunes wrote: > I have a text field that when I try to set it to a literal string fails: > This is the code: > self.myTextField.stringValue = @""; (It also fails if the literal string is > not empty). That is quite bizarre. So much so that I’m assuming that t

Re: My app thinks it is a phone. Why?

2012-05-08 Thread David Duncan
On May 7, 2012, at 7:14 PM, Gerriet M. Denkmann wrote: > On 8 May 2012, at 01:08, David Duncan wrote: > >> On May 5, 2012, at 10:15 PM, Gerriet M. Denkmann wrote: >> >>> My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a >>> window, just two objects, one of this is an UIA

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
On 8 May 2012, at 19:01, Jens Alfke wrote: > On May 8, 2012, at 9:15 AM, Antonio Nunes wrote: > >> I have a text field that when I try to set it to a literal string fails: >> This is the code: >> self.myTextField.stringValue = @""; (It also fails if the literal string is >> not empty). > > Tha

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Ben Kennedy
On 08 May 2012, at 9:28 am, Charlie Dickman wrote: >> Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] >> Invalid parameter not satisfying: aString != nil > > @"" is the nil string and the compiler is smart enough to make the > substitution. Certainly not true. @"" is

Re: Issue when hiding NSTableColumn while resizing

2012-05-08 Thread Thibault Martin-Lagardette
On 6 May 2012, at 08:22, Quincey Morris wrote: On May 1, 2012, at 06:40 , Thibault Martin-Lagardette wrote: The problem in the end is that not only do I have a visual glitch, but this also feels like a very hacky/dirty solution, and hence, not the way to go. I feel like I probably should not be t

Re: NSView + NSScrollView, not scrolling

2012-05-08 Thread Andy Lee
On May 5, 2012, at 3:31 AM, qvacua wrote: > - (void)keyDown:(NSEvent *)theEvent { >unichar key = [[theEvent characters] characterAtIndex:0]; >NSLog(@"\\U%X pressed", (int)key); > >[self interpretKeyEvents:[NSArray arrayWithObject:theEvent]]; > } > > - (BOOL)acceptsFirstResponder { >

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Andy Lee
Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is confusedly zeroing a non-weak pointer. I'm *really* grasping at straws, though. Are there any bindings on the text field? Again, I don't see why it would matter; just wondering. On May 8, 2012, at 1:13 PM, Antonio Nunes

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
On 8 May 2012, at 21:46, Andy Lee wrote: > Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is > confusedly zeroing a non-weak pointer. I'm *really* grasping at straws, > though. No ARC. No garbage collection either. > Are there any bindings on the text field? Again, I d

Mapkit annotation arrays and writing to a file

2012-05-08 Thread Alex Zavatone
I've noticed problems before with structs and NSJSONSerializaion. I was trying to write out a dictionary (or array) of the contents of mapView.annotations, yet writeDictToFile fails, while it writes a simple dict just fine. Is there a problem with the structs within the annotations, namely, the

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Corbin Dunn
On May 8, 2012, at 1:35 PM, Antonio Nunes wrote: > On 8 May 2012, at 21:46, Andy Lee wrote: > >> Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is >> confusedly zeroing a non-weak pointer. I'm *really* grasping at straws, >> though. > > No ARC. No garbage collection

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Jens Alfke
On May 8, 2012, at 2:08 PM, Alex Zavatone wrote: > I've noticed problems before with structs and NSJSONSerializaion. > I was trying to write out a dictionary (or array) of the contents of > mapView.annotations, yet writeDictToFile fails, while it writes a simple dict > just fine. > Is there a p

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Alex Zavatone
Well, I had a similar problem saving the information to a JSON file and had to rebuild the dictionary without the CLLocationCoordinate2D struct, before NSJSONSerialization would serialize the dictionary. The reason I think it's a struct is that's how it's defined in CLLocation.h and right now i

Re: iOS launch Music app?

2012-05-08 Thread Alex Zavatone
It's not listed here, but maybe this list will get you on the right path: http://wiki.akosma.com/IPhone_URL_Schemes#Maps On May 8, 2012, at 8:29 AM, Eric E. Dolecki wrote: > I know I can launch the iTunes app from my own (itms-apps://) > > What is the prefix for Apple's Music.app? I'd like to

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Conrad Shultz
On 5/8/12 2:35 PM, Alex Zavatone wrote: > Well, I had a similar problem saving the information to a JSON file > and had to rebuild the dictionary without the CLLocationCoordinate2D > struct, before NSJSONSerialization would serialize the dictionary. > > The reason I think it's a struct is that's h

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Conrad Shultz
On 5/8/12 2:35 PM, Alex Zavatone wrote: Or, more straightforward than my NSValueTransformer suggestion (which is I suppose of diminished value, no pun intended, in this scenario), you could just add methods to your annotation object (via category if you don't control the object itself), like: - (

Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Peter Teeson
This is a continuation of my previous issue stroking a bezier path. In my sub-class -initWithFrame:frame I do the following: self = [super initWithFrame:frame]; if (self) { // Initialization code here. frame.size.width = 200.0; frame.size.height = 200.0; fram

Re: Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Corbin Dunn
On May 8, 2012, at 3:16 PM, Peter Teeson wrote: > This is a continuation of my previous issue stroking a bezier path. Hi Peter, I'm not sure what issue you were having. WRT: > In my sub-class -initWithFrame:frame I do the following: >self = [super initWithFrame:frame]; >if (self) { >

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Alex Zavatone
On May 8, 2012, at 5:53 PM, Conrad Shultz wrote: > On 5/8/12 2:35 PM, Alex Zavatone wrote: >> Well, I had a similar problem saving the information to a JSON file >> and had to rebuild the dictionary without the CLLocationCoordinate2D >> struct, before NSJSONSerialization would serialize the dicti

Re: Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Kyle Sluder
On May 8, 2012, at 3:16 PM, Peter Teeson wrote: > This is a continuation of my previous issue stroking a bezier path. > In my sub-class -initWithFrame:frame I do the following: >self = [super initWithFrame:frame]; >if (self) { >// Initialization code here. >frame.size.width

Re: Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Corbin Dunn
On May 8, 2012, at 3:44 PM, Kyle Sluder wrote: > On May 8, 2012, at 3:16 PM, Peter Teeson wrote: > >> This is a continuation of my previous issue stroking a bezier path. >> In my sub-class -initWithFrame:frame I do the following: >> self = [super initWithFrame:frame]; >> if (self) { >>

Re: iOS launch Music app?

2012-05-08 Thread Michael Crawford
Have you considered Scripting Bridge? You can use this to not only launch iTunes but also to do anything that can be done using the supported AppleScript interface. -Michael On May 8, 2012, at 17:38, Alex Zavatone wrote: > It's not listed here, but maybe this list will get you on the right p

Re: iOS launch Music app?

2012-05-08 Thread Kyle Sluder
On May 8, 2012, at 5:53 PM, Michael Crawford wrote: > Have you considered Scripting Bridge? You can use this to not only launch > iTunes but also to do anything that can be done using the supported > AppleScript interface. Subject line says iOS. --Kyle Sluder _

Re: iOS launch Music app?

2012-05-08 Thread Michael Crawford
Oops. When I think iTunes, I think desktop. Sorry for the noise. -Michael On May 8, 2012, at 21:00, Kyle Sluder wrote: > On May 8, 2012, at 5:53 PM, Michael Crawford wrote: > >> Have you considered Scripting Bridge? You can use this to not only launch >> iTunes but also to do anything tha

Re: Window cascading

2012-05-08 Thread Peter Ammon
On May 8, 2012, at 2:01 AM, ecir hana wrote: > Why's that? Do I have to remember the returned NSPoint and pass it to > next cascadeTopLeftFromPoint:? Yes; the usual pattern is: static NSPoint cascadeLoc = {0, 0}; cascadeLoc = [window cascadeTopLeftFromPoint:cascadeLoc]; The first time this is

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
On 8 May 2012, at 23:10, Corbin Dunn wrote: > > On May 8, 2012, at 1:35 PM, Antonio Nunes wrote: > >> On 8 May 2012, at 21:46, Andy Lee wrote: >> >>> Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is >>> confusedly zeroing a non-weak pointer. I'm *really* grasping at

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Leandro Hoffman
Rather than use: self.myTextField.stringValue = @""; Couldn't you use: self.myTextField.setStringValue = @""; ? -- Leandro Hoffman ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to th

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Roland King
On May 9, 2012, at 2:41 AM, Leandro Hoffman wrote: > Rather than use: self.myTextField.stringValue = @""; > > Couldn't you use: self.myTextField.setStringValue = @""; ? > > -- > Leandro Hoffman No. That's meaningless. self.myTextField.stringValue = @""; is just syntactic sugar f

Cocoaheads Lake Forest meets tomorrow (Wednesday) night - thus begins a reading group on Matt Neuburg's Programming iOS 5, 2nd edition

2012-05-08 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, 5/9. Matt Neuburg's Programming iOS 5, second editio