Doc on Controller Content vs. Parameters in Interface Builder Bindings panel ?

2009-02-22 Thread Guillaume Laurent
Hi all, I've googled around quite a bit but can't seem to find a full reference on all the settings of the Bindings panel in Interface Builder. In particular, in the case of a controller object (NSArrayController) and a Core Data model, I'm not sure what the distinction is between the "Co

Re: Moving oneself to /Applications (or ~/Applications)

2009-02-22 Thread Benjamin Dobson
On 23 Feb 2009, at 05:47:22, Adam Leonard wrote: (If you want another opinion, I don't think what you are doing is a bad idea. John Gruber made a point in a recent article (http://daringfireball.net/2009/02/untitled_document_syndrome ) that most users don't want to mess with the file system a

Re: Moving oneself to /Applications (or ~/Applications)

2009-02-22 Thread Charles Srstka
On Feb 21, 2009, at 2:46 PM, Nick Zitzmann wrote: Looks like the documentation writers changed their minds about this: It used to say there that installation pack

How to find out if a CAAnimation has ended

2009-02-22 Thread Benjámin Salánki
Hi there, I have an application which uses CAAnimation. It basically moves drops (moves down the y axis) CALayers (in pairs which move independently from each other) when a key is pressed. I need to be able to determine when the animation has stopped to be able to proceed according to the

Re: Moving oneself to /Applications (or ~/Applications)

2009-02-22 Thread Adam Leonard
Hi, So yes, as people mentioned you shouldn't move an application while it is running, so the solution is obviously to move it when it is not running. You will need a little tool that you launch with NSTask that does the move for you. As you noted, Sparkle does everything you want, except

[MODERATOR} Re: test please ignore

2009-02-22 Thread Scott Anguish
On 22-Feb-09, at 9:38 PM, Matt Anderson wrote: Sorry if this actually gets through -- I don't think it will. Please ignore. Please don NOT post test messages to the list. They hit more than 8000+ subscribers. Instead check cocoabuilder.com for the message. it is a third party off-list

Re: test please ignore

2009-02-22 Thread Matt Anderson
I see it got through. I also (now) see that the original got through as well, 8-12 hours after I sent it -- I had been looking for evidence of it in an archive (cocoabuilder.com), but it didn't show up on the first page of results, searching for "NSMatrix" (I incorrectly assumed it was sorted chro

Re: Moving oneself to /Applications (or ~/Applications)

2009-02-22 Thread Kyle Sluder
On Sun, Feb 22, 2009 at 10:49 PM, Ben Lachman wrote: > The original question stands, does anyone have code that would be helpful in > implementing such a feature? To be fair, the original question was indeed answered by Nick Zitzmann at the very outset: you can't move a running application, becau

Re: Moving oneself to /Applications (or ~/Applications)

2009-02-22 Thread Ben Lachman
Perhaps the issue is that you are assuming an offer to do something is subtle way of telling you where to put your stuff. In reality it isn't. It's purely offering a short cut/automation if you'd like it. Say no, and it would never ask you again. But anyway, this is getting quite off to

test please ignore

2009-02-22 Thread Matt Anderson
Sorry if this actually gets through -- I don't think it will. Please ignore. I sent my first message to cocoa-dev 2 weeks ago, and it was never (to my knowledge) posted. Contacting the admins has garnered no response thusfar. Just testing again. ___

Re: Name to PSN

2009-02-22 Thread Jerry Krinock
On 2009 Feb 22, at 15:36, Michael Ash wrote: An agent is (I think!) a daemon that gets linked to a user's login session and is automatically started and stopped by launchd. Until a few weeks ago, I thought that I was stupid for not being able to state in my own words the "differences" "bet

Re: immutable collection given to mutating function error

2009-02-22 Thread Charles Srstka
Replace this line: On Feb 22, 2009, at 11:17 AM, Michael Domino wrote: prefMinorSectionCFMutableDictionaryRef = static_cast(const_cast(pVoid)); with this: prefMinorSectionCFMutableDictionaryRef = CFDictionaryCreateMutableCopy(NULL, 0, static_cast(const_cast(pVoid))); This way, you'll

Re: Name to PSN

2009-02-22 Thread Michael Ash
On Sun, Feb 22, 2009 at 5:00 PM, Pierce Freeman wrote: > Very true, very true. Is the dock considered an agent (or daemon) anyway? > It is on the screen, but I don't think I'd classify it as an application. > It's kind of confusing. @_@ No, the Dock is an LSUIElement application. The LSUIElement

Re: Surprising entanglement of UI lock during fetch request in background thread (NSViewHierarchyLock/MOC locking deadlock).

2009-02-22 Thread Michael Ash
On Sun, Feb 22, 2009 at 3:46 PM, Luke Evans wrote: > My discovery (and life is full of them, so nothing particularly unusual > here) is that the practicality of doing the locking appears to 'tip over' if > you have binding to your Core Data. I have my main thread, and one > background thread traw

Re: How to get the "white shadow" effect when drawing NSStrings?

2009-02-22 Thread Steve Christensen
It seems like the best solution would be to handle both the Leopard+ and pre-Leopard cases at runtime so any changes to HID over time are non-issues since you've limited the custom code to the pre-Leopard case. You might be able to get away with as little as adding a category to NSCell (typ

Re: Surprising entanglement of UI lock during fetch request in background thread (NSViewHierarchyLock/MOC locking deadlock).

2009-02-22 Thread Luke Evans
Thanks Ken. Yes, I'm intending to experiment with the multiple-context approach now. I had a few questions about this (posted earlier in the thread), but they're only really soliciting for thoughts on best practice using that technique - and nothing I wouldn't discover through experiment

Re: How to get the "white shadow" effect when drawing NSStrings?

2009-02-22 Thread Graham Cox
On 23/02/2009, at 9:38 AM, Ken Ferry wrote: Yes, I'm sure. :-) You won't get the subpixel font smoothing right, if nothing else. Are you saying that using a shadow attribute turns off or interferes with subpixel font smoothing? That seems a bit strange. --Graham __

Re: How to get the "white shadow" effect when drawing NSStrings?

2009-02-22 Thread Ken Ferry
Yes, I'm sure. :-) You won't get the subpixel font smoothing right, if nothing else. Also, the other method tracks whatever the current human interface design is for text on a raised surface. -Ken On Sun, Feb 22, 2009 at 2:16 PM, Graham Cox wrote: > > On 23/02/2009, at 4:43 AM, Ken Ferry wrote:

Re: How to get the "white shadow" effect when drawing NSStrings?

2009-02-22 Thread Graham Cox
On 23/02/2009, at 4:43 AM, Ken Ferry wrote: This effect cannot be implemented with text attributes. Are you sure? This gets awfully close, unless I'm missing the point here (the font to use your choice): + (NSDictionary*) defaultTitleAttributes { // return the dictionary used to s

Re: Name to PSN

2009-02-22 Thread Pierce Freeman
Very true, very true. Is the dock considered an agent (or daemon) anyway? It is on the screen, but I don't think I'd classify it as an application. It's kind of confusing. @_@ Pierce On 2/22/09 1:46 PM, "Kyle Sluder" wrote: > On Sun, Feb 22, 2009 at 3:37 PM, Pierce Freeman > wrote: >> As I s

Re: Programmatically opening an NSComboBox list

2009-02-22 Thread Kyle Sluder
On Sat, Feb 21, 2009 at 7:17 AM, Peter Hudson wrote: > I notice from the docs that the button and text field are encapsulated in an > NSComboBoxCell. Have checked the cell docs - can't see any means to get to > the button. Probably because there is no "button", per se. Unlike views, which exist

Re: Programmatically opening an NSComboBox list

2009-02-22 Thread Kyle Sluder
On Sat, Feb 21, 2009 at 11:11 AM, Paul Sanders wrote: > And indeed how do you programatically close it, which is what I would like > to do. The problem with programmatically closing the drop-down comes from the way that NSComboBoxCell might handle mouse tracking. If the cell runs the runloop its

Re: Surprising entanglement of UI lock during fetch request in background thread (NSViewHierarchyLock/MOC locking deadlock).

2009-02-22 Thread Ken Ferry
It sounds like you got the idea choosing to lock the context rather than using multiple contexts would be more efficient, though harder to write. That was not the intent of the warning. CoreData is designed with threading in mind, but not by sharing objects between threads. The caution is saying

Re: Name to PSN

2009-02-22 Thread Kyle Sluder
On Sun, Feb 22, 2009 at 3:37 PM, Pierce Freeman wrote: > As I said above, I'm just not sure. If it's an application an Apple Event > probably will work, but if it's a daemon (as you pointed out) it probably > won't. Don't forget that there are also "agents". See http://developer.apple.com/techn

Re: How to get strings like for all objects

2009-02-22 Thread Clark Cox
On Sun, Feb 22, 2009 at 6:22 AM, Paul Sanders wrote: > Try %p. Not sure if this works in 64 bit code. FYI: %p is part of the C Standard and is guaranteed to work regardless of the size of a pointer. -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-

Re: Surprising entanglement of UI lock during fetch request in background thread (NSViewHierarchyLock/MOC locking deadlock).

2009-02-22 Thread Luke Evans
Indeed. I certainly saw all the references you highlight, many times. I am not saying there aren't warnings, and true, "suckered" implies an act of inducement on the part of the documentation, which certainly is not there. However, "If you try to pass actual objects, share contexts betwe

Re: Name to PSN

2009-02-22 Thread Pierce Freeman
> Is there one specific application that you will be quitting? You can > look into its application bundle at its Info.plist file to get its > bundle ID. It's not a application per say, but a daemon. At least I think... It's rather confusing. You see, the dock is a daemon (I think) but there is

iPhone MPMoviePlayerController stops iPod

2009-02-22 Thread Sebastian Morsch
I tried to implement a short modal and full-screen animation with MPMoviePlayerController within my application. It is only meant as a nice transition between two different working modes of the app. Understandably, playing a movie with MPMoviePlayerController pauses music playback of the iP

Re: Creating Subclass in Core Data

2009-02-22 Thread Volker in Lists
Hi Paul, I recommend not use the add: / addChild: methods of the TreeController, but create yur own methods for that. In each instantiate an object of the entitytype you want as parent/child. See http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CoreData/Articles/cdCreateMOs.html#/ /

Creating Subclass in Core Data

2009-02-22 Thread Paul Franz
I have a simple class hierarchy defined in Model for the Core Data Entity: Class: AbstractClass (Abstract Class is checked as abstract Parent Class: None Attributes: Name Children Class: Class1 Parent Class: AbstractClass Attributes: None Class: Class2 Parent Class: AbstractClass Attribut

Re: Small animation inside NSCell (progress bar)

2009-02-22 Thread Andy Lee
On Feb 22, 2009, at 1:18 PM, malcom wrote: Hello, I'm working on a subclass of NSCell that draws a custom style progress bar. Everything works fine, it draws correctly and I've made the code to make indeterminate animation (the method should be called by a timer). So I've created a NSTimer in

Re: NSNotificationCenter : multiple messages sent tothe same observer?

2009-02-22 Thread Paul Sanders
I think the second call to addObserver should fail, perhaps even throw an exception. It's almost certainly a programming error. Just my $0.02 worth. But it's probably too late to change the behaviour now, if it might break somebody's app. - Original Message - From: "Iceberg-Dev" To:

Re: Unexpected mouse-handling behaviour

2009-02-22 Thread Andy Lee
I'm not sure there is a problem. If the clicked NodeView is receiving all the rightMouseDragged: messages, even when the mouse leaves the view, it would be consistent for it to receive the rightMouseUp: message as well. Note that at the time the user releases the mouse, it might not be ov

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Bill Bumgarner
On Feb 22, 2009, at 10:23 AM, Iceberg-Dev wrote: If the notification center coalesced observers on registration, the above would mean that the notification would no longer be sent. If anObject is the same object in the 3 calls, this is probably already the case if I am to believe the documen

Re: immutable collection given to mutating function error

2009-02-22 Thread Ken Thomases
On Feb 22, 2009, at 11:17 AM, Michael Domino wrote: I have a situation where I'm writing a preferences file and I have a major section and one or more minor sections, like this: Settings Logging Initialization Everything actually works fine, except that I get this error when

Obtaining Display EDID (DDC) Information From User Level App

2009-02-22 Thread Tobias Zimmerman
Apologies if this is the wrong forum ‹ I am not entirely sure what category this question properly falls under. If someone suggests a better list, I will move the question there. I want to obtain the name of a display (monitor) by manufacturer and brand. Most (not all) displays report this using

Re: Question on threads running in my Foundation tool

2009-02-22 Thread Ken Thomases
On Feb 22, 2009, at 11:35 AM, Charles E. Heizer wrote: I reworked my test app so that I could isolate the threads and to see what's going on a little better, and I'm now using a NSTimer and a NSRunLoop. The issue I'm seeing is that for every time I call NSThread so not to block the run loop

Re: Programmatically opening an NSComboBox list

2009-02-22 Thread Andy Lee
On Feb 21, 2009, at 11:11 AM, Paul Sanders wrote: And a question: is there a utility, similar to Spy++ under windows, Which can show you the window and view hierarchy of a running app? I find Spy++ extremely useful on occasion when doing Windows development. I think F-Script can do that.

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Iceberg-Dev
On Feb 22, 2009, at 7:06 PM, Bill Bumgarner wrote: On Feb 22, 2009, at 9:59 AM, Iceberg-Dev wrote: [...] The current behavior makes it possible to implement architectures where a client could take "more action" for any given notification by registering more than once. Not supporting this

Re: How to get strings like for all objects

2009-02-22 Thread Ken Thomases
On Feb 22, 2009, at 9:02 AM, Jean-Daniel Dupas wrote: Le 22 févr. 09 à 15:14, Ken Tozier a écrit : Hi I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like th

Small animation inside NSCell (progress bar)

2009-02-22 Thread malcom
Hello, I'm working on a subclass of NSCell that draws a custom style progress bar. Everything works fine, it draws correctly and I've made the code to make indeterminate animation (the method should be called by a timer). So I've created a NSTimer in my NSCell subclass, but when I try to run the pr

immutable collection given to mutating function error

2009-02-22 Thread Michael Domino
Hi all, I have a situation where I'm writing a preferences file and I have a major section and one or more minor sections, like this: Settings Logging Initialization Everything actually works fine, except that I get this error when writing a minor section: 2009-02-22 10:1

Using a flip transition to a different view

2009-02-22 Thread David Hatch
Hi, I'm writing an app that has a view that displays subviews to show information to the user. I would like the user to click a button and have the clicked sub view transition to a different view where the user can edit the information. I want to use the transition that is used with dash

Re: How to get strings like for all objects

2009-02-22 Thread Paul Sanders
Try %p. Not sure if this works in 64 bit code. - Original Message - From: "Ken Tozier" To: "Cocoa-Dev (Apple)" Sent: Sunday, February 22, 2009 2:14 PM Subject: How to get strings like for all objects Hi I need to get unique identifiers for all objects I'm passed for use as keys i

Unexpected mouse-handling behaviour

2009-02-22 Thread Manuel Meyer
Hey, I just started to learn obj-c/Cocoa. As my first application I am writing a networkgraph-editor. Each node got it own view. To connect to nodes, I thought of using rightMouseDown, rightMouseDragged and rightMouseUp. So the NodeView, where a rightMouseDown event is triggered will be the

Core Data: Multiple entities in same Table View

2009-02-22 Thread Desmond
Consider two entities 1) Customer having attributes: Name Id Relationship: address (Has one of more Addresses) 2) Address having attributes: Street City Zip Relationship: customer (Belongs to one or more customer) Now I would like to have a single Table View to where I can add/ edit the custome

