Re: Semi-document architecture

2009-09-03 Thread Kyle Sluder
--Kyle Sluder On Sep 3, 2009, at 11:10 PM, Rob Keniger wrote: What I would like is for the app to have a central "document management" window, from which you could create/delete "documents". Although these are logically documents, I don't want the user to be able to be saved the file an

Semi-document architecture

2009-09-03 Thread Rob Keniger
I have an app in development that is currently implemented as a document-based app, but I'm starting to think it makes little sense for it to be so. What I would like is for the app to have a central "document management" window, from which you could create/delete "documents". Although th

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-03 Thread Scott Anguish
On Sep 4, 2009, at 1:34 AM, John C. Randolph wrote: I'd completely forgotten about that presentation. Thanks for the link to the slides. I'll have to dig up my 2003 WWDC disks and watch it. That's not going to help you. It was at the O'Reilly OS X Conference. __

Re: Input Managers in Snow Leopard

2009-09-03 Thread Kyle Sluder
On Sep 3, 2009, at 10:29 PM, Kevin Ballard wrote: Input Managers are gone in 64-bit apps. You have 2 viable solutions: Please don't inject your code into other processes. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Input Managers in Snow Leopard

2009-09-03 Thread Andy Lee
On Sep 4, 2009, at 12:54 AM, Gerriet M. Denkmann wrote: I heard some rumors that Input Managers do no longer work on Snow Leopard. So I asked Xcode 3.2 for "Input Managers" and got lots of documents which contain the words "input" and "manager" but found no information about "Input Manager

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-03 Thread John C. Randolph
I'd completely forgotten about that presentation. Thanks for the link to the slides. I'll have to dig up my 2003 WWDC disks and watch it. -jcr “The two most important tools an architect has are the eraser in the drawing room and the sledge hammer on the construction site. ” -Frank Lloyd

Re: Input Managers in Snow Leopard

2009-09-03 Thread Kyle Sluder
On Sep 3, 2009, at 9:54 PM, "Gerriet M. Denkmann" wrote: What I am trying to accomplish: I would like to modifiy apps (e.g. TextEdit) to put miniaturized windows NOT into the dock, but on the bottom of the screen (the way it was done in NeXTstep). You might look into GNUStep and WindowMa

Re: Input Managers in Snow Leopard

2009-09-03 Thread Kevin Ballard
Input Managers are gone in 64-bit apps. You have 2 viable solutions: 1) Use mach_inject. 2) Use the hole that 1Password 3.0 beta uses, which turns out to be Scripting Additions. You can see my analysis of this technique at < http://kevin.sb.org/2009/09/02/1password-extension-loading-in-snow-leopar

NSMetadataQuery for Documentation in Snow Leopard

2009-09-03 Thread Gerriet M. Denkmann
I have an app which uses NSMetadataQuery to get information. NSString * searchString = @"NSDate"; NSString *predicateFormatContent = @"kMDItemTextContent like %@"; NSPredicate *predicate = [ NSPredicate predicateWithFormat: predicateFormat, searchString ]; [ query setPredicate: predicate]; NS

Input Managers in Snow Leopard

