Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
> So? It's still your outlet. Nobody else is going to touch it. You get > to define what's safe and unsafe on it, and how tightly-coupled the > class is to its nib. +1 Kyle got my point :) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Strange issue with NSPanel @"visible" keypath & observeValueForKeyPath

2011-09-07 Thread Chris Hanson
On Sep 7, 2011, at 5:58 PM, vade wrote: > I have an NSWindow, which my app controller is observing the value of > @"visible" keypath, with the following line > > [previewWindow addObserver:self forKeyPath:@"visible" > options:NSKeyValueObservingOptionNew context:NULL]; > How did you det

Strange issue with NSPanel @"visible" keypath & observeValueForKeyPath

2011-09-07 Thread vade
Hello I have an NSWindow, which my app controller is observing the value of @"visible" keypath, with the following line [previewWindow addObserver:self forKeyPath:@"visible" options:NSKeyValueObservingOptionNew context:NULL]; Running my app, and triggering an IBAction that calls order

controller problem

2011-09-07 Thread Ariel Feinerman
Hi, I have app with three view controllers nibs: in the main nib the object loads the collection of objects, in the second nib the view is used to add new objects to the collection, in the third nib there exist the table view which is used to show and remove objects from the collection. Could you

Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?

2011-09-07 Thread Shane Stanley
On Sep 7, 2011, at 10:08 AM, Shane Stanley wrote: > They don't happen when I run the same binary under 10.7, and they don't > happen under 10.6 if I change the Base SDK to 10.6. For the record, this turned out to be the result of a wonky #ifdef that changing the SDK exposed. -- Shane Stanley

Re: SecKeyRef object without KeyChain

2011-09-07 Thread Jens Alfke
On Sep 7, 2011, at 2:02 PM, jonat...@mugginsoft.com wrote: > Conrad's suggestion sounds worth a try if you can import a cert on iOS. If you already have the key wrapped in a cert, it’s easy. Creating X.509 certs is difficult, though; they’re in ASN.1, a very fiddly binary format. And wrapping

Re: using AppKit additions in background threads

2011-09-07 Thread Martin Wierschin
> I've found that NSAttributedString's initWithData:... method does a good job > of the conversion ... > One drawback to my approach is that I can't get the web page title using > NSAttributesString. When you init the NSAttributedString, you can pass in a pointer to a document attributes dictio

Re: test on device using company registration

2011-09-07 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/7/11 2:37 PM, Wilker wrote: > Hi guys, > > Today my company create a company account for iOS in order to test > our product on device. They add me as an company developer using > iTunes Connect. > > But I can't find how I create an certificate t

test on device using company registration

2011-09-07 Thread Wilker
Hi guys, Today my company create a company account for iOS in order to test our product on device. They add me as an company developer using iTunes Connect. But I can't find how I create an certificate to me in order so I can test the product on device. I searched on internet but found nothing a

Re: Printing exception on Lion

2011-09-07 Thread Andre Masse
Thank you all for your replies. Yes, my bad. This is an error log, not an exception. Glad to know its a known issue though. Thanks, Andre Masse On 07/09/2011, at 12:24 , Raleigh Ledet wrote: > This is a known problem, but it shouldn't be throwing an exception. It's just > logging an error t

Re: Set a view's delegate using IB

2011-09-07 Thread Quincey Morris
On Sep 7, 2011, at 13:20 , Luc Van Bogaert wrote: > I have a nib file that contains a "main" view object. This nib file's "file's > owner" is set to be the "main" viewcontroller. The "main" view object in this > nib has an outlet for a "delegate" property. I want to connect this outlet to > an

Re: SecKeyRef object without KeyChain