Re: Programmatically opening an NSComboBox list

2009-02-22 Thread Paul Sanders
And indeed how do you programatically close it, which is what I would like to do. To open it, I'm guessing you might work out where the button is and post a mousedown / mouse up event pair with those coordinates. A little clunky perhaps but it sounds like it ought to work. Alternatively, send

Re: Name to PSN

2009-02-22 Thread Ken Thomases
On Feb 21, 2009, at 10:21 PM, Pierce Freeman wrote: Is there some panel in Activity Monitor that I'm missing that shows you the Bundle ID of all the processes? I am not quitting my own application (as you may have guessed) but I do need some way to find it for another application. Is ther

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Bill Bumgarner
On Feb 22, 2009, at 9:59 AM, Iceberg-Dev wrote: Thanks for the pointer. It would be nice to have this explanation available in the description of the addObserver:selector:name:object: as it might be where one could expect to find it. I filed an enhancement suggestion. But then it would hav

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Iceberg-Dev
On Feb 22, 2009, at 6:39 PM, Bill Bumgarner wrote: On Feb 22, 2009, at 8:59 AM, Iceberg-Dev wrote: On Feb 22, 2009, at 1:37 AM, Michael Ash wrote: On Sat, Feb 21, 2009 at 6:06 PM, Iceberg-Dev wrote: I just discovered something recently. If you register an observer with the same name/objec

