Re: textfield not updating with bindings - Whats wrong?

2008-08-24 Thread Kieren Eaton
On 24/08/2008, at 2:30 PM, Scott Anguish wrote: On 23-Aug-08, at 11:53 PM, Kieren Eaton wrote: I have one minor question now that I am understanding bindings more. Is is good policy to add an object controller instead of just binding directly to the class? Yes. Especially when using t

Re: How to read pixel values of monochrome images

2008-08-24 Thread Jean-Daniel Dupas
Le 24 août 08 à 05:55, John C. Randolph a écrit : On Aug 23, 2008, at 2:51 PM, Shawn Erickson wrote: On Fri, Aug 22, 2008 at 2:54 AM, Eduardo Areitio <[EMAIL PROTECTED]> wrote: I'm trying to read individual pixel values in a monochrome image using NSReadPixel, but I haven't been able to.

Re: specify a NSPredicate for jpeg file names?

2008-08-24 Thread Mike Abdullah
Trying to base entirely upon filename extensions is a bad idea. Instead, iterate through the directory and check each file's UTI to see if it conforms to kUTTypeJPEG. Mike. On 24 Aug 2008, at 01:39, Angelo Chen wrote: Hi, I'd like to filter an array to return only jpeg file names like D

Core data entity creation design

2008-08-24 Thread Steven Hamilton
Hi folks, I have a Core Data model which contains two entities. I have a tableview with the standard bindings arrangement and Add/Remove buttons handling one of the entities. What I need to achieve is that when the Add button is pressed both entity types are created, not just the one thats

Streching subviews to fit in a SpilitView

2008-08-24 Thread Devraj Mukherjee
Hi all, My application's user interface revolves around a NSSplitView and I plan to load subviews in one part of the split view for the user to interact (the second half of the split view acting as the navigation, much like iTunes). I have a custom view (with a search box and a list) which I am ab

Re: Reading from Streams - Convenience methods

2008-08-24 Thread Ananda Bollu
Hi, What is the best way to read and write data to a Stream. In Java, DataInputStream and DataOutputStream classes provide various serialization methods such as, readInt(), readLong(), readBoolean() etc. Is there anything equivalent for serializing and de-serializing in cocoa? Thank you Ananda

Re: ObjC 2.0, properties, KVC, special _ hacks etc.

