Re: Application is not available in the launched applications list.

2010-01-25 Thread Kyle Sluder
On Sun, Jan 24, 2010 at 11:36 PM, Ramesh P wrote: > My cocoa application is running successfully. But when I use this code > NSLog(@"%@",[[NSWorkspace sharedworkspace]launchedapplication]); > in another application, it is not printing my application name. What is the > problem with my running appl

Re: Frame/layout rect

2010-01-25 Thread Jo Meder
Hi Kyle, On 25/01/2010, at 6:57 PM, Kyle Sluder wrote: > On Sun, Jan 24, 2010 at 9:24 PM, Jo Meder wrote: >> I'm pretty sure I know the answer to this one already, but is anyone aware >> of a way to get/set the layout rect for a view? Or get a frame rect from a >> layout rect, that sort of thi

Re: UIButton's Sender Control Events

2010-01-25 Thread Alexander Spohr
Please send code that would work. All broken examples are clearly not code you can use and therefore very bad examples for what you are trying to achieve. Am 25.01.2010 um 00:22 schrieb Chunk 1978: > i wanted to simplify the code (one button per method) by using the > buttons UIControlEvents of

Re: Re: Application is not available in the launched applications list.

2010-01-25 Thread ramesh . pauldurai
Thanks Mr.Kyle for your quick reply, You are correct. I have added the following line in my info.plist NSUIElement 1 I do not want to show my application on the dock. Thanks, Ramesh.P On , Kyle Sluder wrote: On Sun, Jan 24, 2010 at 11:36 PM, Ramesh P ramesh.pauldu...@gmail.com> wrote:

Re: Allow only root/admin users to execute the cocoa app

2010-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 2010 à 07:47, vincent habchi a écrit : > Le 24 janv. 2010 à 22:31, Todd Heberlein a écrit : > >>> I want to allow my cocoa app to be only launched by root/admin users. >>> How can i achieve this? >> >> As I think has already been mentioned, the UNIX approach is to set the >> applic

MVC design Q - remembering Core Data selections

2010-01-25 Thread Ken Tabb
Hi folks, I have a Core Data app that needs to remember state of selected items between launches. The app's UI is a bit like iTunes (containers / playlists down the side and contents show in a big tableview), except that there are 3 layers of containment, so rather than Playlists and Trac

Re: MVC design Q - remembering Core Data selections

2010-01-25 Thread Ken Tabb
Doh... sorry about the length of that message, it included the various draft versions, so please ignore it (unless you like seeing the pain someone goes through when trying to state their problem concisely!) Below is the properly edited version, and I'd be grateful for any advice you can gi

Re: MVC design Q - remembering Core Data selections

2010-01-25 Thread Ron Fleckner
On 25/01/2010, at 8:42 PM, Ken Tabb wrote: On 25 Jan 2010, at 9:38, Tabb, Ken wrote: Hi folks, I have a Core Data app that needs to remember state of selected items between launches. The app's UI is a bit like iTunes (containers / playlists down the side and contents show in a big tablevie

Re: NSAlert query

2010-01-25 Thread jonat...@mugginsoft.com
On 25 Jan 2010, at 04:27, Poonam Virupaxi Shigihalli wrote: > > hi all, > > When alert messages are displayed using runModal, it blocks the thread until > the user clicks on the button. Is there anyway to avoid blocking of the > thread when alert is displayed? > Try displaying your alerts as

Re: Allow only root/admin users to execute the cocoa app

2010-01-25 Thread vincent habchi
Le 25 janv. 2010 à 10:43, Jean-Daniel Dupas a écrit : > So unless you think you know better than Apple what you're doing, never run > an GUI application with privileges. Gwynne's anwser give you some reasons why > this is bad. Je ne dis rien de tel ;) Look at the text: the security measure doe

Re: Weird exception