Re: How to get the "white shadow" effect when drawing NSStrings?

2009-02-22 Thread Ken Ferry
2009/2/21 Ulai Beekam > > Is there no way to do it without a cell? I ask because I'm writing my own > custom view and need to be able to do this with NSString's drawInRect, using > a correct font attribute. The other poster's suggestion of just using a > white text and shifting by 1.0 does not gi

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Bill Bumgarner
On Feb 22, 2009, at 8:59 AM, Iceberg-Dev wrote: On Feb 22, 2009, at 1:37 AM, Michael Ash wrote: On Sat, Feb 21, 2009 at 6:06 PM, Iceberg-Dev wrote: I just discovered something recently. If you register an observer with the same name/object/selector twice, you get the notification twice whe

RE: Question on threads running in my Foundation tool

2009-02-22 Thread Charles E. Heizer
OK, I reworked my test app so that I could isolate the threads and to see what's going on a little better, and I'm now using a NSTimer and a NSRunLoop. The issue I'm seeing is that for every time I call NSThread so not to block the run loop it runs it's course but when it completes it leaves a h

Re: How to get strings like for all objects

2009-02-22 Thread Bill Bumgarner
On Feb 22, 2009, at 6:14 AM, Ken Tozier wrote: I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like the console printout for classes with no "description" metho

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Iceberg-Dev
On Feb 22, 2009, at 1:37 AM, Michael Ash wrote: On Sat, Feb 21, 2009 at 6:06 PM, Iceberg-Dev wrote: I just discovered something recently. If you register an observer with the same name/object/selector twice, you get the notification twice when you post it. Isn't the NSNotificationCenter