2009-09-03 Thread Gerriet M. Denkmann
I heard some rumors that Input Managers do no longer work on Snow Leopard. So I asked Xcode 3.2 for "Input Managers" and got lots of documents which contain the words "input" and "manager" but found no information about "Input Managers". If this rumor is indeed true: what is a recommended

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-03 Thread Scott Anguish
While I'm honored by the loyalty, you really do get most of the functionality from Finder now. Zip, tar, tgz, tar.gz are all handled with Finder, and better than OpenUp ever did. the source the tools that OpenUp depended on is spread far and wide. I never could find it all again, and most

Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 20:37, Michael de Haan wrote: Now the part that does not work. changeViewDelta as follows: -(IBAction) changeViewDelta: (id) sender { NSRect newBounds; newBounds.origin.x = newBounds.origin.x + 50.0; newBounds.origin.y = newBounds.origin.y + 50.0;

setNeedsDisplayInRect not triggering drawRect?

2009-09-03 Thread Michael de Haan
I ask with some trepidation, as I am not sure I have done all the research I can, but I seem to have reached a dead end. I am simply playing with Hillegass' chapter on Drawing with NSBezierPath, setting up an NSView with an initial color, then trying to change a part of that view to a diff

Re: Finding Out When my NSSplitView has Moved

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 6:27 PM, Peter Zegelin wrote: I need to find out when my split view has moved so I can configure some buttons to reflect the change but I am finding it difficult to get that info. The splitview is a subclass of BWToolkit/BWSplitView. Just observe either of the subviews a

Re: NSImage into a QTMovie Object

2009-09-03 Thread Development
I should have been clear about my question. Sorry about that. The problem I am having is that when the resulting movie is saved it has a duration of 0 and not even the first frame shows. So basically although my print out actually said things were being added it says they are added as track

Re: Has the behavior of NSUserDefaults changed in Snow Leopard?

2009-09-03 Thread Gideon King
It appears that this strange behavior must have been a side effect of another bug in my code, which was affecting the xml parser. Sorry for the erroneous post. G. On 04/09/2009, at 11:37 AM, Gideon King wrote: Hi, I have some code that was working fine in 10.5 and earlier, but doesn't work

Massive slowdown in NSArrayController selections in 10.6

2009-09-03 Thread Rob Keniger
I'm interested to know if anyone else has been bitten by what seems to be a fairly serious performance regression bug in 10.6 with NSArrayController/NSTreeController. Basically, if you have an NSArrayController with more than a few bindings, changing selection in the controller takes at lea

Re: Static Library

2009-09-03 Thread Kyle Sluder
On Thu, Sep 3, 2009 at 6:45 PM, David Blanton wrote: > Ok, not a Cocoa question but I know one of the smart guys here will like to > guide me off list. If it's not on-topic, don't ask it. > Is a static library properly designed if it requires headers from another > static library? This question

NSImage into a QTMovie Object

2009-09-03 Thread Development
I'm newish to the QTKit. I'm trying to init a movie object then place frames in individually. Each frame is an NSImage. Here is the code I'm using: qtMovieObject = [QTMovie movie]; //this is defined with the app starts up Then for each frame: NSImage * screenImage = [[NSImage alloc]initW

Re: restoring NSSplitView divider's position

2009-09-03 Thread Jim Correia
On Sep 3, 2009, at 6:00 PM, kvic...@pobox.com wrote: ps. i do see the method for setting the divider's position... i just don't see how to get the current position for saving. The divider’s current position can be computed by looking at the frames of the subviews (account for both orientati

Static Library

2009-09-03 Thread David Blanton
Ok, not a Cocoa question but I know one of the smart guys here will like to guide me off list. Question: Is a static library properly designed if it requires headers from another static library? I think not. ___ Cocoa-dev mailing list (Cocoa-de

Has the behavior of NSUserDefaults changed in Snow Leopard?

2009-09-03 Thread Gideon King
Hi, I have some code that was working fine in 10.5 and earlier, but doesn't work now, and I can't see anything in the release notes about it. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *nsstr1 = [defaults stringForKey:@"NMCenterFont"]; N

Finding Out When my NSSplitView has Moved

2009-09-03 Thread Peter Zegelin
I need to find out when my split view has moved so I can configure some buttons to reflect the change but I am finding it difficult to get that info. The splitview is a subclass of BWToolkit/BWSplitView. I have tried getting the notification NSSplitViewDidResizeSubviewsNotification but that

Re: [Workaround] Re: My NSUndoManager subclass is broken on SL - how to fix?

2009-09-03 Thread Graham Cox
On 04/09/2009, at 5:44 AM, Jayson Adams wrote: I am interested - sorry I didn't see your original message. I too apparently have an NSUndoManager that no longer operates correctly as of 10.6. What is completely ridiculous is that this framework change affects my 10.4-compiled app. So mu

Re: hud panel possible bug?

2009-09-03 Thread Rick C.
sure thing corbin thanks! rick From: Corbin Dunn To: Rick C. Cc: cocoa dev Sent: Thursday, September 3, 2009 10:14:28 PM Subject: Re: hud panel possible bug? Hi Rick, On Sep 3, 2009, at 5:49 AM, Rick C. wrote: > hello again, > > i have noticed in snow l

Binding table columns that change at runtime

2009-09-03 Thread BareFeet
Hi all, I'm fairly comfortable with setting up bindings for table columns to an NSArrayController. Now I'd like to use bindings where the columns change at runtime. Is this possible? I am avoiding using CoreData (so I can run on Mac OS X 10.3 ish and upwards). Any help appreciated. Thank

Re: Crash in CFRunLoopWakeUp

2009-09-03 Thread Greg Parker
On Sep 3, 2009, at 3:41 PM, Mark Allan wrote: I've been battling with this intermittent crash for about two weeks now and can't figure it out for the life of me. I've got try/catch blocks around nearly all my code, and definitely around any code which runs in a separate thread, but it's not

Re: change in launch services binding behavior?

2009-09-03 Thread Gregory Weston
Matt Neuburg wrote: I wonder whether someone (preferably from Apple) could provide details on how Snow Leopard has changed its algorithm for how a document is bound to an application, esp. when double-clicking the doc in the Finder. I've done a little bit of experimenting on that a couple

Re: NSBundle from an URL.

2009-09-03 Thread Ken Thomases
On Sep 3, 2009, at 5:36 PM, Erik Österlund wrote: I just wanted to check out NSBundle's + bundleFromURL. I looked in the documentation and said nothing about only some protocols working, so I thought I could load a bundle via HTTP which would be awesome, but that seemed to fail. Is this a b

Re: NSBundle from an URL.

2009-09-03 Thread Randall Meadows
On Sep 3, 2009, at 4:36 PM, Erik Österlund wrote: 2009-09-04 00:33:52.657 TestClient[90551:a0f] An uncaught exception was raised 2009-09-04 00:33:52.659 TestClient[90551:a0f] *** -[NSBundle initWithURL:]: non-file URL argument 2009-09-04 00:33:52.663 TestClient[90551:a0f] *** Terminating app

Crash in CFRunLoopWakeUp

2009-09-03 Thread Mark Allan
Hi all, I've been battling with this intermittent crash for about two weeks now and can't figure it out for the life of me. I've got try/catch blocks around nearly all my code, and definitely around any code which runs in a separate thread, but it's not catching whatever causes this cras

Re: NSBundle from an URL.

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 3:36 PM, Erik Österlund wrote: I just wanted to check out NSBundle's + bundleFromURL. I looked in the documentation and said nothing about only some protocols working, so I thought I could load a bundle via HTTP which would be awesome, but that seemed to fail. Is this a

NSBundle from an URL.

2009-09-03 Thread Erik Österlund
Hello. I just wanted to check out NSBundle's + bundleFromURL. I looked in the documentation and said nothing about only some protocols working, so I thought I could load a bundle via HTTP which would be awesome, but that seemed to fail. Is this a bug, or am I being stupid? Here is my code

Default authorization dialog text in Snow Leopard misleading

2009-09-03 Thread Kevin Wojniak
In Snow Leopard, the default dialog text is now "Type your password to allow MyApp to make changes." In Leopard it was "MyApp.app requires that you type your password." The SL version is slightly misleading, at least from a user's perspective. In our app we aren't making any direct changes,

restoring NSSplitView divider's position

2009-09-03 Thread kvic...@pobox.com
i have a multi-document, multi-window app and i'm getting ready to use NSSplitView for the first time. from reading the docs and searching at cocoadev, i don't see how to get the current position of the divider so that i can save it, and later restore it on subsequent launches of my app/docume

Re: Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Kyle Sluder
The header file describes the correct behavior. rdar://problem/7196143 It has been stated that the header files are as valid sources of documentation as the docset. The current behavior is the only one that makes sense. --Kyle Sluder ___ Cocoa-dev ma

Re: Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Charles Srstka
On Sep 3, 2009, at 4:36 PM, Kyle Sluder wrote: Get out of my OmniFocus inbox! I noticed this the other day and was about to file a Radar on it today. You should do the same. --Kyle Sluder I filed one a while ago, although it was on the lack of a documented method to get the attributes of

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Kyle Sluder
On Thu, Sep 3, 2009 at 12:47 PM, David Duncan wrote: > The kernel you are booted into has no effect on the binaries that will > launch. However, your project settings will determine what build is > launched, and older projects will often have i386 as default (a newly > created project shows that x8

Re: Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Kyle Sluder
Get out of my OmniFocus inbox! I noticed this the other day and was about to file a Radar on it today. You should do the same. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

Re: NSUserDefaults

2009-09-03 Thread Steven Riggs
That's how I do it. I also use setValue:forKey: when passing NSLocalizedString() -Steve On Sep 3, 2009, at 5:05 PM, Oftenwrong Soong wrote: Hi all, Why does NSUserDefaults provide method stringForKey but not a method setString:forKey (akin to setBool:forKey, setFloat:forKey, etc.)? Thi

Re: a bug in iphone SDK's creation of view based xib files.

2009-09-03 Thread Joey Hagedorn
On Sep 3, 2009, at 5:21 AM, jon wrote: Thanks for reporting a bug, this is the best way to get problems fixed. the springs and struts are disabled on views with simulated user interface attributes, so this is expected...In this case, it sounds like you expect the view provided in the

Re: NSUserDefaults

2009-09-03 Thread Andy Lee
On Sep 3, 2009, at 5:05 PM, Oftenwrong Soong wrote: Why does NSUserDefaults provide method stringForKey but not a method setString:forKey (akin to setBool:forKey, setFloat:forKey, etc.)? This does not seem symmetric. I'm using setObject:forKey when saving a NSString to the defaults databas

Re: NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread jeffs87
That worked... if (([[NSApp currentEvent] type] == NSKeyDown) && ([[NSApp currentEvent] keyCode] == 0x1b)) { } thanks Jeff >Maybe look at [NSApp currentEvent]? > >(This comes to mind because it was suggested in answer to >another question.) > >-Andy

Re: NSUserDefaults

2009-09-03 Thread Steven Degutis
As NSString, NSData, NSDictionary, etc are derived from NSObject, they can be easily set with -setObject:forKey:, whereas int, float, NSInteger, etc are scalar types and thus cannot be set with this method. Thus, they have convenient setters/getters, whereas object types have convenient getters onl

NSUserDefaults

2009-09-03 Thread Oftenwrong Soong
Hi all, Why does NSUserDefaults provide method stringForKey but not a method setString:forKey (akin to setBool:forKey, setFloat:forKey, etc.)? This does not seem symmetric. I'm using setObject:forKey when saving a NSString to the defaults database. Is this correct? Thanks, Soong ___

Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Charles Srstka
Okay, the documentation for -[NSFileManager attributesOfItemAtPath:error:] states the following: In Mac OS X v 10.6 and earlier, if the last component of the path is a symbolic link (the value of the NSFileType key in the attributes dictionary isNSFileTypeSymbolicLink), it will be traversed

Re: Handling NSApplicationDefined events

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 13:39, McLaughlin, Michael P. wrote: The one example I found like that passed the event on even though it had been handled. Is @interface MyApplication : NSApplication { } @implementation MyApplication -(void)sendEvent:(NSEvent *)evt { if ([evt type] == NSApplicationDe

Re: watch changes to any properties on an object

2009-09-03 Thread Ben Trumbull
On Sep 3, 2009, at 12:14, Alexander Cohen wrote: Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or something like that where i can parse the key and update my

Re: Handling NSApplicationDefined events

2009-09-03 Thread McLaughlin, Michael P.
Quincey Morris wrote: >It's straightforward. Subclass NSApplication and override sendEvent: >to test for NSApplicationDefined. > >Don't forget to specify your subclass as the "Principal Class" in your >target's properties. The one example I found like that passed the event on even though it had b

Re: NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread Andy Lee
On Sep 3, 2009, at 4:03 PM, jeff...@aol.com wrote: I added an NSControlTextDidChangeNotification for a text field and I was wondering if there is a way to see what key was pressed when the selector is called? Maybe look at [NSApp currentEvent]? (This comes to mind because it was suggested i

Re: NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 1:03 PM, jeff...@aol.com wrote: I added an NSControlTextDidChangeNotification for a text field and I was wondering if there is a way to see what key was pressed when the selector is called? Nope — this notification is higher level and happens after any user- driven chan

RE: NSServices

2009-09-03 Thread Colin Deasy
Hey Peter, Thanks for the response. Ya I had gone through all that process, and my app was showing up in the output. When I debugged it against textedit it said that it was disabled! I've got it working now, it was caused by 1 of the following: - Duplicate applications ( e.g both a debug and rel

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Greg Parker
On Sep 3, 2009, at 11:47 AM, Jens Alfke wrote: On Sep 3, 2009, at 11:40 AM, Scott Andrew wrote: I could have sworn in either the apple docs (or one of the cocoa books, maybe this board). I maybe thinking of the general rule that you don't own the object until you retain it and its only valid

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
On Sep 3, 2009, at 3:44 PM, Quincey Morris wrote: On Sep 3, 2009, at 12:14, Alexander Cohen wrote: Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or

NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread jeffs87
Hi, I added an NSControlTextDidChangeNotification for a text field and I was wondering if there is a way to see what key was pressed when the selector is called? thanks Jeff ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not pos

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Overriding willChangeValueForKey: was one of the first things i tried before posting and I noticed it was not being called, i thought it was weird but nothing more. Good to know that overriding it was deprecated. Thx for the info on how CoreData manages it's saves. I was hoping to not have

Re: Core Data dog-slow when using first time after boot

2009-09-03 Thread Ben Trumbull
On Sep 3, 2009, at 4:49 AM, Ruotger Skupin wrote: Since it's not a many to many, you can perform the prefetching effectively by hand using a fetch request to preload the relevant destination rows with an IN query based on the data you initially fetched for the source entity. You shouldn't

Re: watch changes to any properties on an object

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 12:44, Quincey Morris wrote: (call them "dynamic" if you want, but that's the same as their being compiled as "@dynamic") I meant, "... that's *not* the same as ...", of course. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Ken Ferry
Well, please file a bug with a test case that shows the behavior change. I still think there's something else going on. -Ken Cocoa Frameworks NSImage owner On Thu, Sep 3, 2009 at 11:53 AM, Robert Clair wrote: > Hi Ken - > > >> > This all worked fine until 10.6. The original NSImage object was

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread David Duncan
On Sep 3, 2009, at 12:35 PM, Scott Lahteine wrote: As it turns out Gestalt(gestaltUserVisibleMachineName) returns error -5551 in a 64 bit binary anyway. I wasn't seeing this because apparently my build architecture - "Standard Universal (32/64 bit)" - was/is for some reason launching the 32

Re: [Workaround] Re: My NSUndoManager subclass is broken on SL - how to fix?

2009-09-03 Thread Jayson Adams
On Sep 2, 2009, at 9:48 PM, Graham Cox wrote: For anyone interested (doesn't seem like anyone is, unfortunately) I have worked out a solution which can only be described as an inglorious hack. I have submitted a bug report requesting that NSUndoManager is made (optionally) backwards compat

Re: watch changes to any properties on an object

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 12:14, Alexander Cohen wrote: Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or something like that where i can parse the key and up

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Scott Lahteine
On Sep 3, 2009, at 3:14 PM, Clark Cox wrote: At this point, as far as I can tell Gestalt() is still a viable solution, and the returned pointer is just guaranteed to be in the low 4GB of RAM. Not possible. On 64-bit Intel (at least with the default settings), there is no such thing as a vali

Re: NSServices

2009-09-03 Thread Peter Ammon
Hi Colin, Adding the NSRequiredContext is the right way to make it appear by default. Note that after adding it, you will have to run /System/Library/ CoreServices/pbs (or log out and back in) to make the Service appear. If you are unsure if the system is recognizing the context, run pbs

Re: watch changes to any properties on an object

2009-09-03 Thread Ben Trumbull
Well, @dynamic doesn't have anything to do with KVO. It's just storage and accessors for properties. Core Data knows when non- dynamic modeled properties change too. It sets a dirty flag, just as you would have to. Most of that happens in -willChangeValueForKey:. Unfortunately, overridi

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or something like that where i can parse the key and update my internal data and set the flags i need to

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Clark Cox
On Thu, Sep 3, 2009 at 10:56 AM, Scott Lahteine wrote: >> On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: >>> >>> My preference pane uses Gestalt(gestaltUserVisibleMachineName, >>> &mySInt32), coercing the SInt32 into a StringPtr to get the Machine >>> Name. On 64-bit I get a warning because Stri

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Robert Clair
Hi Ken - > This all worked fine until 10.6. The original NSImage object was left unmolested. Nope. :-) Clearly you're seeing behavior change somewhere, but this attribution is not correct. -[NSImage lockFocus] is a commonly misunderstood method. It is and always has been lossy. No

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Douglas Davidson
Try taking a look at the current event. Douglas Davidson On Sep 3, 2009, at 11:18 AM, Rick Mann wrote: I would like to use the delegate, but it sends me insertNewLine: for both keys. Is there another method I can implement? On Sep 3, 2009, at 11:14:20, Douglas Davidson wrote: Short answ

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 11:40 AM, Scott Andrew wrote: I could have sworn in either the apple docs (or one of the cocoa books, maybe this board). I maybe thinking of the general rule that you don't own the object until you retain it and its only valid or the within the method that its recieved.

Re: watch changes to any properties on an object

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 11:32 AM, Alexander Cohen wrote: Ok, thats what i thought. But just for implementation ideas, how does CoreData know when one of it's @dynamic properties is changed? It must set some sort of flag somewhere in order to know what to write out when it needs to save. How doe

Re: NSImage with multiple representation sizes

2009-09-03 Thread Ken Ferry
Hi Benjamin, I think there's some confusion here between size and pixel size. The "size" of an image is the default size of the rect in which it's drawn when the person drawing it doesn't have any more specific information. That's a concept that there can only be one of for the entire image, so i

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Scott Andrew
I could have sworn in either the apple docs (or one of the cocoa books, maybe this board). I maybe thinking of the general rule that you don't own the object until you retain it and its only valid or the within the method that its recieved. My bad. Scott On Sep 3, 2009, at 11:29 AM, mmalc

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Ok, thats what i thought. But just for implementation ideas, how does CoreData know when one of it's @dynamic properties is changed? It must set some sort of flag somewhere in order to know what to write out when it needs to save. How does it handle that? thx AC On Sep 3, 2009, at 12:27 P

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread mmalc Crawford
On Sep 3, 2009, at 7:56 AM, Scott Andrew wrote: As Cocoa documentation states all items returned from a message are autoreleased unless otherwise stated in the documentation for the API call. The documentation emphatically does not state that. The basic rules are given here:

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Rick Mann
I would like to use the delegate, but it sends me insertNewLine: for both keys. Is there another method I can implement? On Sep 3, 2009, at 11:14:20, Douglas Davidson wrote: Short answer: no. Stay away from keyDown: and look at delegate methods instead. I have a standard rant on this topic

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Douglas Davidson
Short answer: no. Stay away from keyDown: and look at delegate methods instead. I have a standard rant on this topic; I don't have it handy but it should be in the list archives. Douglas Davidson On Sep 3, 2009, at 10:54 AM, Rick Mann wrote: Hi. I'd like to insert a new line when the us

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread David Duncan
On Sep 3, 2009, at 10:56 AM, Scott Lahteine wrote: CSCopyMachineName() returns the name of the computer as set by the user in the Sharing preference pane, which is not the same thing as the gestaltUserVisibleMachineName. The "Machine Name" I want is the Apple-defined identifier for the type

NSImage with multiple representation sizes

2009-09-03 Thread Benjamin Rister
(Apologies if this ends up a duplicate…I sent the original over a week ago, and as far as I can see it's not in either Apple's or Cocoabuilder's archives, so I don't see any other explanation besides it just being eaten by something.) The core question: Is it still the best practice to have

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Scott Lahteine
On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: My preference pane uses Gestalt(gestaltUserVisibleMachineName, &mySInt32), coercing the SInt32 into a StringPtr to get the Machine Name. On 64-bit I get a warning because StringPtr is a 64-bit pointer on that architecture. Does Gestalt() ensure th

Distinguishing between return and enter in NSTextField

2009-09-03 Thread Rick Mann
Hi. I'd like to insert a new line when the user presses return in an NSTextField, but take completely custom action when they press Enter. Is the only way to do this to subclass NSTextField and override the NSResponder keyDown: method? TIA, Rick

Re: Handling NSApplicationDefined events

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 08:58, McLaughlin, Michael P. wrote: The relevant docs make it clear how to send an NSApplicationDefined NSEvent, e.g., to NSApp, but I cannot find anything, esp. no examples, about how to handle events of this type. I was assuming that it could be done in AppDelegate. P

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread David Duncan
This is essentially correct. Why bother to decrement the retain count when the object is going away after all... On Sep 3, 2009, at 7:29 AM, Graham Cox wrote: Relying on retain counts to tell you an object's state is not a good idea. What I'm guessing is that the code internally looks someth

Re: iPhone-detecting call event...

2009-09-03 Thread David Duncan
On Sep 2, 2009, at 10:20 AM, Farooq zaman wrote: Is it possible to detect phone-call event on iPhone? If yes, what are the available APIs? No, it is not. The only interaction possible with the Phone is to request it to dial a number via a URL. -- David Duncan Apple DTS Animation and Print

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Ken Ferry
Hi Bob, > This all worked fine until 10.6. The original NSImage object was left unmolested. Nope. :-) Clearly you're seeing behavior change somewhere, but this attribution is not correct. -[NSImage lockFocus] is a commonly misunderstood method. It is and always has been lossy. Lock/unlock focu

change in launch services binding behavior?

2009-09-03 Thread Matt Neuburg
I wonder whether someone (preferably from Apple) could provide details on how Snow Leopard has changed its algorithm for how a document is bound to an application, esp. when double-clicking the doc in the Finder. In the past, where many apps could claim a file type / extension, such as plain text

Re: Fonts that are always there

2009-09-03 Thread I. Savant
On Sep 3, 2009, at 12:26 PM, Jens Alfke wrote: No, you should fall back on the system as mentioned above. Always. Why? It's perfectly reasonable to look for, say, Tahoma but fall back to Helvetica, then use the system font as a last resor The term "fall back on" means exactly what you de

Re: watch changes to any properties on an object

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 8:24 AM, Alexander Cohen wrote: I have a base object that needs to know when any of it's properties or subclasses properties have changed and set a dirty flag on itself. Is there a way to do this? No, not in general. Key-value observing requires knowing the exact prope

Re: Fonts that are always there

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 6:07 AM, I. Savant wrote: (Of course, I should always have a second alternative.) No, you should fall back on the system as mentioned above. Always. Why? It's perfectly reasonable to look for, say, Tahoma but fall back to Helvetica, then use the system font as a last r

Re: Fonts that are always there

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 3:57 AM, Gabriel Zachmann wrote: Does anyone know which fonts are always there on every Mac OS X 10.5 system? (besides the base 14 fonts from Adobe) Apple has some Knowledge-Base articles listing the installed fonts, but I don't have a link handy. —Jens___

Handling NSApplicationDefined events

2009-09-03 Thread McLaughlin, Michael P.
The relevant docs make it clear how to send an NSApplicationDefined NSEvent, e.g., to NSApp, but I cannot find anything, esp. no examples, about how to handle events of this type. I was assuming that it could be done in AppDelegate. Perhaps not -- but I'd really like to see a description and one

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Kyle Sluder
Check the AppKit release notes. Sounds like one if the common mistake cases covered there. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Re: Trouble with NSButtonCell

2009-09-03 Thread Corbin Dunn
On Sep 3, 2009, at 7:58 AM, Scott Andrew wrote: I think you need to create a subclass of NSButton that uses your cell. Then use setAction and setDoubleAction. Creating a subclass of NSButton isn't necessary; the custom cell can be set in IB (Leopard+). Dave needs to subclass NSButtonCell

watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Hello, I have a base object that needs to know when any of it's properties or subclasses properties have changed and set a dirty flag on itself. Is there a way to do this? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

What about revamping OpenUp.app for Snow Leopard?

2009-09-03 Thread Giulio Cesare Solaroli
Hello, I may sound a little bit old fashioned, but I still much prefer Scott Anguish's (of Stepwise.com fame) OpenUp.app application (http://www.stepwise.com/Software/OpenUp/) instead of the MacOS X built in Archive Utility (the default application used to open zip, tar, etc...). OpenUp.app has b

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Greg Guerin
Horst Jäger wrote: NSDictionary *di = [[NSDictionary alloc] init]; NSArray *ar = [di allKeys]; di is an empty NSDictionary. Therefore, ar will always be an empty immutable NSArray. Consequently, it's possible to return a singleton empty NSArray that's never released. I'm not saying thi

Re: Trouble with NSButtonCell

2009-09-03 Thread Scott Andrew
I think you need to create a subclass of NSButton that uses your cell. Then use setAction and setDoubleAction. Scott On Sep 3, 2009, at 7:41 AM, Dave DeLong wrote: Unfortunately, "setDoubleAction:" is not a method on NSCell or any of its subclasses (except NSPathCell). Really all the BWTo

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Scott Andrew
"ar" is not a member of "d"i. allKeys creates an autoreleased NSArray with the keys values retained in indexes. "ar" is placed in the auto release pool when it is created in the allKeys call. When you call [autorelease release] the items are freed when you since the pool is released and fre

Re: Trouble with NSButtonCell

2009-09-03 Thread Dave DeLong
Unfortunately, "setDoubleAction:" is not a method on NSCell or any of its subclasses (except NSPathCell). Really all the BWToolkit is doing is skinning. As far as I can tell from browsing through the code, it's not actually changing functionality of the controls. Dave On Sep 3, 2009, at

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Graham Cox
On 04/09/2009, at 12:21 AM, Horst Jäger wrote: Any explanation? Relying on retain counts to tell you an object's state is not a good idea. What I'm guessing is that the code internally looks something along the lines of: - (void) release { if( retainCount == 1 ) [self deallo

  1   2   >