2010-01-25 Thread Alexander Bokovikov
On 24.01.2010, at 14:08, vincent habchi wrote: Under XCode, you select 'run with performance tool' -> 'zombies'. This will launch your app with the 'zombie instrument' attached, that will signal you if you app tries to message a released entity. I'm sorry, but I don't see "zombies" item wit

Re: Allow only root/admin users to execute the cocoa app

2010-01-25 Thread Uli Kusterer
On 25.01.2010, at 11:15, vincent habchi wrote: > I never meant I know things better than Apple: I understand the reasons, I > don't say they are pointless - in fact I agree with most of them. I just > wonder why, since I know at least two or three Unix/BSD/X11 applications that > run under super

How to resolve bulk warning "Creating selector for nonexistent method ..."?

2010-01-25 Thread Motti Shneor
Hi everyone. I'm building static library, whose outward API is plain "C", and whose implementation is Cocoa-based. It was building and working alright, until (yesterday) something changed, and any attempt to clean/build/rebuild it produces huge amount of compilation warnings, on EVERY Obj-C m

Re: Allow only root/admin users to execute the cocoa app

2010-01-25 Thread vincent habchi
Le 25 janv. 2010 à 11:56, Uli Kusterer a écrit : > At WWDC I was told that Apple don't test AppKit against root (or at least, > not much). Since the idea is to limit the time applications run as root for > security reasons, there is no high priority find and fix such issues in > AppKit. This me

Notification to wake the screen?

2010-01-25 Thread Poonam Virupaxi Shigihalli
Hi, I am using NSWorkspaceScreensDidSleepNotification and NSWorkspaceScreensDidWakeNotification notifications to detect screen sleep and awake in idle sleep mode. But on some event (eg. on timer fire) I want to the wake screen . Is there any notification I can post for screen to wake? Tha

Re: Allow only root/admin users to execute the cocoa app

2010-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 2010 à 11:15, vincent habchi a écrit : > Le 25 janv. 2010 à 10:43, Jean-Daniel Dupas a écrit : > >> So unless you think you know better than Apple what you're doing, never run >> an GUI application with privileges. Gwynne's anwser give you some reasons >> why this is bad. > > Je n

What is the equivalent of SetSystemUIMode() in Leopard and above?

2010-01-25 Thread Arun
Hi All Are there any cocoa equivalent API's for SetSystemUIMode() available in Leopard 10.5 and above? I want to hide dock and menu item at run time in my application. Thanks Arun ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Re: What is the equivalent of SetSystemUIMode() in Leopard and above?

2010-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 2010 à 12:47, Arun a écrit : > Hi All > > Are there any cocoa equivalent API's for SetSystemUIMode() available in > Leopard 10.5 and above? > I want to hide dock and menu item at run time in my application. > NSApplication presentation options, but available in Snow Leopard only.

Re: Weird exception

2010-01-25 Thread James Montgomerie
On 25 Jan 2010, at 10:21, Alexander Bokovikov wrote: > On 24.01.2010, at 14:08, vincent habchi wrote: >> Under XCode, you select 'run with performance tool' -> 'zombies'. >> This will launch your app with the 'zombie instrument' attached, that will >> signal you if you app tries to message a relea

Re: MVC design Q - remembering Core Data selections

2010-01-25 Thread Jerry Krinock
I agree with Ron that this definitely looks like a user default because it's more a part of the View than the Model, and therefore should go into user defaults instead of the Core Data model. You often find attributes like this which could go either way. For a less certain example, consider th

How to save/restore the screen of the window in user defaults?

2010-01-25 Thread Oleg Krupnov
Hi, I'd like my app's main window to appear on the same screen where it was last closed, on a multi-monitor Mac. How do I do this? I checked the docs and found that I could use [[[window screen] deviceDescription] objectForKey:@"NSScreenNumber"] as a unique identifier that is permanent across sys

Re: MVC design Q - remembering Core Data selections