Re: How to get strings like for all objects

2009-02-22 Thread Jean-Daniel Dupas
Le 22 févr. 09 à 15:14, Ken Tozier a écrit : Hi I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like the console printout for classes with no "description"

Re: How to get strings like for all objects

2009-02-22 Thread Ken Tozier
%p did the trick, thanks! On Feb 22, 2009, at 9:23 AM, Andrew Farmer wrote: @"%p" will give a string representation of the address. However, if you're targeting 10.5 or later, you should probably consider NSMapTable instead - it implements this functionality for you without the overhead

Re: How to get strings like for all objects

2009-02-22 Thread Andrew Farmer
On 22 Feb 09, at 06:14, Ken Tozier wrote: I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It isn't. The only requirement for -[NSObject hash] is that two objects which

How to get strings like for all objects

2009-02-22 Thread Ken Tozier
Hi I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like the console printout for classes with no "description" method would be perfect. I know how to get the

Re: Application Activation

2009-02-22 Thread Jean-Daniel Dupas
Le 22 févr. 09 à 11:56, Gerriet M. Denkmann a écrit : There are two ways an app can become active: 1. by explicit user action (clicking in Finder, clicking in Dock, using Command-Tab) or: 2. without user action (frontmost app is closed or hidden, so the next app becomes active). I would