2008-08-24 Thread Negm-Awad Amin
Am Fr,22.08.2008 um 04:59 schrieb Thomas Engelmeier: Am 22.08.2008 um 00:59 schrieb Dave MacLachlan: Also, are the _ in front of member variables for Apple only (so we don't stomp on each other with member var names) or are they using them for the readability reason mentioned above? There

Nil Object Crashing KVO

2008-08-24 Thread Gordon Apple
I¹m having a problem that only shows up in Release mode. I have an object that should have ³editLayer² ivar automatically initialized to nil. A second object has a KVO on this ivar property. When the first object calls setEditLayer (as a result of it¹s own KVO notification observation from el

Re: ObjC 2.0, properties, KVC, special _ hacks etc.

2008-08-24 Thread Thomas Engelmeier
Am 24.08.2008 um 05:59 schrieb John C. Randolph: On Aug 21, 2008, at 7:59 PM, Thomas Engelmeier wrote: Am 22.08.2008 um 00:59 schrieb Dave MacLachlan: Also, are the _ in front of member variables for Apple only (so we don't stomp on each other with member var names) or are they using t

Re: Reading from Streams - Convenience methods

2008-08-24 Thread Jean-Daniel Dupas
Le 24 août 08 à 09:29, Ananda Bollu a écrit : Hi, What is the best way to read and write data to a Stream. In Java, DataInputStream and DataOutputStream classes provide various serialization methods such as, readInt(), readLong(), readBoolean() etc. Is there anything equivalent for serializi

Re: Core data entity creation design

2008-08-24 Thread Quincey Morris
On Aug 24, 2008, at 03:17, Steven Hamilton wrote: I have a Core Data model which contains two entities. I have a tableview with the standard bindings arrangement and Add/Remove buttons handling one of the entities. What I need to achieve is that when the Add button is pressed both entity ty

Re: ObjC 2.0, properties, KVC, special _ hacks etc.

2008-08-24 Thread Negm-Awad Amin
Am So,24.08.2008 um 16:09 schrieb Thomas Engelmeier: Am 24.08.2008 um 05:59 schrieb John C. Randolph: On Aug 21, 2008, at 7:59 PM, Thomas Engelmeier wrote: Am 22.08.2008 um 00:59 schrieb Dave MacLachlan: Also, are the _ in front of member variables for Apple only (so we don't stomp on

Re: Nil Object Crashing KVO

2008-08-24 Thread Ken Thomases
On Aug 24, 2008, at 9:00 AM, Gordon Apple wrote: I’m having a problem that only shows up in Release mode. I have an object that should have “editLayer” ivar automatically initialized to nil. A second object has a KVO on this ivar property. When the first object calls setEditLayer (as a

Re: Core data entity creation design

2008-08-24 Thread Dave Fernandes
If the second entity is instantiated whenever the first is, then you can just add code to create the second entity (NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext:) inside the awakeFromInsert method of the first object. Thus, you only have to explicitly create th

Semi-transparent, blurred NSWindow background?

2008-08-24 Thread Tim Andersson
Hi there, Is there any way of creating a NSWindow that has a semi-transparent, blurred background? With "blurred background" I mean that whatever you see through the window/background is distorted (blurred). Any help is appreciated, Tim Andersson

Re: Core data entity creation design

2008-08-24 Thread Negm-Awad Amin
Am So,24.08.2008 um 18:10 schrieb Quincey Morris: On Aug 24, 2008, at 03:17, Steven Hamilton wrote: I have a Core Data model which contains two entities. I have a tableview with the standard bindings arrangement and Add/Remove buttons handling one of the entities. What I need to achieve is

Semi-transparent, blurred NSWindow background?

2008-08-24 Thread Tim Andersson
Hi there, Is there any way of creating a NSWindow that has a semi-transparent, blurred background? With "blurred background" I mean that whatever you see through the window/background is distorted (blurred). Any help is appreciated, Tim Andersson

DO disconnect when main thread blocked

2008-08-24 Thread Ben Einstein
Hi, I have multiple DO connections to a "client" system over the LAN (technically, each of 4 systems is a server, but it doesn't much matter). The 4 systems check to ensure my system is alive by "pinging" it every few seconds with a simple - (BOOL)clientIsThere method. This ping routine r

Re: Nil Object Crashing KVO

2008-08-24 Thread Gordon Apple
10.5.4, MacBookPro 2.4 GHz Intel Core 2 Duo. Only console message is Program received signal: ³EXC_BAD_ACCESS². #00x9595c6e8 in objc_msgSend #10x924415d3 in _NSValueOfClassWithSpecialSpecificErrorMessage #20x924410b4 in -[NSArrayDetailBinder _refreshDetailContentInBackground:] #3

Re: Nil Object Crashing KVO

2008-08-24 Thread Ken Thomases
On Aug 24, 2008, at 11:58 AM, Gordon Apple wrote: 10.5.4, MacBookPro 2.4 GHz Intel Core 2 Duo. Only console message is Program received signal: “EXC_BAD_ACCESS”. #00x9595c6e8 in objc_msgSend #10x924415d3 in _NSValueOfClassWithSpecialSpecificErrorMessage #20x924410b4 in -[NSArrayDe

Re: DO disconnect when main thread blocked

2008-08-24 Thread Ken Thomases
On Aug 24, 2008, at 11:54 AM, Ben Einstein wrote: I have multiple DO connections to a "client" system over the LAN (technically, each of 4 systems is a server, but it doesn't much matter). The 4 systems check to ensure my system is alive by "pinging" it every few seconds with a simple - (BO

Re: Nil Object Crashing KVO

2008-08-24 Thread Gordon Apple
Thank you, thank you, Thank you! You gave me the key without even realizing it. I had just wanted to give a running version to someone who was visiting and had quickly tried to compile a release version. I stupidly assumed the release version would keep the same project settings except for t

StatusItem to foreground app

2008-08-24 Thread Steve Cronin
Folks; I'm building a tool that I want to allow the user switch 'modes' either running as a menubar statusItem or as regular dock-based application. NOTE: The info.plist has LSUIElement=1. If the user designates the application to run as regular dock-based application then, early in sta

Re: Semi-transparent, blurred NSWindow background?

2008-08-24 Thread Jonathan Dann
On 24 Aug 2008, at 17:45, Tim Andersson wrote: Hi there, Is there any way of creating a NSWindow that has a semi-transparent, blurred background? With "blurred background" I mean that whatever you see through the window/background is distorted (blurred). Any help is appreciated, Tim Ande

Re: StatusItem to foreground app

2008-08-24 Thread Ken Thomases
On Aug 24, 2008, at 4:02 PM, Steve Cronin wrote: NOTE: The info.plist has LSUIElement=1. If the user designates the application to run as regular dock-based application then, early in startup, I do: ProcessSerialNumber psn = { 0, kCurrentProcess }; OSStatus returnCode = TransformPro

*** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-24 Thread Cate Tony
This was a surprise. Here's the relevant code: - (void)saveDocumentAs:(id)sender { NSSavePanel *panel = [NSSavePanel savePanel]; [panel setRequiredFileType:@"abcd"]; [panel beginSheetForDirectory: [documentPath stringByDeletingLastPathComponent]

Re: Core Data Question 1

2008-08-24 Thread R T
On Aug 19, 2008, at 21:39, R T wrote: > I have a Core Data Document-based Application.a document window > with a tableview, a text view and a button. When the button is > selected, a number is read from the text field and that many > objects are programatically added to the tableview. T

How to control the order of enumerating on a NSDictionary

2008-08-24 Thread JArod Wen
Hi Jedis, I wrote codes to add column information into a NSDictionary and then added each of them into a NSTableView as column. I got the key-value pairs in NSDictionary as following: "ang (A)" = 2; "dis (D)" = 1; "pos (P)" = 0; "shp (S)" = 3; Then I used an

Re: How to control the order of enumerating on a NSDictionary

2008-08-24 Thread Graham Cox
On 25 Aug 2008, at 9:36 am, JArod Wen wrote: It should be the problem when enumerating the dictionary, right? How can I control the order of enumerating? You can't if you enumerate the keys directly - there is no concept of "order" for the items of a dictionary. But you can copy them in

Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-24 Thread Kyle Sluder
On Sun, Aug 24, 2008 at 6:03 PM, Cate Tony <[EMAIL PROTECTED]> wrote: > If I put a retain on the panel, the error stops, but isn't it now leaking? No. You took ownership of the NSSavePanel when you created it by using a convenience constructor. You must retain it, and release it when you're done

Re: Core Data Question 1

2008-08-24 Thread Kyle Sluder
On Sun, Aug 24, 2008 at 6:05 PM, R T <[EMAIL PROTECTED]> wrote: > So I think that the NSManagedObjectContext *moc is the property of the > document that the sheet needs. How can amtSheetWindowController be > initialized with this property? How can I bind amtSheetTableController in the > XIB file

CFBoolean

2008-08-24 Thread Chris Idou
How do I create a property in the user defaults of type boolean? Internally it seems to use a NSCFBoolean which is an undocumented type. If I make the assumption it is the same as a CFBoolean, and overlooking the oddness of having to fall back to Carbon for such a fundamental thing, the documen

Re: CFBoolean

2008-08-24 Thread Jason Coco
On Aug 24, 2008, at 21:33 , Chris Idou wrote: How do I create a property in the user defaults of type boolean? Internally it seems to use a NSCFBoolean which is an undocumented type. If I make the assumption it is the same as a CFBoolean, and overlooking the oddness of having to fall back

Re: CFBoolean

2008-08-24 Thread Kyle Sluder
On Sun, Aug 24, 2008 at 9:33 PM, Chris Idou <[EMAIL PROTECTED]> wrote: > How do I create a property in the user defaults of type boolean? +[NSNumber numberWithBool:] --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Re: CFBoolean

2008-08-24 Thread Sherm Pendley
On Sun, Aug 24, 2008 at 9:33 PM, Chris Idou <[EMAIL PROTECTED]> wrote: > How do I create a property in the user defaults of type boolean? [[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"SomeBoolKey"]; sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net _

Re: CFBoolean

2008-08-24 Thread Nathan Kinsinger
On Aug 24, 2008, at 7:33 PM, Chris Idou wrote: How do I create a property in the user defaults of type boolean? Internally it seems to use a NSCFBoolean which is an undocumented type. If I make the assumption it is the same as a CFBoolean, and overlooking the oddness of having to fall back

Re: CFBoolean

2008-08-24 Thread Phil
On Mon, Aug 25, 2008 at 1:33 PM, Chris Idou <[EMAIL PROTECTED]> wrote: > How do I create a property in the user defaults of type boolean? > > Internally it seems to use a NSCFBoolean which is an undocumented type. If I > make the assumption it is the same as a CFBoolean, and overlooking the > odd

Re: CFBoolean

2008-08-24 Thread Chris Idou
--- On Sun, 8/24/08, Phil <[EMAIL PROTECTED]> wrote: > > I'm curious as to why you need a boolean, rather than > just what > -setBool:forKey: gives you? Because I have an array containing dict

Text Fields not Updating when Overridden setNilValueForKey: Called

2008-08-24 Thread Marc Blatt
Hello All, While determining if the 10.4+ formatter has a bug re failing to call the overridden setNilValueForKey: (which I have determined that it does), I wrote the following code: - (void)setNilValueForKey:(NSString *)key { if ([key isEqual:@"unformattedNumber"]) { NSLo

Re: How to control the order of enumerating on a NSDictionary

2008-08-24 Thread JArod Wen
Thanks man, I got your idea. On Aug 24, 2008, at 7:43 PM, Graham Cox wrote: On 25 Aug 2008, at 9:36 am, JArod Wen wrote: It should be the problem when enumerating the dictionary, right? How can I control the order of enumerating? You can't if you enumerate the keys directly - there is

Re: How to control the order of enumerating on a NSDictionary

2008-08-24 Thread JArod Wen
Hi Mike, I just want to make sure that the following is sent by you directly or someone else. On Aug 24, 2008, at 11:01 PM, Mike wrote: You stupid moron. Did you even read Apple's documentation? Apparently not. If you had, you would have learned that dictionaries on OS X do not support ord

Re: Semi-transparent, blurred NSWindow background?

2008-08-24 Thread Rob Keniger
On 25/08/2008, at 2:45 AM, Tim Andersson wrote: Is there any way of creating a NSWindow that has a semi-transparent, blurred background? With "blurred background" I mean that whatever you see through the window/background is distorted (blurred). In 10.5 you can add any core image filter t

Re: Semi-transparent, blurred NSWindow background?

2008-08-24 Thread Kyle Sluder
On Mon, Aug 25, 2008 at 12:13 AM, Rob Keniger <[EMAIL PROTECTED]> wrote: > Insert standard disclaimer about using private Apple APIs here. And, additionally, please file an enhancement request at http://bugreport.apple.com because this functionality seems quite handy. --Kyle Sluder __

Re: File Extensions Problem

2008-08-24 Thread Andrew Merenbach
On Aug 21, 2008, at 11:29 PM, Adil Saleem wrote: Hi, I want to display in a tableview, list of all media files (audio, video files) present in a certain directory. Currently what i am doing is that i am getting the file names in an NSMutableArray using NSFileManager function directoryCont

Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-24 Thread Graham Cox
On 25 Aug 2008, at 11:09 am, Kyle Sluder wrote: On Sun, Aug 24, 2008 at 6:03 PM, Cate Tony <[EMAIL PROTECTED]> wrote: If I put a retain on the panel, the error stops, but isn't it now leaking? No. You took ownership of the NSSavePanel when you created it by using a convenience constructor.

Re: How to control the order of enumerating on a NSDictionary

2008-08-24 Thread Negm-Awad Amin
What an asshole … Amin Negm-Awad [EMAIL PROTECTED] ___ 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/Unsu

Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-24 Thread Negm-Awad Amin
Am Mo,25.08.2008 um 07:50 schrieb Graham Cox: On 25 Aug 2008, at 11:09 am, Kyle Sluder wrote: On Sun, Aug 24, 2008 at 6:03 PM, Cate Tony <[EMAIL PROTECTED]> wrote: If I put a retain on the panel, the error stops, but isn't it now leaking? No. You took ownership of the NSSavePanel when y

Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-24 Thread Graham Cox
On 25 Aug 2008, at 4:17 pm, Negm-Awad Amin wrote: Don't care about this. IF it is a singleton, retaining is no problem. IF it is NOT, retaining is the right way to handle it. Sure, no problem for code I'm writing now. Thing is, I never noticed this "tries to" before and always thought th

FW: failing opening socket

2008-08-24 Thread Luca Ciciriello
Thanks for the answer. Yes, I'm working as root but I'm still unable to find a solution to my problem. Unfortunately I've to implement this blessed ping function in C++ inside my cocoa app. I've used the following code without any results: struct hostent *hp = 0; struct sockaddr_in

Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-24 Thread Graham Cox
On 25 Aug 2008, at 4:24 pm, Graham Cox wrote: On 25 Aug 2008, at 4:17 pm, Negm-Awad Amin wrote: Don't care about this. IF it is a singleton, retaining is no problem. IF it is NOT, retaining is the right way to handle it. Sure, no problem for code I'm writing now. Thing is, I never notic

Fwd: How to control the order of enumerating on a NSDictionary

2008-08-24 Thread mmalc crawford
Regardless of the abuse in the message to which Amin is responding, his on-list message is wholly inappropriate. mmalc Begin forwarded message: From: Negm-Awad Amin <[EMAIL PROTECTED]> Date: August 24, 2008 11:05:53 PM PDT To: JArod Wen <[EMAIL PROTECTED]> Cc: Cocoa Developers , [EMAIL PROT

Re: Interface Builder misbehaving while designing toolbars

2008-08-24 Thread Quincey Morris
On Aug 24, 2008, at 22:59, Devraj Mukherjee wrote: I am using XCode 3.1 to develop a Cocoa application. One of my Xib files has a Window with a toolbar. However it seems like it doesn't write changes that I make to the toolbar back to the disk, or somehow reverts when I close Interface Builder.