2011-09-07 Thread jonat...@mugginsoft.com
On 7 Sep 2011, at 21:50, Jens Alfke wrote: > > >> Not sure if the doc below will help or not (it's fairly recent). >> http://developer.apple.com/library/mac/#documentation/Security/Conceptual/SecTransformPG/EncryptionandDecryption/EncryptionandDecryption.html > > Unfortunately it’s for Mac, no

Re: Set a view's delegate using IB

2011-09-07 Thread Luc Van Bogaert
On 06 Sep 2011, at 21:51, Quincey Morris wrote: > On Sep 6, 2011, at 12:20 , Luc Van Bogaert wrote: > >> I've been struggling trying to set a viewcontroller (loaded by its own nib) >> as the delegate of another (main) viewcontroller's view in IB, while at the >> same time avoiding 'awakefromni

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Andy Lee
On Sep 7, 2011, at 1:51 PM, Torsten Curdt wrote: > Anyway. But I am curious - can you provide an example where you > modified an outlet? In Cocoa apps I've done setTarget: on table views where I didn't want an action but I did want to do setDoubleAction:. I don't know if that's still necessary.

Re: Windows and views and controls, oh my!

2011-09-07 Thread Quincey Morris
On Sep 7, 2011, at 11:19 , N!K wrote: > The reason I ask if a window controller is necessary is that I do not plan to > manipulate the window at all. Once it's open, I will leave it alone while > "drawing within" the views until quitting. Also, I will not be manipulating > the views as a whole.

Re: Windows and views and controls, oh my!

2011-09-07 Thread Ron Hunsinger
On Sep 7, 2011, at 11:19 AM, N!K wrote: > What I'm trying to do is really very simple. I want a pushbutton to seek data > input for the model (easily done). Then I want a pushbutton to display two > different views of the data. The pushbutton sets a flag indicating which view of the data shou

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Scott Ribe
On Sep 7, 2011, at 11:58 AM, Kyle Sluder wrote: > So? It's still your outlet. Nobody else is going to touch it. You get > to define what's safe and unsafe on it, and how tightly-coupled the > class is to its nib. Yes, which is why it would not be good for Apple to design their frameworks with th

Re: Windows and views and controls, oh my!

2011-09-07 Thread N!K
Thank you. This helps me with higher level issues On Sep 5, 2011, at 9:42 PM, Quincey Morris wrote: > On Sep 5, 2011, at 20:43 , N!K wrote: > >> The examples I've seen all show a window with a view in it and how to draw >> in that view. But I want to put up a window with a couple of views in

[MEET] CocoaHeadsNYC tomorrow (Thu) -- Greg Casamento

2011-09-07 Thread Andy Lee
Bring questions! > When: Thu Sep 8, 2011, 6:30-8:00 PM, followed by pizza at Patsy's. > > Who: Greg Casamento, lead developer on the GNUstep project. > > What: Greg will discuss the history and current status of the project, and > will give a demo. > >

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread glenn andreas
On Sep 7, 2011, at 12:51 PM, Torsten Curdt wrote: >>> So far I have never had to set an outlet itself in code myself. Do >>> people really do this? >> >> It's not common, but the point remains, outlets are not at all immutable. > > AFAIK AppKit only writes to the outlets once. You may only acce

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Kyle Sluder
On Wed, Sep 7, 2011 at 7:01 AM, Scott Ribe wrote: > On Sep 7, 2011, at 1:33 AM, Torsten Curdt wrote: > >> So far I have never had to set an outlet itself in code myself. Do >> people really do this? > > It's not common, but the point remains, outlets are not at all immutable. So? It's still your

Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?

2011-09-07 Thread Kyle Sluder
On Wed, Sep 7, 2011 at 10:44 AM, Quincey Morris wrote: > On Sep 7, 2011, at 10:06 , Sean McBride wrote: >> It's not a case of "trying to take advantage of 10.7 features", it's a case >> of 10.7's "Resume" feature breaking *binary* compatibility of apps built >> with 10.6 deployment & 10.6 SDK. >

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
>> So far I have never had to set an outlet itself in code myself. Do >> people really do this? > > It's not common, but the point remains, outlets are not at all immutable. AFAIK AppKit only writes to the outlets once. You may only access outlets only after a documented safe point. If one assumes

Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?

2011-09-07 Thread Sean McBride
On Wed, 7 Sep 2011 10:44:41 -0700, Quincey Morris said: >> Not to speak for the OP, but I am in the same situation as him. > >If the "situation" you mean is what you describe in the rest of your >post, you're not in the same situation. The OP's very first sentence was: Quite right, sorry about th

Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?

2011-09-07 Thread Quincey Morris
On Sep 7, 2011, at 10:06 , Sean McBride wrote: > Not to speak for the OP, but I am in the same situation as him. If the "situation" you mean is what you describe in the rest of your post, you're not in the same situation. The OP's very first sentence was: > On Sep 6, 2011, at 03:33 , Oleg Krupn

Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?

2011-09-07 Thread Sean McBride
On Tue, 6 Sep 2011 21:23:45 -0700, Chris Hanson said: >>> And has been discussed in the rest of the thread, you should not >leave your Base SDK set to an earlier OS and then invoke methods >introduced in a later OS, because the new methods may require new-OS >framework behavior. >> >> When did I s

Re: Distributed Notification observing change in Lion?

2011-09-07 Thread Ben Gollmer
On Sep 7, 2011, at 11:48 AM, Matt Gough wrote: > I have an observer for a Dist notification in my app. In Lion, my observer > doesn't actually get called until I interact with my app in some way (i.e > show a menu, or click on a window). Until I do that it doesn't get delivered. > > I have chec

Re: Printing exception on Lion

2011-09-07 Thread Raleigh Ledet
This is a known problem, but it shouldn't be throwing an exception. It's just logging an error to the console that you can ignore. If it is throwing an actual exception and preventing printing from working, let me know. -raleigh On Sep 7, 2011, at 9:06 AM, Corbin Dunn wrote: > > On Sep 7, 20

Re: Printing exception on Lion

2011-09-07 Thread Corbin Dunn
On Sep 7, 2011, at 5:58 AM, Andre Masse wrote: > Hi, > > I'm trying to implement printing in my application. I was following Aaron > Hillegass book (Cocoa Programming for Mac OS X, chap 27) and while it does > print, I got an exception. So, I downloaded the examples on the book's site > (http

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Scott Ribe
On Sep 7, 2011, at 1:33 AM, Torsten Curdt wrote: > So far I have never had to set an outlet itself in code myself. Do > people really do this? It's not common, but the point remains, outlets are not at all immutable. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 7

How to make NSImageCell draw an NSImage template in white?

2011-09-07 Thread Gabriele de Simone
I'm trying to mimic the following automatic behavior of NSTableView/NSOutlineView: When drawing NSImageCells that use a "template" NSImage (either because the image name ends with "Template" or because -[NSImage setTemplate:YES] was called), the table view automatically renders the image in whi

Re: Printing exception on Lion

2011-09-07 Thread Buddy Kurz
I have the same problem and am looking forward to hearing a solution. Sounds like the view is trying to mess with the shadow around it's window when there is no window. buddy kurz On Sep 7, 2011, at 5:58 AM, Andre Masse wrote: > Hi, > > I'm trying to implement printing in my application. I wa

Distributed Notification observing change in Lion?

2011-09-07 Thread Matt Gough
I have an observer for a Dist notification in my app. In Lion, my observer doesn't actually get called until I interact with my app in some way (i.e show a menu, or click on a window). Until I do that it doesn't get delivered. I have checked that the notification gets posted when I expect it fro

Printing exception on Lion

2011-09-07 Thread Andre Masse
Hi, I'm trying to implement printing in my application. I was following Aaron Hillegass book (Cocoa Programming for Mac OS X, chap 27) and while it does print, I got an exception. So, I downloaded the examples on the book's site (http://bignerdranch.com/book/cocoa®_programming_for_mac®_os_x_3rd

Re: Getting notification about new font is available

2011-09-07 Thread Rimas M.
Hello Martin, Thank you - that helped. And, as you have mentioned, additional checking is required due to "unnecessary" update calls. Regards, p.s. I still don't like Xcode 4. I have overlooked NSFont's class notifications because of removed TOC at documentation viewer. Rimas M. On Tue, Sep 6,

Re: NSURLConnection problem on Mac OS X 10.7

2011-09-07 Thread Mike Abdullah
Show us some code. On 2 Sep 2011, at 14:27, Payal Mundhada wrote: > > Hi All, > > I am making a web service call with NSURLConnection. > > Response is received correctly on Mac OS X 10.5 and Mac OS X 10.6. > > On Mac OS X 10.7, I am getting response as "Bad Request" for the same > request.

Re: Problem in updating NSTextView on Mac OS X 10.7

2011-09-07 Thread Michael Thon
On Sep 2, 2011, at 3:25 PM, Payal Mundhada wrote: > > > > > Hi All, > > I have programatically added NSTextView Object. > > I want to remove old text from it and insert the new text. This NSTextView > object is not editable. I am setting value in it using function setString. > > I want t

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
>> At the time ObjC-2 was in development there was a debate within Apple about >> whether to make ‘nonatomic’ be the default, with an ‘atomic’ keyword to >> enable the safety features. I really wish it had gone that way. +1 > Based on discussion on the dev forums, atomic properties are the reco

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
>> Given that access to the outlets >> is only valid after a certain safe point (awakeFromNib) one could >> consider outlets final/immutable and therefor synchronization should >> not be required. > > You can change outlets at any time after that. Consider changing the delegate > for some reason,

Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?

2011-09-07 Thread Chris Hanson
On Sep 6, 2011, at 11:19 PM, Oleg Krupnov wrote: > So, gentlemen, the OP has ended up completely baffled with your discussion :) > > Do I have to build and ship two separate versions of my app, for 10.6 > and for 10.7??! This would be a nightmare! No. > At the bottom line, what is the legitimat

Re: UINavigationBar Look and feel

2011-09-07 Thread Evadne Wu
I’m not sure if noting self.navigationController.navigationBar.tintColor, changing it to a new color in -viewWillAppear:, and simply zapping it back on -viewWillDisappear: would work fine. The title property of the pushed view controller is automatically used by the navigation controller. No n

Re: menu item status

2011-09-07 Thread gweston
I am trying to determine the state of a menu item in another application. I have tried via AppleScript UI scripting, and via AppleScript Studio's state of menu item. I am coming up empty. I can get to the menu and select the item fine - but I can't get the status. I am interested whether or not