Re: Surprising entanglement of UI lock during fetch request in background thread (NSViewHierarchyLock/MOC locking deadlock).

2009-02-22 Thread Michael Ash
On Sat, Feb 21, 2009 at 9:34 PM, Ken Ferry wrote: > > > On Sat, Feb 21, 2009 at 4:25 PM, Michael Ash wrote: >> >> On Fri, Feb 20, 2009 at 6:25 PM, Luke Evans wrote: >> > The more I'm getting to know Cocoa (we're still not intimate), the more >> > it >> > seems that regular apps with UI making us

Re: protocol vs. subclassing NSView

2009-02-22 Thread Michael Ash
On Sat, Feb 21, 2009 at 8:48 PM, Development Staff wrote: > So I've got this app that uses various NSView subclasses (NSTextView, > NSImageView, QTMovieView, etc.) to display different kinds of data in a > window. The problem is that, when I need to select which kind of view to use > for the curre

Re: Application Activation

2009-02-22 Thread Benjamin Dobson
On 22 Feb 2009, at 10:56:45, Gerriet M. Denkmann wrote: There are two ways an app can become active: 1. by explicit user action (clicking in Finder, clicking in Dock, using Command-Tab) or: 2. without user action (frontmost app is closed or hidden, so the next app becomes active). Comman

