SCPreferencesLock issue?

2010-09-17 Thread Jeremy Matthews
For some reason, I can't seem to get a lockwas wondering if anyone else has been here before: AuthorizationRef auth = nil; OSStatus authErr = noErr; AuthorizationFlags rootFlags = kAuthorizationFlagDefaults | kAuthorizationFlagExtendRights |

Re: SCPreferencesLock issue?

2010-09-17 Thread Ken Thomases
On Sep 17, 2010, at 2:43 AM, Jeremy Matthews wrote: For some reason, I can't seem to get a lockwas wondering if anyone else has been here before: I haven't dealt with this API before, but the below code is a mess. You also don't explain what you mean by I can't seem to get a lock. The

Re: SCPreferencesLock issue?

2010-09-17 Thread Jeremy Matthews
Nevermind; figured it out. I DID manage to copy and paste sections in the wrong order; hence some of the confusion there...and forget the comment blocks I had around certain twice-delivered functions. Thanks, j On Sep 17, 2010, at 4:05 AM, Ken Thomases wrote: On Sep 17, 2010, at 2:43 AM,

Extract Text From NSLabels to Mail

2010-09-17 Thread PJBorges
Hi, In my app I have a feature that opens Mail.app. The feature extracts the contents of a number of labels into the message area of Mail, but it is only the first label that is extracted, the rest are not. My code: MailOutgoingMessage *emailMessage = [[[mail

Re: Extract Text From NSLabels to Mail

2010-09-17 Thread Ken Thomases
On Sep 17, 2010, at 6:37 AM, PJBorges wrote: In my app I have a feature that opens Mail.app. The feature extracts the contents of a number of labels into the message area of Mail, but it is only the first label that is extracted, the rest are not. My code: MailOutgoingMessage

Ports for stringWithContentsOfURL

2010-09-17 Thread gMail.com
Hi, which port must be open on the Mac in order to get a response from the server when calling stringWithContentsOfURL ? My method calls a small file posted on my web site, so the path is a http://www... It works pretty well, but some of my clients say that they get a nil response, even if they

Re: Ports for stringWithContentsOfURL

2010-09-17 Thread Andy Lee
stringWithContentsOfURL: is deprecated. I suggest using stringWithContentsOfURL:encoding:error: or stringWithContentsOfURL:usedEncoding:error: and logging the error or displaying it with +alertWithError: so those users can tell you the exact reason for failure. It might help to print the URL

Programmatic View Question

2010-09-17 Thread Richard Somers
Consider the following architecture. windowController viewController programmaticView viewController1 programmaticView1 viewController2 programmaticView2 viewController3 programmaticView3 ...

Re: sort an nstablecolumn to button cell state?

2010-09-17 Thread Keary Suska
On Sep 16, 2010, at 2:09 PM, Michael Hanna wrote: I have an NSTableColumn in an NSTableView that has only an NSButtonCell(checkbox). When the user clicks the table column header I'd like it to sort the table items according to whether or not the checkbox is selected. so the end result is that

Re: Scripting Bridge Strange Pauses

2010-09-17 Thread Matt Neuburg
On Wed, 15 Sep 2010 22:50:08 -0700, John Nairn j...@geditcom.com said: I have been having problems calling my Cocoa app with Python scripts through the Scripting Bridge. To test further, I wrote the following Cocoa code to use the Scripting Bridge. For a large file (over 7000 elements in the

Re: Scripting Bridge Strange Pauses

2010-09-17 Thread John Nairn
I have been having problems calling my Cocoa app with Python scripts through the Scripting Bridge. To test further, I wrote the following Cocoa code to use the Scripting Bridge. For a large file (over 7000 elements in the SBElementArray recs variable) it runs smoothly until 77% completion and

Small delay when build the view

2010-09-17 Thread Daniel Lopes
Hello, I'm studing cocoa and trying to create an app as closest as possible of a real app. It's a simple app the consume the rest api of Gist ( gist.github.com). My source code is in github ( http://github.com/danielvlopes/Snipper) I started separating all the components of my screen in to

Re: Why is NSPopUp broken in drop-down mode?

2010-09-17 Thread Seth Willits
On Sep 16, 2010, at 6:02 PM, Kyle Sluder wrote: On Thu, Sep 16, 2010 at 5:45 PM, G S stokest...@gmail.com wrote: Thanks for that reference, Kyle, but it only refers to Command pop-down menus. That's not what this is; the list contains regular items that are not commands. It refers to the

Re: bindings and NSNumberFormatter, enforcing min/max values

2010-09-17 Thread Martin Wierschin
On 2010.09.16, at 7:52 PM, Ken Thomases wrote: On Sep 16, 2010, at 5:06 PM, Quincey Morris wrote: Regarding NSUserDefaults, I don't see anything in the documentation that claims KVC compliance for NSUserDefaults, though I could easily have missed it. You're not supposed to bind to the

How to invoke and inline block which is passed as function argument

2010-09-17 Thread ico
Hi All, I just wonder how to invoke an inline block which is passed as function argument. We can invoke a block if we declare a block as a variable, what if you simply implement them inline where they are required as an argument. It seems you have nothing reference to that block address. For

Re: How to invoke and inline block which is passed as function argument

2010-09-17 Thread Dave DeLong
Just like you would with a function pointer: - (void) executeBlock:(void(^)(NSString * param))block { block(@Hello world!); } Cheers, Dave On Sep 17, 2010, at 1:32 PM, ico wrote: Hi All, I just wonder how to invoke an inline block which is passed as function argument. We can invoke a

(no subject)

2010-09-17 Thread Ferhat Ayaz
http://llow.pharmmashopzv.host-sc.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update

Re: bindings and NSNumberFormatter, enforcing min/max values

2010-09-17 Thread Quincey Morris
On Sep 17, 2010, at 12:16, Martin Wierschin wrote: I am binding to the shared NSUserDefaultsController in IB, not NSUserDefaults directly. I doubt Ken really thought you were binding to anything other than NSUserDefaultsController. He was really elbowing me, correctly, for having said

Drawing a custom NSTabView Border

2010-09-17 Thread Mr . Gecko
Hello I'm wondering what will be the best way to draw a custom NSTabView Border. I have tried many things and it always ends up that I fail. The border gets drawn, but the objects in the Tab View, if you focus them, has a black edge around them, that is not elegant at all. Is there any examples

Is it possible to have a plist date to be null?

2010-09-17 Thread Frederick C. Lee
Greetings: I would like to be able to have nulled (no-value) for a data type in a plist. But I can't create an empty date entity via the Property List Editor. Question: can I have an empty value for a date, or must I resort to an empty string? Ric.

Re: Drawing a custom NSTabView Border

2010-09-17 Thread Seth Willits
On Sep 17, 2010, at 3:29 PM, Mr.Gecko wrote: Hello I'm wondering what will be the best way to draw a custom NSTabView Border. I have tried many things and it always ends up that I fail. The border gets drawn, but the objects in the Tab View, if you focus them, has a black edge around them,

Re: Is it possible to have a plist date to be null?

2010-09-17 Thread Seth Willits
On Sep 17, 2010, at 4:22 PM, Frederick C. Lee wrote: Greetings: I would like to be able to have nulled (no-value) for a data type in a plist. But I can't create an empty date entity via the Property List Editor. Question: can I have an empty value for a date, or must I resort to an

Re: How to invoke and inline block which is passed as function argument

2010-09-17 Thread ico
Hi Dave, I think you misunderstood me, if a block declared with a block variable reference to it, of course we can call it like we would with a function pointer. What I don't know how to invoke the block is the case which we don't even have a function pointer to it, this happens when we implement

Re: How to invoke and inline block which is passed as function argument

2010-09-17 Thread Dave DeLong
It's only anonymous/inline to you. sortedArrayUsingComparator: is declared like this: - (NSArray *)sortedArrayUsingComparator:(NSComparator)cmptr This means that inside the implementation of this method, cmptr refers to the block, and will be invoked like this: cmptr(object1, object2); Dave

Re: How to invoke and inline block which is passed as function argument

2010-09-17 Thread Kyle Sluder
On Fri, Sep 17, 2010 at 7:07 PM, ico jche...@gmail.com wrote: I think you misunderstood me, if a block declared with a block variable reference to it, of course we can call it like we would with a function pointer. What I don't know how to invoke the block is the case which we don't even have

Help not displaying when bundle moved from build directory

2010-09-17 Thread Curious Yogurt
I have a Helpbook that loads perfectly well when the application bundle is in the build directory, but the help screen comes up blank when the application has been moved from the build directory. I can't seem to track down why this is happening. The help directory, helpdir, has been copied into

Re: Programmatic View Question

2010-09-17 Thread Richard Somers
On Sep 17, 2010, at 7:09 AM, Richard Somers wrote: The reason for the programmatic view is there are lots of similar views with minor variations between them. Having a programmatic view allows the objects in the view and the layout and configuration of those objects to be controlled from a

Re: Programmatic View Question

2010-09-17 Thread Seth Willits
On Sep 17, 2010, at 8:58 PM, Richard Somers wrote: My current inclination now is to change this and do all view composition, connecting, and binding in the controller. The root view would still be there but the controller would be doing most all of the work. It's hard to answer such

Re: i5 i7 auto graphics switching

2010-09-17 Thread Trygve Inda
Le 13 sept. 2010 à 17:03, Trygve Inda a écrit : How do I get the CGDirectDisplayID into IORegistryEntryCreateCFProperties? Is this any different than: io_service_tservicePort = CGDisplayIOServicePort (myCGDirectDisplayID); CFDictionaryRef oldInfoDict =