Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"

2008-03-24 Thread John C. Randolph
On Mar 23, 2008, at 10:31 PM, Dave Hersey wrote: If it's really important to you, send an incident to DTS and pay them $195 for the answer. I suspect they'll tell you what we've told you. Speaking as a former Apple DTS engineer, I would ask you not to advise Charlie to waste their time i

Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"

2008-03-24 Thread John C. Randolph
On Mar 23, 2008, at 10:04 PM, charlie wrote: I could care less what anyone else thinks about this decision. The phrase you're trying to use is "couldn't care less". Think about it for a second, try to parse it. In any case, if you're going to be surly when people who know more than you

Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"

2008-03-24 Thread Dave Hersey
Speaking as a former Apple DTS engineer... Maybe you had my old office. : ) - d On Mar 24, 2008, at 3:14 AM, John C. Randolph wrote: On Mar 23, 2008, at 10:31 PM, Dave Hersey wrote: If it's really important to you, send an incident to DTS and pay them $195 for the answer. I suspect they

Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"

2008-03-24 Thread charlie
This has gotten way out of hand. I want to apologize for coming off "surly"/rude. I think I expected a certain type of answer to my original question and when it was clear that the thread was moving in another direction, I reacted. Sorry about that. I think I'll just give up on this topic

Re: NSDistributedNotification names

2008-03-24 Thread Marco Cassinerio
If done through NSDistributedNotificationCenter or NSWorkspace's special notification center, then yes. Otherwise, no. What exactly are you trying to accomplish? Nick Zitzmann I would my application be notified when: - another application has been launched

Perform selector on thread

2008-03-24 Thread Eddy Hatcher
Hi, I am detaching a selector "A" on a separate thread in another class. In this selector I am calling another selector "B" in the same class using [self performSelector:@selector(B)]; Which thread will this selector "B" be run on? The main, or the one i created for "A". I want selector

Re: Perform selector on thread

2008-03-24 Thread John C. Randolph
On Mar 24, 2008, at 4:19 AM, Eddy Hatcher wrote: Hi, I am detaching a selector "A" on a separate thread in another class. In this selector I am calling another selector "B" in the same class using [self performSelector:@selector(B)]; Which thread will this selector "B" be run on? The mai

Re: Beginner with Cocoa

2008-03-24 Thread Jeff LaMarche
On Mar 24, 2008, at 12:44 AM, Sherm Pendley wrote: The main thing you'll have to watch for: Objective-C 2.0 has garbage collection available, like Java and scripting languages you're familiar with, but it's off by default, and earlier Macs don't have it. You'll probably have to learn the old wa

Re: Perform selector on thread

2008-03-24 Thread Tony Becker
Eddy: In response to your question, yes, it is necessary. It turns out that many things aren't "thread-safe". This means you can't simply spawn many threads from the "main" thread and have them successfully interact (message) to objects in other threads in all cases. Some really wei

Re: Beginner with Cocoa

2008-03-24 Thread Erik Buck
> You'll probably have to learn the old way, "retain and release," > which is unique to Objective-C. For the record, reference counting for memory management is one of the oldest techniques in software and is not unique to Objective-C or Cocoa. Microsoft Foundation Class CString uses it. CO

Quickly remove contents from NSArrayController

2008-03-24 Thread Martin Linklater
HI. I have an NSArrayController which has over 15000 entries. When I clear the array using [itemBrowserArrayCTRL removeObjects:[itemBrowserArrayCTRL arrangedObjects]]; it takes a long time... like 10+ seconds on my MacBook Pro. Is there a quicker way of clearing the contents ?

Re: Quickly remove contents from NSArrayController

2008-03-24 Thread Jeff LaMarche
I would think that [itemBrowserArrayCTRL removeAllObjects]; would be your best. By calling arrangedObjects and feeding it to removeObjects:, you're causing your array to sort all 15000 entries before it removes them individually. HTH Jeff On Mar 24, 2008, at 10:16 AM, Martin Linklater wrot