2010-01-25 Thread Ken Tabb
Hi Ron, thanks for the reply. I agree just storing the "last known thing that the user was looking at" is doable, wouldn't require a non-MVC model- based hack, and would make for a much smaller user defaults file - as there's only 3 selections being stored (1x Company, 1x Department and 1x

Posting notifications

2010-01-25 Thread McLaughlin, Michael P.
Notification Programming Topics for Cocoa states "A notification center delivers notifications to observers synchronously. In other words, when posting a notification, control does not return to the poster until all observers have received *and processed* the notification." [my emphasis] I was wo

Re: How to save/restore the screen of the window in user defaults?

2010-01-25 Thread Mike Abdullah
On 25 Jan 2010, at 13:59, Oleg Krupnov wrote: > Hi, > > I'd like my app's main window to appear on the same screen where it > was last closed, on a multi-monitor Mac. How do I do this? > > I checked the docs and found that I could use [[[window screen] > deviceDescription] objectForKey:@"NSScre

Re: How to save/restore the screen of the window in user defaults?

2010-01-25 Thread Paul Sanders
If you have a MacBook, you can just plug a second montior to the mini DVI port. You might need an adapter cable - Apple will sell you one. Paul Sanders. On 25 Jan 2010, at 13:59, Oleg Krupnov wrote: > It's especially hard for me because I don't have a > multi-monitor Mac > at my disposal to e

Re: Posting notifications

2010-01-25 Thread Keary Suska
On Jan 25, 2010, at 7:21 AM, McLaughlin, Michael P. wrote: > > "A notification center delivers notifications to observers synchronously. In > other words, when posting a notification, control does not return to the > poster until all observers have received *and processed* the notification." > [m

Re: NSURL crash

2010-01-25 Thread Nick Zitzmann
On Jan 24, 2010, at 8:19 PM, Scott Anguish wrote: > nsurl still lives happily in Foundation. No, it was moved to CoreFoundation a while back, along with a few other Foundation objects: % otool -ov /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation [...] Module 0x18e604 vers

Re: Cocoa-dev Digest, Vol 7, Issue 107

2010-01-25 Thread Alexander Bokovikov
On 25.01.2010, at 19:14, James Montgomerie wrote: I think you're on a wild goose chase here - the most likely explanation to me is that something somewhere is deliberately calling -[NSString boolValue] (and it may not be 'your' code - I wouldn't put it out of the realms of possibility that

Re: Posting notifications

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 6:21 AM, McLaughlin, Michael P. wrote: "A notification center delivers notifications to observers synchronously. In other words, when posting a notification, control does not return to the poster until all observers have received *and processed* the notification." [my

Re: runModalForWindow crash

2010-01-25 Thread Nick Zitzmann
On Jan 24, 2010, at 6:14 PM, Jo Meder wrote: > My guess is that [NSApplication runModalForWindow:] is trying to send a > message to my window object which has been released by now perhaps? I think > I'm probably not getting something to do with object lifetimes here or > something. Does anyone

Re: Decoder problem

2010-01-25 Thread David Duncan
As a note of etiquette, please don't cross post. If you've chosen the wrong list, the denizens will certainly let you know :). On Jan 22, 2010, at 6:58 PM, Austin Ray wrote: > I'm trying to play video in an iPhone application. However, whenever I load > the application onto my device and try to

Re: Weird exception

2010-01-25 Thread Greg Guerin
Alexander Bokovikov wrote: I don't know how to do it, as I have no sources for Sparkle. http://sparkle.andymatuschak.org/ -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to th

NSComboBox or Better Choice

2010-01-25 Thread David Blanton
I would like to display an image and descriptive text is some sort of popup list such as an NSComboBox. Can the NSComboBoxCell draw method be overridden to display an image along with text? Or, what is the best way to accomplish a pop up list of images and descriptive text? -db

How to hide dock item and application menu?

2010-01-25 Thread Arun
Hi All, In my application i need to provide an option to hide its dock icon as well as the application menu. How can i achieve this? I know that In Info.plist if i add an entry to run the application as Agent we will not see dock and menu item. This is not useful to me as my req is to provide the

Re: How to hide dock item and application menu?

2010-01-25 Thread Eric Schlegel
On Jan 25, 2010, at 10:06 AM, Arun wrote: > Hi All, > > In my application i need to provide an option to hide its dock icon as well > as the application menu. > How can i achieve this? I know that In Info.plist if i add an entry to run > the application as Agent we will not see dock and menu it

Re: NSURL crash

2010-01-25 Thread Kyle Sluder
On Mon, Jan 25, 2010 at 8:55 AM, Nick Zitzmann wrote: > No, it was moved to CoreFoundation a while back, along with a few other > Foundation objects: Well that's a bummer. But also good proof that you need to link against the appropriate SDK. :) --Kyle Sluder ___

dynamic typing in a text field

2010-01-25 Thread Ronald Hofmann
Hi all, I want a textfield in my project which triggers a method while I´m writing in it. I saw this option 'continous' in the interface builder which works fine with sliders. While I move the slider the method executes. How can I do the same thing with a textfield? I can´t find it. Is there a

Re: dynamic typing in a text field

2010-01-25 Thread Sherm Pendley
On Mon, Jan 25, 2010 at 11:16 AM, Ronald Hofmann wrote: > I want a textfield in my project which triggers a method while I´m writing in > it. > I saw this option 'continous' in the interface builder which works fine with > sliders. > While I move the slider the method executes. > > How can I do

Re: How to hide dock item and application menu?

2010-01-25 Thread Mark Ritchie
On 25/Jan/2010, at 10:06 AM, Arun wrote: > as my req is to provide the option to user to hide/unhide dock and menu > item. Perhaps if you explained what you're trying to accomplish we could provide some direction? M. ___ Cocoa-dev mailing list (C

CALayer maybe silly question

2010-01-25 Thread vincent habchi
Hi again, the silly question is this: is it possible to redraw a CALayer in background? More specifically, I've written a delegate method drawLayer:inContext: that creates a thread that does the drawing then returns. Net result, when I do that, is void. The screen is blank, I think because no

Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Keith Blount
Hello, I am in the process of converting the data format for my application from one that just uses the NSKeyedArchiver methods to archive my objects to a file on disk to using the NSXML classes to generate a custom XML file (I need to do this for compatibility purposes). My main data object is

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread jonat...@mugginsoft.com
On 25 Jan 2010, at 20:23, Keith Blount wrote: > Hello, > > I am in the process of converting the data format for my application from one > that just uses the NSKeyedArchiver methods to archive my objects to a file on > disk to using the NSXML classes to generate a custom XML file (I need to do

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Mike Abdullah
This approach is probably creating a new NSDateFormatter for each date processed. What if you create your own formatter and use that for all dates? On 25 Jan 2010, at 20:23, Keith Blount wrote: > Hello, > > I am in the process of converting the data format for my application from one > that ju

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Nick Zitzmann
On Jan 25, 2010, at 1:23 PM, Keith Blount wrote: > But either way suffers the same performance hit. So, my question is, does > anyone know of a much faster and more efficient way of converting NSDates to > NSStrings? You didn't say you needed the date to be formatted, so have you tried somethi

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 12:23 PM, Keith Blount wrote: But either way suffers the same performance hit. So, my question is, does anyone know of a much faster and more efficient way of converting NSDates to NSStrings? (A possible solution would be to change my data model to store these dates as

Re: CALayer maybe silly question

2010-01-25 Thread David Duncan
On Jan 25, 2010, at 12:02 PM, vincent habchi wrote: > the silly question is this: is it possible to redraw a CALayer in background? > > More specifically, I've written a delegate method drawLayer:inContext: that > creates a thread that does the drawing then returns. If you want to draw to a l

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread jonat...@mugginsoft.com
On 25 Jan 2010, at 20:33, Mike Abdullah wrote: > This approach is probably creating a new NSDateFormatter for each date > processed. What if you create your own formatter and use that for all dates? > I think Mike is right here. It was the NSDateFormatter that was the time sink not NSDate itsel

Re: [iPhone] Implementing VOIP for iPhone App

2010-01-25 Thread Michael Ash
On Sun, Jan 24, 2010 at 10:17 AM, Tharindu Madushanka wrote: > Hi > > I am currently in 4th year student of University of Moratuwa, Sri Lanka. I > am thinking of creating iPhone client and server application (using Java) > for my final year project. I have following things in my mind. I would like

NSPopUpButtonCell Update Smashes Focus Ring of Adjacent NSTableView: 10.4 vs. 10.5/10.6

2010-01-25 Thread Grant Erickson
I have a table view that can receive keyboard focus and that displays a focus ring. In addition, adjacent to its bottom is a pop-up button and a "bar". The pop-up button enables/disables depending on the selection state of the table view. Under 10.5 and 10.6, the pop-up button and the focus ring

Re: CALayer maybe silly question

2010-01-25 Thread vincent habchi
David, Le 25 janv. 2010 à 21:39, David Duncan a écrit : > If you want to draw to a layer on a separate thread, you need to run the > runloop on that thread, as Core Animation is pretty highly dependent on the > run loop operating. If you call -setNeedsDisplay on a thread where you never > run

Garbage Collection Docs Puzzle

2010-01-25 Thread Robert Clair
The garbage collection docs section on the interior pointer issue shows this example: NSData *myData = [someObject getMyData]; [myData retain]; const uint8_t *bytes = [myData bytes]; NSUInteger offset = 0, length = [myData length]; while (offset < length) { // bytes remains valid until next

How to detect no internet connection?

2010-01-25 Thread Laurent Daudelin
Hello. What is the best way to detect that there is no internet connection from my Cocoa app? Detecting no network would work too but I'd like to be able even if the Macintosh is connected to a network that it can't reach the internet. I know I could use a test connection but is there a better

Re: How to detect no internet connection?

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 1:50 PM, Laurent Daudelin wrote: What is the best way to detect that there is no internet connection from my Cocoa app? SystemConfiguration.framework. It can even send you notifications in real-time as the network status changes. Detecting no network would work too bu

Re: patching the responder chain: puzzled by the docs

2010-01-25 Thread Andy Lee
I went ahead and created rdar://7576845 rather than use the documentation feedback form, because I'd like to see what the answer is. --Andy On Friday, January 22, 2010, at 12:42PM, "Andy Lee" wrote: >My understanding was that it's okay to insert things anywhere you want in the >responder cha

simple file browser

2010-01-25 Thread Ariel Feinerman
Hi, I want to implement file browser in my app to allow to see hidden files / other. Can you suggest me code examples of cocoa file browser? -- best regards Ariel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: How to hide dock item and application menu?

2010-01-25 Thread Ben
On 25 Jan 2010, at 18:06, Arun wrote: Hi All, In my application i need to provide an option to hide its dock icon as well as the application menu. How can i achieve this? I know that In Info.plist if i add an entry to run the application as Agent we will not see dock and menu item. This

Re: simple file browser

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 2:12 PM, Ariel Feinerman wrote: I want to implement file browser in my app to allow to see hidden files / other. Can you suggest me code examples of cocoa file browser? Use an NSOpenPanel, set an instance of your class as its delegate, and implement the panel:shouldShowF

how to email a message with a NSAttributedString content

2010-01-25 Thread Stephane Huaulme
using the SBSendEmail sample code from apple, i'm able to send an email using mail.app, however i cannot figure out how to send an email containing rich text from an NSAttributedString. any suggestions? thx in advance. ___ Cocoa-dev mailing list (Co

Re: How to hide dock item and application menu?

2010-01-25 Thread Jens Alfke
On 25 Jan 2010, at 18:06, Arun wrote: Hi All, In my application i need to provide an option to hide its dock icon as well as the application menu. How can i achieve this? I know that In Info.plist if i add an entry to run the application as Agent we will not see dock and menu item. Ac

Re: simple file browser

2010-01-25 Thread Matthew Lindfield Seager
On Tuesday, January 26, 2010, Ariel Feinerman wrote: > Hi, > I want to implement file browser in my app to allow to see hidden > files / other. Can you suggest me code examples of cocoa file browser? http://developer.apple.com/mac/library/samplecode/SourceView/index.html should get you started.

Re: simple file browser

2010-01-25 Thread Matthew Lindfield Seager
On Tuesday, January 26, 2010, Matthew Lindfield Seager wrote: > On Tuesday, January 26, 2010, Ariel Feinerman wrote: >> Hi, >> I want to implement file browser in my app to allow to see hidden >> files / other. Can you suggest me code examples of cocoa file browser? > > http://developer.apple.com

Re: How to detect no internet connection?

2010-01-25 Thread Laurent Daudelin
On Jan 25, 2010, at 13:58, Jens Alfke wrote: > > On Jan 25, 2010, at 1:50 PM, Laurent Daudelin wrote: > >> What is the best way to detect that there is no internet connection from my >> Cocoa app? > > SystemConfiguration.framework. It can even send you notifications in > real-time as the netw

Re: How to hide dock item and application menu?

2010-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 2010 à 23:24, Jens Alfke a écrit : > > On 25 Jan 2010, at 18:06, Arun wrote: > >> Hi All, >> >> In my application i need to provide an option to hide its dock icon as well >> as the application menu. >> How can i achieve this? I know that In Info.plist if i add an entry to run >>

Re: simple file browser

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 2:25 PM, Matthew Lindfield Seager wrote: http://developer.apple.com/mac/library/samplecode/SourceView/ index.html should get you started. Did you try looking in Apple's sample code section? /Developer/Examples/OutlineView/ is even closer — it's a basic outline view tha

Re: simple file browser

2010-01-25 Thread Lee Ann Rucker
On Jan 25, 2010, at 2:36 PM, Jens Alfke wrote: On Jan 25, 2010, at 2:25 PM, Matthew Lindfield Seager wrote: http://developer.apple.com/mac/library/samplecode/SourceView/ index.html should get you started. Did you try looking in Apple's sample code section? /Developer/Examples/OutlineView/

Re: simple file browser

2010-01-25 Thread Ariel Feinerman
Matthew, Jens, thank you 2010/1/26 Jens Alfke : > > On Jan 25, 2010, at 2:25 PM, Matthew Lindfield Seager wrote: > > http://developer.apple.com/mac/library/samplecode/SourceView/index.html > should get you started. > > Did you try looking in Apple's sample code section? > > /Developer/Examples/Out

inspecting return data from NSPasteboard propertyListForType:

2010-01-25 Thread David Alter
I have some generic code for when data is dragged into my application. I wanted to do something like this id data = [[sender draggingPasteboard] propertyListForType:type]; if ( [NSArray isSubclassOfClass:[data class]] or [NSDictionary isSubclassOfClass:[data class]]) { //do a list thing } else {

Re: Garbage Collection Docs Puzzle

2010-01-25 Thread Dave Keck
> What's with the retain and release? I understand the issue of keeping myData > alive until you're finished with the interior pointer, but why [myData > release]?   Is the release enough to keep myData alive even thought its > dispatch is short circuited under GC? And the retain is there to bal

Re: inspecting return data from NSPasteboard propertyListForType:

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 3:05 PM, David Alter wrote: if ( [NSArray isSubclassOfClass:[data class]] That's actually backwards — you want to find out if [data class] is a subclass of NSArray. But the usual way to write this is [data isKindOfClass: [NSArray class]] —Jens ___

Re: Garbage Collection Docs Puzzle

2010-01-25 Thread Julien Jalon
Except -retain is more efficient under GC. -- Julien from his iPhone Le 26 janv. 2010 à 00:06, Dave Keck a écrit : sending myData -self at the end of the method would make a lot more sense. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: simple file browser

2010-01-25 Thread Corbin Dunn
On Jan 25, 2010, at 2:22 PM, Jens Alfke wrote: > > On Jan 25, 2010, at 2:12 PM, Ariel Feinerman wrote: > >> I want to implement file browser in my app to allow to see hidden >> files / other. Can you suggest me code examples of cocoa file browser? > > Use an NSOpenPanel, set an instance of you

another responder chain docs bug (validateUserInterfaceItem:)

2010-01-25 Thread Andy Lee
Semi-related to my previous post, I just filed rdar://7577360 (text below). As far as I can tell, it's a bug in the docs. --Andy The "Overview" at

Re: Garbage Collection Docs Puzzle

2010-01-25 Thread Robert Clair
> The issue being worked-around is that of the compiler; during > optimization, if you stop referencing myData, [snip] Yes. As I said, I understand the issue - my only question was whether the short-circuited retain was enough to do it. I didn't know whether the compiler did this or the runtime

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Keith Blount
Many thanks for all the suggestions, much appreciated. Although -timeIntervalSinceReferenceDate: may indeed be a workable solution as the XML is our own format so I could make this choice, for now I think I'd like to retain a human-readable date. Mike's suggestion of creating one NSDateFormatte

Focus Ring and NSTextField

2010-01-25 Thread Richard Somers
I have a preference panel with a NSTextField. The text field automatically gets a focus ring when showing the panel. I only want a focus ring when the user clicks in the text field. How can I do that? --Richard ___ Cocoa-dev mailing list (Cocoa-de

Re: simple file browser

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 3:17 PM, Corbin Dunn wrote: Instead, just call: [savePanel setShowsHiddenFiles:YES]. There's no such method in the 10.5 SDK; was it added in 10.6? —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Focus Ring and NSTextField

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 4:11 PM, Richard Somers wrote: I have a preference panel with a NSTextField. The text field automatically gets a focus ring when showing the panel. I only want a focus ring when the user clicks in the text field. How can I do that? Wire the window's initialFirstRespon

Re: runModalForWindow crash

2010-01-25 Thread Jo Meder
Hi Nick, On 26/01/2010, at 6:06 AM, Nick Zitzmann wrote: > On Jan 24, 2010, at 6:14 PM, Jo Meder wrote: > >> My guess is that [NSApplication runModalForWindow:] is trying to send a >> message to my window object which has been released by now perhaps? I think >> I'm probably not getting someth

Re: simple file browser

2010-01-25 Thread Andrew Merenbach
On Jan 25, 2010, at 4:12 PM, Jens Alfke wrote: > > On Jan 25, 2010, at 3:17 PM, Corbin Dunn wrote: > >> Instead, just call: [savePanel setShowsHiddenFiles:YES]. > > There's no such method in the 10.5 SDK; was it added in 10.6? > > —Jens___ > Looks

Launch process as root from cocoa app

2010-01-25 Thread Nyxem
Hello, I'm currently working on a Preference Pane with an SFAuthorizationView, my problem is simple, when I click on a switch button I need to start / stop a daemon as user using launchctl. I tried 3 different ways and the only one that is working is the slowest, here the 3 ways I tried : 1 -

Re: Launch process as root from cocoa app

2010-01-25 Thread Kyle Sluder
On Sun, Jan 24, 2010 at 11:57 PM, Nyxem wrote: > I'm currently working on a Preference Pane with an SFAuthorizationView, my > problem is simple, when I click on a switch button I need to start / stop a > daemon as user using launchctl. Do not do use launchctl for this. Launchd has plenty of way

NSPredicateEditorRowTemplate and CoreData

2010-01-25 Thread Carmen Cerino Jr.
I am trying to generate predicate editor templates for my Core Data entities. In my code I have the following: NSEntityDescription *descrip = [NSEntityDescription entityForName:@"Person" inManagedObjectContext:managedObjectContext]; NSArray *templates = [NSPredicateEditorRowTempl

Re: Launch process as root from cocoa app

2010-01-25 Thread Nick Zitzmann
On Jan 25, 2010, at 12:57 AM, Nyxem wrote: > 1 - Using the authorizationRef object of my SFAuthorizationView and call > AuthorizationExecuteWithPrivileges() ("/bin/launchctl load > /Library/LaunchDaemons/com.mydaemon.plist") > --> Failed. daemon not launched as root, but as current user.

Re: Launch process as root from cocoa app

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 6:53 PM, Kyle Sluder wrote: > Do not do use launchctl for this. Launchd has plenty of ways of > determining when to start and stop jobs. You should configure your > job's plist accordingly. The OP wants to allow a button in the UI to start and stop the job. That's not someth

NSTabView

2010-01-25 Thread David Blanton
I have a fixed size NSTabView that displays 4 NSTabViewITems very nicely. It is possible that the application may want to add more NSTabViewItems. Is there a flag to set (somewhere) so that added items will not be truncated to the view but display >> like Safari indicating more items and t

Observed behaviour - Is this expected

2010-01-25 Thread David Blanton
Class A is a subclass of NSView Class B is a subclass of Class A Class A and Class B are in a NIB. Class A as an Object - the blue cube Class B as a view in a window. When the program runs: Class A's init method is called Class B's awakeFromNib is called Class A's awakeFromNib is called NOTE

Re: Launch process as root from cocoa app

2010-01-25 Thread Kyle Sluder
On Mon, Jan 25, 2010 at 7:23 PM, Jens Alfke wrote: > The OP wants to allow a button in the UI to start and stop the job. That's > not something you can configure a plist for! You configure the launchd job's plist to watch for a path and create/remove that file in response to the UI action. This

Re: Observed behaviour - Is this expected

2010-01-25 Thread Kyle Sluder
On Mon, Jan 25, 2010 at 7:43 PM, David Blanton wrote: > Class A is a subclass of NSView > Class B is a subclass of Class A > > Class A and Class B are in a NIB. Classes don't live in nibs. You mean an object of class A and an object of class B live in the nib. > Class A as an Object - the blue c

Re: Observed behaviour - Is this expected

2010-01-25 Thread David Blanton
On Jan 25, 2010, at 8:51 PM, Kyle Sluder wrote: On Mon, Jan 25, 2010 at 7:43 PM, David Blanton wrote: Class A is a subclass of NSView Class B is a subclass of Class A Class A and Class B are in a NIB. Classes don't live in nibs. You mean an object of class A and an object of class B live

Re: Observed behaviour - Is this expected

2010-01-25 Thread David Blanton
OK. What I wanted was to have only one reference to the outlets in the 'base class' that can be used in the sub classes. I did not realize I had to connect the outlets defined in the base class through the sub class. I have the behavior I was expecting now. Thanks Kyle for the pointer to

Re: NSTabView

2010-01-25 Thread Scott Anguish
On Jan 25, 2010, at 10:34 PM, David Blanton wrote: > I have a fixed size NSTabView that displays 4 NSTabViewITems very nicely. > > It is possible that the application may want to add more NSTabViewItems. > > Is there a flag to set (somewhere) so that added items will not be truncated > to the

10.6 Clips Tooltip if you return NSTextFieldCell in -dataCellForRow:

2010-01-25 Thread Jerry Krinock
I've been overriding -[NSTableColumn dataCellForRow:], returning a variation on NSTextFieldCell for years. However I just discovered that, in OS 10.6.2, this breaks the tooltip which shows the entire text when you hover over a truncated cell. (This tooltip feature was added in OS 10.5.) Here'

Re: 10.6 Clips Tooltip if you return NSTextFieldCell in -dataCellForRow:

2010-01-25 Thread Jerry Krinock
Well, it's not the cell size. I found that I could increase the cellSize.width of my raw NSTextFieldCell by doing something like this: [aCell setStringValue:@"Gagikostoupomolis A. B. C. Geiristomzkimcbliskewicz"] ; But the tooltip is still clipped :( How can we do custom table cells in Mac OS