Re: NSOutlineView : Incorrect Drag and Drop drawing?

2009-02-22 Thread Graham Cox
On 22/02/2009, at 10:08 AM, Iceberg-Dev wrote: I have a NSOutlineView and its highlight mode is "SourceList". When I drag a selected item (the cell is a subclass of NSTextField from the DargAndDropOutlineView sample code) from the list, its text is drawn in white. This means you can't see

Re: SSH Tunnel

2009-02-22 Thread Phil
On Sat, Feb 21, 2009 at 7:23 PM, Seth Willits wrote: > Does anyone have any experience with this? Am I barking up the wrong tree > trying to use the command line app to do it? Perhaps I should be using a > yet-to-be-discovered library instead. > There are a number of SSH libraries that may meet y

Application Activation

2009-02-22 Thread Gerriet M. Denkmann
There are two ways an app can become active: 1. by explicit user action (clicking in Finder, clicking in Dock, using Command-Tab) or: 2. without user action (frontmost app is closed or hidden, so the next app becomes active). I would like to perform some action (like displaying an NSOpenPan

Re: SSH Tunnel

2009-02-22 Thread Daniel DeCovnick
I wrote an app for exactly this purpose (ended up being able to configure any of ssh's options). I ended up just writing a .command file to the application support folder, and then launching either Terminal or X11, depending on whether X11 forwarding was needed or not. I let the user handle

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Frédéric Testuz
Le 22 févr. 09 à 10:52, Frédéric Testuz a écrit : Le 22 févr. 09 à 00:06, Iceberg-Dev a écrit : I just discovered something recently. If you register an observer with the same name/object/selector twice, you get the notification twice when you post it. Isn't the NSNotificationCenter supp

Re: NSNotificationCenter : multiple messages sent to the same observer?

2009-02-22 Thread Frédéric Testuz
Le 22 févr. 09 à 00:06, Iceberg-Dev a écrit : I just discovered something recently. If you register an observer with the same name/object/selector twice, you get the notification twice when you post it. Isn't the NSNotificationCenter supposed to prevent this? Notifications post via a NSNo