Re: Interface Builder (almost) supports NSToolbar

2008-03-24 Thread Karl Moskowski
If you're creating a toolbar for which all items should be selectable, instead of binding each of the toolbar's items separately or iterating over them all and building an array, you can just use KVC to get an array of all items' identifiers. // NSToolbar delegate method - (NSArray *) toolb

Re: Quickly remove contents from NSArrayController

2008-03-24 Thread Martin Linklater
I would think that [itemBrowserArrayCTRL removeAllObjects]; would be your best. By calling arrangedObjects and feeding it to removeObjects:, you're causing your array to sort all 15000 entries before it removes them individually. NSArrayController doesn't have a removeAllObjects method...

Re: Beginner with Cocoa

2008-03-24 Thread Scott Thompson
On Mar 24, 2008, at 7:12 AM, Jeff LaMarche wrote: I'g be rather surprised if the Cocoa books took out discussions of traditional objective-C memory managements in their next releases. It's still available for use, and as you mention, necessary for writing to earlier versions of the OS, not

Re: Quickly remove contents from NSArrayController

2008-03-24 Thread Jeff LaMarche
Doh! You're right if course. How about using removeSelectedIndexes:? Should be faster than sorting the contents before removing them, Sent from my iPhone On Mar 24, 2008, at 10:26 AM, Martin Linklater <[EMAIL PROTECTED]> wrote: I would think that [itemBrowserArrayCTRL removeAllObjects];

Re: Quickly remove contents from NSArrayController

2008-03-24 Thread Kyle Sluder
On Mon, Mar 24, 2008 at 10:35 AM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: > Doh! You're right if course. How about using removeSelectedIndexes:? > Should be faster than sorting the contents before removing them, Hrm. Why not try attacking this from the model end instead of the controller end?

Re: Perform selector on thread

2008-03-24 Thread Kyle Sluder
On Mon, Mar 24, 2008 at 7:19 AM, Eddy Hatcher <[EMAIL PROTECTED]> wrote: > Which thread will this selector "B" be run on? The main, or the one > i created for "A". I want selector "B" to be run on the same thread as > for "A". Yes, B will be called on the same thread, but whether the contents

Re: NSTreeController / CoreData still broken in 10.5?

2008-03-24 Thread Doug Knowles
Adam, I had been using those very NSTreeController extensions in addition to my proxy classes. They use undocumented APIs (as far as I can tell), and broke when I updated my project to 10.5 only, because (I think) NSTreeController adopted a public API (NSTreeNode) in place of what the extensions we

Re: NSDistributedNotification names

2008-03-24 Thread Jens Alfke
Distributed notifications aren't the same thing as NSNotifications, even though Foundation tries to give them a similar API. Regular notifications aren't available to other processes; a notification has to be explicitly posted as distributed, and few are. Distributed notifications are mostl

Garbage collection - was Beginner with Cocoa

2008-03-24 Thread Bill Cheeseman
on 2008-03-24 10:32 AM, Scott Thompson at [EMAIL PROTECTED] wrote: > Over time, there will be more code able to take advantage of the > Garbage Collector, but I think it will be some time before it's > ubiquitous enough to remove the retain/release memory management > scheme from the literature.

Re: NSDistributedNotification names

2008-03-24 Thread A.M.
On Mar 24, 2008, at 10:57 AM, Jens Alfke wrote: Distributed notifications aren't the same thing as NSNotifications, even though Foundation tries to give them a similar API. Regular notifications aren't available to other processes; a notification has to be explicitly posted as distributed,

NSOutlineView loses selection, but it's NSTreeController does not

2008-03-24 Thread Doug Knowles
Hi, all, My application has an outline view that is used to select filters on a companion table view by selecting nodes in the outline. The outline also adjusts itself to the content of the table, which runs the risk of some interesting feedback loops. (It's hard to believe how long a Mac Pro can

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread colo
In Ruby GC just works dandy without thought. Why is it so different in Cocoa Obj2.0? What kinda of real headaches will I have jumping into osx programing compared to ruby ? On 3/24/08, Bill Cheeseman <[EMAIL PROTECTED]> wrote: > on 2008-03-24 10:32 AM, Scott Thompson at [EMAIL PROTECTED] wrote: >

CATiledLayer tile invalidation

2008-03-24 Thread Dmitry Pugachev
I'm writing an application that dynamically renders contents into a large scrollable view, and I'm using a CATiledLayer object as a content layer. It handles tiled drawing pretty well, but I also want to be able to synchronize it with my internal cache, which contains temporary data for each tile

Communications between multiple NIB's

2008-03-24 Thread Lincoln Green
Alright, I have been searching archives, following tutorials, and looking at source code for several hours, and I cannot figure out the answer to my problem. Is there a way to programmatically connect to a NIB file and read it's outlets without changing my File's Owner? I have a color well

Re: CATiledLayer tile invalidation

2008-03-24 Thread John Harper
No, there's no way to do that right now, CATiledLayer doesn't even know when tiles are evicted from the cache. Probably the best thing to do is to give your cache a maximum size and remove items after they've been idle for some time… John On Mar 24, 2008, at 8:39 AM, Dmitry Pugach

Re: Communications between multiple NIB's

2008-03-24 Thread Cathy Shive
Hi, Have you tried using the "FirstResponder" for this? Add an action to the preferences window's nib's "FirstResponder" called "setWindowBackgroundColor". Then connect the color well to the first responder and connect to that action. If the window controller of the other window implemen

Re: Communications between multiple NIB's

2008-03-24 Thread Sherm Pendley
On Mon, Mar 24, 2008 at 12:02 PM, Lincoln Green <[EMAIL PROTECTED]> wrote: > Alright, I have been searching archives, following tutorials, and > looking at source code for several hours, and I cannot figure out the > answer to my problem. > > Is there a way to programmatically connect to a NIB fil

Re: Intercepting retain/release of object

2008-03-24 Thread Jack Repenning
On Mar 23, 2008, at 9:50 PM, Stuart Malin wrote: For neary all of my code, I have nice, straightforward retain- release pathways. The one that had been giving me trouble is an oddball: I have a factory class that generates an instance. That instance is bounced around handlers of a state machi

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread Erik Buck
In Ruby GC just works dandy without thought. Why is it so different in Cocoa Obj2.0? What kinda of real headaches will I have jumping into osx programing compared to ruby ? The short answer is that Ruby is a nifty high level scripting language that insulates the programmer thoroughly from poin

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread Bill Cheeseman
on 2008-03-24 11:30 AM, colo at [EMAIL PROTECTED] wrote: > In Ruby GC just works dandy without thought. Why is it so different in > Cocoa Obj2.0? My main issue is how to know exactly when to declare instance variables weak or strong. There seem to be some subtleties in that area that I don't yet

Core Data & Passwords

2008-03-24 Thread Jeff LaMarche
When writing a Core Data application that utilizes Core Data, what is the best way to store sensitive information like a password? My assumption would be that you would make a password attribute, but make it transient, then override the accessor and mutator to utilize Keychain Services so t

Re: Textview is overwriting itself

2008-03-24 Thread Ross Carter
On Mar 21, 2008, at 2:37 PM, Christopher Woodruff wrote: I used a textview to work as an automatically scrolling log window for a real time data output feed. I limit the size of the textstorage programmatically. When I fill the textstorage to my programmatic size limit (currently is 16384

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread Clark Cox
On Mon, Mar 24, 2008 at 9:12 AM, Bill Cheeseman <[EMAIL PROTECTED]> wrote: > on 2008-03-24 11:30 AM, colo at [EMAIL PROTECTED] wrote: > > > In Ruby GC just works dandy without thought. Why is it so different in > > Cocoa Obj2.0? > > My main issue is how to know exactly when to declare instance v

Re: Beginner with Cocoa

2008-03-24 Thread Jack Repenning
On Mar 24, 2008, at 7:13 AM, Erik Buck wrote: For the record, reference counting for memory management is one of the oldest techniques in software and is not unique to Objective-C or Cocoa. Microsoft Foundation Class CString uses it. COM/Active-X IUnknown uses it. It's essential to using

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread colo
I only started in Ruby as a main Lang. I tried Cocoa in the past and await the new book; and will read the pdf from Apple. But From what I tried compared to Ruby. The Fact that GC just works in Ruby helps tremendously with Rubys straight forward syntax structure. Aside from that. Are there tutoria

User interface element question (Find... in Safari)

2008-03-24 Thread Christian Moen
Dear cocoadev, I'd like to add user interface elements somewhat similar to searching in a Finder window (ref the Search: ribbon) or Command-F (Find...) in Safari 3.x to my own application. Is there a standard user interface element I can use to make something like this? Is this also available in

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread Scott Thompson
On Mar 24, 2008, at 10:30 AM, colo wrote: In Ruby GC just works dandy without thought. Why is it so different in Cocoa Obj2.0? Conceptually, it's not much different. In implementation, however, they are two separate garbage collectors and they don't play well together. The problem crops

Re: Beginner with Cocoa

2008-03-24 Thread colo
> Reference counting is well established. Retain/release is not > reference counting. > > The essential point of reference counting is that the language system > does it for you, you don't have to think about it at all. Most Java > and scripting developers never even learn to think that there

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread Bill Cheeseman
on 2008-03-24 1:02 PM, colo at [EMAIL PROTECTED] wrote: > Are there tutorials or some such for these Cocoa > Release ideals or will I cross them when I read the pdf ? If you have Apple's Developer Tools installed, you already have a ton of Apple documentation about Objective-C and the Cocoa frame

Re: Beginner with Cocoa

2008-03-24 Thread Jeff LaMarche
On Mar 24, 2008, at 1:43 PM, colo wrote: Well I have to say. None of that sounds like any fun what so ever. In fact it sounds a little anti-constructive with the amount of time it would take to get anything out the door let alone prototyped to a beta. Then don't judge a book b

Re: Beginner with Cocoa

2008-03-24 Thread Sherm Pendley
On Mon, Mar 24, 2008 at 1:43 PM, colo <[EMAIL PROTECTED]> wrote: > > Well I have to say. None of that sounds like any fun what so ever. In > fact it sounds a little anti-constructive with the amount of time it > would take to get anything out the door let alone prototyped to a > beta. Eric and J

How to get NSURL* form NSURLConnection?

2008-03-24 Thread Laurent Cerveau
Hi When using NSURLConnection is there a way to get back the NSURL from the NSURLConnection (in a delegate method)? Apparently if I log the NSURLConnection it knows what URL is concerned but I do not find an accessor for it. Thanks laurent ___

Re: Beginner with Cocoa

2008-03-24 Thread Chris Hanson
On Mar 24, 2008, at 10:01 AM, Jack Repenning wrote: On Mar 24, 2008, at 7:13 AM, Erik Buck wrote: For the record, reference counting for memory management is one of the oldest techniques in software and is not unique to Objective-C or Cocoa. Microsoft Foundation Class CString uses it. COM/A

Re: Beginner with Cocoa

2008-03-24 Thread Clark Cox
On Mon, Mar 24, 2008 at 10:01 AM, Jack Repenning <[EMAIL PROTECTED]> wrote: > On Mar 24, 2008, at 7:13 AM, Erik Buck wrote: > > For the record, reference counting for memory management is one of > > the oldest techniques in software and is not unique to Objective-C > > or Cocoa. Microsoft Found

Re: Writing a preference pane that configures hotkeys?

2008-03-24 Thread Rob Napier
Take a look at shortcutrecorder: http://code.google.com/p/shortcutrecorder. Full IB3 support isn't *quite* there in the released versions, but it's all very close to what you're talking about, and while updates have been a little slow there (*), its much more recently maintained than Nathan's page.

Re: Cocoa Database Connection

2008-03-24 Thread Western Botanicals
Thank you to everyone who has responded so far. I ended up fixing the problem by importing the "postgres_ext.h" file into my project (I wish I could have just done a find for it). But now with the following code: #import #include int main(int argc, char *argv[]) { char *conninfo =

Re: Communications between multiple NIB's

2008-03-24 Thread Jonathan Hess
Hey Lincoln - To do this with actions and outlets, you just have to have your controllers communicate. Something like this should work: @interface MainController : NSObject { NSWindow *window; } - (void)setWindowBackgroundColor:(NSColor *)color; @end @implementation MainController -

Re: Cocoa Database Connection

2008-03-24 Thread Jeff LaMarche
Did you include libpq.a from the /lib folder of our PostgreSQL implementation? On Mar 24, 2008, at 3:21 PM, Western Botanicals wrote: Thank you to everyone who has responded so far. I ended up fixing the problem by importing the "postgres_ext.h" file into my project (I wish I could have j

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread colo
Thank you all from both of the message threads. I have desided not to wait and try my hand at reading the Apple docs again. Things like oop and mvc are simple to understand for me and have been drilled quite extensively into my head from Ruby and Rails now. My biggest goal is to make a css drawing

Re: Cocoa binding always produces zero for bound value

2008-03-24 Thread Ken Thomases
On Mar 23, 2008, at 8:18 PM, Tron Thomas wrote: I am having a problem with Cocoa bindings that I cannot figure out. There is some object that is observing the value of another object. An example for the relevant implementation of the classes is as follows: @implementation SomeObject - (id

Re: How to delay application quit?

2008-03-24 Thread Ken Thomases
On Mar 23, 2008, at 8:55 PM, Samvel wrote: I have defined class (say, Download) that uses NSURLConnection to download something from internet. My application is Cocoa with UI. I want to call: [Download cancel] and wait for notification from this class once user quits application. Reasoni

Display artifacts in large (1600 row) table view

2008-03-24 Thread Doug Knowles
Hi, everyone, In an application under development, I'm seeing display artifacts at the boundaries of some rows of a fairly generic NSTableView displaying 1600 rows by 7 columns. The artifacts seem to be no more than a pixel high, and each one is no more than 5-10 pixels wide, if that. They appear a

Re: Cocoa Database Connection

2008-03-24 Thread Justin Giboney
Putting this line -L/usr/local/pgsql/lib -lpq in my Other Linker Flags, made the error go away, thanks Tony, thanks everyone else who was working with me Justin Giboney On Mar 24, 2008, at 2:57 PM, Tony Becker wrote: Seems like -L/usr/local/pgsql/lib -lqp or -L/usr/local/pgsql/lib -lqp

Re: How to get NSURL* form NSURLConnection?

2008-03-24 Thread Rob Napier
You get the URL out of the NSURLRequest, which you can fetch at various points. -Rob On Mon, Mar 24, 2008 at 2:02 PM, Laurent Cerveau <[EMAIL PROTECTED]> wrote: > Hi > > When using NSURLConnection is there a way to get back the NSURL from > the NSURLConnection (in a delegate method)? Apparently

Re: Communications between multiple NIB's

2008-03-24 Thread Bertil Holmberg
This is the single question that's keeping all newbies awake at night. Provided that your Prefs nib has a controller, you can use a Notification to let your main app know about the color changes. However, isn't it plausible that your Prefs nib is lazily loaded by your main app? If so, it ca

Re: How to get NSURL* form NSURLConnection?

2008-03-24 Thread Laurent Cerveau
Hi Rob Thanks for the answer. Unfortunately I do not see the points of getting the NSURLRequest. For example if I implement the delegate method - (void)connectionDidFinishLoading:(NSURLConnection *)connection; there is no NSURLRequest here (and no request accessor on the NSURLConnection) .

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread has
Scott Thompson wrote: To integrate the two, someone would have to rewrite the internals of the Ruby interpreter and add in special case code for Objective-C objects. FYI, there's a project afoot to do just that, porting the Ruby 1.9 interpreter to run on top of Cocoa: http://trac.

Re: Quickly remove contents from NSArrayController

2008-03-24 Thread Martin Linklater
Doh! You're right if course. How about using removeSelectedIndexes:? Should be faster than sorting the contents before removing them, Thanks. 'removeObjectsAtArrangedObjectIndexes' does the job nice and quickly. ___ Cocoa-dev mailing list (Cocoa-dev

Re: Communications between multiple NIB's

2008-03-24 Thread Gerd Knops
Is there a way to programmatically connect to a NIB file and read it's outlets without changing my File's Owner? I have a color well in one NIB (My Prefs NIB) and a window in another. I want the color well to change the window's background. I have an action called setColor:, but I cannot figure ou

Re: How to get NSURL* form NSURLConnection?

2008-03-24 Thread Rob Napier
Heh, you're right. I went looking through my code and realized that I've solved it in the past by subclassing NSURLConnection to add a request accessor or by maintaining a dictionary of connection->request objects in the delegate. I'm so used to my subclass that I forgot it's not in real Cocoa

Re: How to get NSURL* form NSURLConnection?

2008-03-24 Thread Jens Alfke
I always create a separate delegate object for each URLConnection. It makes the delegate code simpler, and avoids problems like the one you've run into. —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-

Re: NSLocale: " " vs. " "

2008-03-24 Thread Deborah Goldsmith
Sadly, not currently. Please file a bug. Deborah Goldsmith Apple Inc. [EMAIL PROTECTED] On Mar 19, 2008, at 4:48 AM, Ruotger Skupin wrote: Hi, Is there a way to determine if a user (or an address depending on the country) prefers the zip code first or the city name first, e.g.: Apple 1 Inf

NSTextStorage subclassing questions

2008-03-24 Thread Jesse Grosjean
I have a basic NSTextStorage subclass that I've included at the end of this email. I have two questions. First what is the proper way to implement syntax highlighting in an NSTextStorage subclass. (I want to do it in the subclass, not in an NSTextStorage delegate). The basic pattern that I'

Re: Communications between multiple NIB's

2008-03-24 Thread Steve Weller
On Mar 24, 2008, at 3:27 PM, Gerd Knops wrote: Is there a way to programmatically connect to a NIB file and read it's outlets without changing my File's Owner? I have a color well in one NIB (My Prefs NIB) and a window in another. I want the color well to change the window's background. I hav

Re: What is this invisible character?

2008-03-24 Thread Deborah Goldsmith
UTF-8 should only be used for text files that are expected to be passed to legacy software (including Internet applications). For text that is not in a plain text file (or HTML or other MIME subtype of TEXT), UTF-16 is preferred. NSString will interpret the BOM for you if you indicate the e

Source list using bindings?

2008-03-24 Thread Hamish Allan
Hi, Is there any way to use bindings for a source list? The object that gets passed to the delegate method -outlineView:isGroupItem: is an NSTreeControllerTreeNode which doesn't appear to have a public API... Thanks, Hamish ___ Cocoa-dev mailing list (

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread Scott Thompson
On Mar 24, 2008, at 3:03 PM, colo wrote: But I do not wish to use the bridge options yet I would rather do it right in one place than trying to glue it together and spend days not "getting it" I'll make a compromise with you. :-) I'll let you try one... just one... RubyCocoa application befo

Get root privileges with NSTask

2008-03-24 Thread Mr. Gecko
Hello I am needing to get root privileges with NSTask so my program can install some items that will get downloaded from the internet with curl is that possible I know I can do that with applescript. Thanks for tips/help, Mr. Gecko ___ Cocoa-dev ma

Re: Get root privileges with NSTask

2008-03-24 Thread Nick Zitzmann
On Mar 24, 2008, at 9:07 PM, Mr. Gecko wrote: Hello I am needing to get root privileges with NSTask so my program can install some items that will get downloaded from the internet with curl is that possible I know I can do that with applescript. No. You can execute tasks with root privileg

Re: Get root privileges with NSTask

2008-03-24 Thread Michael Watson
Search the list. This comes up often. When I say "it comes up often", I mean "this gets asked so often that it actually was talked about yesterday". Chris Hanson posted this: (1) Use Authorization Services to cr

Re: Updates in one split view pane causing other pane to redraw (on Tiger): SOLVED

2008-03-24 Thread Martin Redington
It turns out this was due to a misplaced -[NSView setNeedsDisplay] call in my custom cell's drawing method. Every time the cell was drawn, it would set the needsDisplay flag, so when the window checked the views to see if they needed display, the table view did. - (void)drawWithFrame:(

Re: NSLocale: " " vs. " "

2008-03-24 Thread Rohan Lloyd
Although there's no API, the information you need is available in: /System/Library/Frameworks/AddressBook.framework/Resources/ ABAddressFormats.plist On 25 Mar 2008, at 10:45 AM, Deborah Goldsmith wrote: Sadly, not currently. Please file a bug. Deborah Goldsmith Apple Inc. [EMAIL PROTECTE

Re: Cocoa Database Connection

2008-03-24 Thread Jens Alfke
On 24 Mar '08, at 2:06 PM, Justin Giboney wrote: Putting this line -L/usr/local/pgsql/lib -lpq in my Other Linker Flags, made the error go away, If you're using Xcode, you can do the same thing through the GUI by adding the dylib (pq.dylib?) to the project using the Add File... command. (

Re: Cocoa binding always produces zero for bound value

2008-03-24 Thread Tron Thomas
Ken Thomases wrote: On Mar 23, 2008, at 8:18 PM, Tron Thomas wrote: At this point, the compiler only knows that object is an id. It doesn't know the specific class. So, of any of the "value" methods it might know about, it doesn't know which specific one is meant. Normally that wouldn't ma

outlineViewSelectionDidChange not called

2008-03-24 Thread Adam Gerson
I have an NSOutlineView column bound to an NSTreeController. When I remove an object from the TreeController the row representing the deleted object disappears and OutlineView selects the next row, but does not send a notification to the delegate method outlineViewSelectionDidChange. When I manuall

Memory Management and objects creation via static methods...

2008-03-24 Thread Samvel
Hi, Lots of classes define static methods that create objects for instance: Class NSString: +(id) stringWithString: (NSString *) string; or Class NSArray: +(id) arrayWithObjects: (id) firstObj, ...; I am really confused about next situation and memory management of objects cr

Re: Memory Management and objects creation via static methods...

2008-03-24 Thread Ken Thomases
Hi, On Mar 24, 2008, at 11:19 PM, Samvel wrote: Lots of classes define static methods that create objects for instance: Class NSString: +(id) stringWithString: (NSString *) string; or Class NSArray: +(id) arrayWithObjects: (id) firstObj, ...; A minor nit-pick about termino

Re: outlineViewSelectionDidChange not called

2008-03-24 Thread Jens Alfke
On 24 Mar '08, at 9:18 PM, Adam Gerson wrote: When I remove an object from the TreeController the row representing the deleted object disappears and OutlineView selects the next row, but does not send a notification to the delegate method outlineViewSelectionDidChange. IIRC, the notification

Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Samvel
Hi, I run into troubles trying to register my object with NSNotificationCenter in class -(id) init; Basically here is my constructor: -(id) init { self = [super init]; if( self) { [[NSNotificationCenter defaultCenter] ad

Re: Memory Management and objects creation via static methods...

2008-03-24 Thread Jens Alfke
On 24 Mar '08, at 9:19 PM, Samvel wrote: Should I retain string in init? Yes. When you store an object pointer in an instance variable you almost always want to retain it, so the object pointed to won't get deleted. If the pointer came from an "init" method, that object is already retai

Re: Memory Management and objects creation via static methods...

2008-03-24 Thread Sherm Pendley
On Tue, Mar 25, 2008 at 12:19 AM, Samvel <[EMAIL PROTECTED]> wrote: > > Lots of classes define static methods that create objects for instance: > > Class NSString: >+(id) stringWithString: (NSString *) string; > > or Class NSArray: >+(id) arrayWithObjects: (id) firstObj, ...; > > I

Re: Memory Management and objects creation via static methods...

2008-03-24 Thread Samvel
Sorry for terminology. I came from C++ and still have some problems with it especially calling things in Objective-C way :). Thanks for descriptive answer. Actually I meant to release string in dealloc method of my class. Just was thinking about next question regarding NSNotificationCenter at

Re: Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Jens Alfke
On 24 Mar '08, at 9:51 PM, Samvel wrote: I run into troubles trying to register my object with NSNotificationCenter in class -(id) init; That's a fine place to do it. //... (at this point self has lost it's original value having some ' I don't understand what that comment

Re: Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Samvel
On Mar 24, 2008, at 11:56 PM, Jens Alfke wrote: On 24 Mar '08, at 9:51 PM, Samvel wrote: I run into troubles trying to register my object with NSNotificationCenter in class -(id) init; That's a fine place to do it. //... (at this point self has lost it's original value hav

Re: Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Sherm Pendley
On Tue, Mar 25, 2008 at 12:51 AM, Samvel <[EMAIL PROTECTED]> wrote: > Hi, > > I run into troubles trying to register my object with > NSNotificationCenter in class >-(id) init; > > Basically here is my constructor: >-(id) init >{ > self = [super init]; > >

Re: Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Dave Hersey
I think you're seeing a debugger anomaly when stepping through things. Try logging self before and after. NSLog(@"self = %p", self); - d On Mar 25, 2008, at 1:04 AM, Samvel wrote: On Mar 24, 2008, at 11:56 PM, Jens Alfke wrote: On 24 Mar '08, at 9:51 PM, Samvel wrote: I run into troubl

Re: Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Samvel
Reason: I thought that at some point NSNotificationCenter has to be instantiated in an application loading process and my constructor may have executed at earlier stage. Answer: Unfortunately the reason was much simpler than that. It turned out to be an example (answer) to my prev. question

Re: Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Dave Hersey
The list for arrayWithObjects needs to end with a nil object. - d On Mar 25, 2008, at 1:16 AM, Samvel wrote: Reason: I thought that at some point NSNotificationCenter has to be instantiated in an application loading process and my constructor may have executed at earlier stage. Answer: Un

CoreAudio / AudioUnit

2008-03-24 Thread Alex ROUGE
Hi everybody. I guess it's not the best place to put my request but perhaps you can help with a CoreAudio / AudioUnit question. I have an application, working fine at the moment, generating an audio buffer and send it to CoreAudio. To do so I had to implement a call back and so on. Until t

Re: Where is it better to register with NSNotificationCenter in class?

2008-03-24 Thread Dave Hersey
The other thing I should have mentioned is that when you add items to an array, they are retained, so you don't need to retain each of the strings. I think the problem is probably your missing nil in the object list. The array contents are probably hosed. It's reasonable to retain the array

Re: outlineViewSelectionDidChange not called

2008-03-24 Thread Adam Gerson
Hey Jens, Thanks for getting back to me. > > When I > > remove an object from the TreeController the row representing the > > deleted object disappears and OutlineView selects the next row, but > > does not send a notification to the delegate method > > outlineViewSelectionDidChange. > > II

Re: Source list using bindings?

2008-03-24 Thread Rob Keniger
On 25/03/2008, at 11:42 AM, Hamish Allan wrote: Is there any way to use bindings for a source list? The object that gets passed to the delegate method -outlineView:isGroupItem: is an NSTreeControllerTreeNode which doesn't appear to have a public API... Class-dump shows that NSTreeControllerTr