Re: NSDictionaryController and inserting new objects.

2008-04-01 Thread Kyle Sluder
On Tue, Apr 1, 2008 at 1:17 AM, Jiva DeVoe [EMAIL PROTECTED] wrote: Or do the NS*Controller classes provide some other cool features that would be difficult for my mere mortal development skills to implement? Well as far as your current use case is concerned, the only things you need to

Re: Network notifications

2008-04-01 Thread Hamish Allan
On Tue, Apr 1, 2008 at 5:03 AM, Jens Alfke [EMAIL PROTECTED] wrote: You want to set a TXT record for the service. I disagree. If the updates are frequent, this makes a lot of work for every other machine on the LAN to update their mDNSResponder caches. Randall mentioned that there's really

Getting Localized System Strings

2008-04-01 Thread Gerriet M. Denkmann
Cocoa uses (automatically) localized strings. I would like to do the same. E.g. using NSTextView and pasting a font, the Edit menu will suddenly show Undo Paste Font. If the same app is running with German as the preferred language, the Edit menu will contain Undo Schrift einsetzen (yes,

Re: test if another app has hung

2008-04-01 Thread Ben Dougall
On 1 Apr, 2008, at 11:49 am, Ron Fleckner wrote: On 01/04/2008, at 9:28 PM, Ben Dougall wrote: Hello, What's the best way to test if another app has likely hung or not? Programmatically of course. I want to be able to kill an often hanging app and restart it -- when it's hung that is.

Re: Getting Localized System Strings

2008-04-01 Thread Jean-Daniel Dupas
The strings you are looking for are in the AppKit ressources, but I don't think there are part of the API, the keys can change at anytime and you cannot rely on the files names. (in Leopard, the Undo.strings file contains a Paste Font key, but it's not garantee that it remain like that)

Re: test if another app has hung

2008-04-01 Thread Jean-Daniel Dupas
The Window Server considere that an App hangs when it does not process High Level events fast enought. What do you mean by hang ? Is it a daemon that process background request but stop to responds? Is it a graphical application that present a Spinning Wheel ? Is it a third party app that

Re: test if another app has hung

2008-04-01 Thread Ron Fleckner
On 01/04/2008, at 9:28 PM, Ben Dougall wrote: Hello, What's the best way to test if another app has likely hung or not? Programmatically of course. I want to be able to kill an often hanging app and restart it -- when it's hung that is. (10.3.9+) Thanks, Ben. Hi Ben, This question

Re: Exploring AppleScript APIs

2008-04-01 Thread Jean-Daniel Dupas
Drop the application icon on the Script Editor Application. (in / Applications/AppleScript/) It will open it's Scripting dictionary. Le 1 avr. 08 à 13:34, Torsten Curdt a écrit : Hey, There is a Cocoa application X that is Apple-scriptable. Is there any way to find out what functions are

Best Way to Replicate CURL in Cocoa?

2008-04-01 Thread Brad Gibbs
Hi, I'm trying to communicate with a Linux-based device that sits on the local network from multiple Macs (also on the local network). Documentation for the Linux device claims that it provides an XML-RPC server and that it responds to SOAP requests. However, XML-RPC and SOAP

Re: Custom interface

2008-04-01 Thread colo
Is their no common toolkit like css for Cocoa GUI ? Or hell just use css for building the apps interface? No a widget but a real cocoa app. On 3/31/08, John Stiles [EMAIL PROTECTED] wrote: Basically you get to rewrite all the controls from scratch :) It's not a minor undertaking, so be sure

Re: Getting Localized System Strings

2008-04-01 Thread Gerriet M. Denkmann
On 1 Apr 2008, at 12:25, Jean-Daniel Dupas wrote: The strings you are looking for are in the AppKit ressources, but I don't think there are part of the API, the keys can change at anytime and you cannot rely on the files names. (in Leopard, the Undo.strings file contains a Paste Font

Re: NSView out of memory problem

2008-04-01 Thread Matt Gough
On 1 Apr 2008, at 14:40, Leslie Smith wrote: I'm sure I'm missing something. Yes. An understanding of Autorelease pools (and presumably Cocoa memory management in general) http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html The unoptimal way to fix your

NSView out of memory problem

2008-04-01 Thread Leslie Smith
Hi: I have a Cocoa application which draws a (very) large number of line segments using the code below in a loop, in drawRect, in a subclass of NSView. p1 = [NSBezierPath bezierPath] ; [p1 moveToPoint: linebottom] ; [p1 lineToPoint: linetop] ; [p1 stroke] ; (These are the outputs from a

Re: Exploring AppleScript APIs

2008-04-01 Thread Torsten Curdt
So simple! Thanks!! :) On Apr 1, 2008, at 14:10, Jean-Daniel Dupas wrote: Drop the application icon on the Script Editor Application. (in / Applications/AppleScript/) It will open it's Scripting dictionary. Le 1 avr. 08 à 13:34, Torsten Curdt a écrit : Hey, There is a Cocoa application X

Re: Getting Localized System Strings

2008-04-01 Thread Jean-Daniel Dupas
Le 1 avr. 08 à 14:47, Gerriet M. Denkmann a écrit : On 1 Apr 2008, at 12:25, Jean-Daniel Dupas wrote: The strings you are looking for are in the AppKit ressources, but I don't think there are part of the API, the keys can change at anytime and you cannot rely on the files names. (in

Re: Exploring AppleScript APIs

2008-04-01 Thread has
Torsten Curdt wrote: On Apr 1, 2008, at 14:10, Jean-Daniel Dupas wrote: There is a Cocoa application X that is Apple-scriptable. Is there any way to find out what functions are supported ...except having proper documentation at hand? Drop the application icon on the Script Editor

Re: Custom interface

2008-04-01 Thread Rob Keniger
On 01/04/2008, at 10:58 PM, colo wrote: Is their no common toolkit like css for Cocoa GUI ? No. This is largely because Mac applications are supposed to have a consistent user interface. You can read more about this in the Apple Human Interface Guidelines:

Re: NSView out of memory problem

2008-04-01 Thread Matthew Whillock
Blimey! I went to (most) of your lectures! Networks I think it was. Software Engineerng MSc 1985/6 or thereabouts... Anyway, have you considered using +strokeLineFromPoint:toPoint: instead? No need for an NSBezierPath instance. Cheers, Matt (Ok then, some of your lectures) Hi: I have a

Re: NSView out of memory problem

2008-04-01 Thread Graham Cox
Are you sure? This could be just a convenient interface for creating a bezier object with the points passed, stroking it and releasing or autoreleasing it. The docs say nothing about how it's implemented. A better idea might be to create ONE bezier object at the top of the loop, collect

Re: NSView out of memory problem

2008-04-01 Thread Jean-Daniel Dupas
Le 1 avr. 08 à 14:50, Matt Gough a écrit : On 1 Apr 2008, at 14:40, Leslie Smith wrote: I'm sure I'm missing something. Yes. An understanding of Autorelease pools (and presumably Cocoa memory management in general)

Re: NSView out of memory problem

2008-04-01 Thread Graham Cox
On 1 Apr 2008, at 11:40 pm, Leslie Smith wrote: Hi: I have a Cocoa application which draws a (very) large number of line segments using the code below in a loop, in drawRect, in a subclass of NSView. p1 = [NSBezierPath bezierPath] ; [p1 moveToPoint: linebottom] ; [p1 lineToPoint:

Re: NSView out of memory problem

2008-04-01 Thread Gorazd Krosl
Hi Leslie, NSView does not store any drawing. If the code bellow is executed in the loop as you are indicating and possibly several thousand times, each time through the loop you are creating a new autoreleased NSBezierPath. If this is the case, you should include NSAutoreleasePool and drain or

Re: Custom interface

2008-04-01 Thread I. Savant
Honestly I think most people don't appreciate how much stuff you get for free in Cocoa, but you learn pretty fast when you get to reimplement it yourself! :) True, but there are many legitimate reasons not to use a standard UI. FrontRow is a prime example of this. A kiosk application

Re: NSView out of memory problem

2008-04-01 Thread Matthew Whillock
The class reference has this to say about it: Strokes a line between two points using the current stroke color and the default drawing attributes. + (void)strokeLineFromPoint:(NSPoint)point1 toPoint:(NSPoint)point2 So it will just draw a line. Cheers, Matt Are you sure? This could be

Re: Network notifications

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 1:35 AM, Hamish Allan wrote: I disagree. If the updates are frequent, this makes a lot of work for every other machine on the LAN to update their mDNSResponder caches. If they're updating every second, then yes, TXT records would be inappropriate. But Randall didn't say

Alternating Button

2008-04-01 Thread Gerriet M. Denkmann
The FindPanel in TextEdit has in the bottom left corner a button Replace All which changes to In Selection when the ⌥-key is pressed. How is this done? I want to have such a changing button in some of my own panels. Kind regards, Gerriet. ___

Using UNCs with NSURLConnection

2008-04-01 Thread Valentin Dan
Hi, I’d like to know if there’s any way to use a UNC path with a NSURLConnection object ? Can the UNC perhaps be transformed in a NSURL ? Or is there another way to get a remote file from a server that requires authentication if I only have the file’s UNC ? Thanks !

Re: Best Way to Replicate CURL in Cocoa?

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 5:39 AM, Brad Gibbs wrote: Given this, I'm suspecting it responds to HTTP Posts, rather than XML-RPC or SOAP requests. But both those protocols do use HTTP POSTs. (XML-RPC can use alternate transports, but in practice it's almost always over HTTP.) I've seen references

Re: Network notifications

2008-04-01 Thread Randall Meadows
On Apr 1, 2008, at 9:13 AM, Jens Alfke wrote: On 1 Apr '08, at 1:35 AM, Hamish Allan wrote: I disagree. If the updates are frequent, this makes a lot of work for every other machine on the LAN to update their mDNSResponder caches. If they're updating every second, then yes, TXT records would

Re: Alternating Button

2008-04-01 Thread Jean-Daniel Dupas
I dont think there is an automatic way to have it (except for menu), but you can have a look at the flagsChanged: event Le 1 avr. 08 à 17:24, Gerriet M. Denkmann a écrit : The FindPanel in TextEdit has in the bottom left corner a button Replace All which changes to In Selection when the

Re: Alternating Button

2008-04-01 Thread Jean-Daniel Dupas
Sorry for the previous unfinished message. I dont think there is an automatic way to have it (except for menu items), but you can have a look at the flagsChanged: method of NSResponder. Le 1 avr. 08 à 17:24, Gerriet M. Denkmann a écrit : The FindPanel in TextEdit has in the bottom left

Re: Best Way to Replicate CURL in Cocoa?

2008-04-01 Thread Brad Gibbs
Thanks for the reply. On Apr 1, 2008, at 8:51 AM, Jens Alfke wrote: On 1 Apr '08, at 5:39 AM, Brad Gibbs wrote: Given this, I'm suspecting it responds to HTTP Posts, rather than XML-RPC or SOAP requests. But both those protocols do use HTTP POSTs. (XML-RPC can use alternate

Re: Network notifications

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 8:25 AM, Randall Meadows wrote: If they're updating every second, then yes, TXT records would be inappropriate. But Randall didn't say whether the updates were that frequent. I would expect maybe 5-10 over a 2-3 minute period, and then a downtime of about the same;

Re: Using UNCs with NSURLConnection

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 8:42 AM, Valentin Dan wrote: I’d like to know if there’s any way to use a UNC path with a NSURLConnection object ? Can the UNC perhaps be transformed in a NSURL ? I had to look up UNC on Wikipedia; I think what you're talking about is a type of path string used on

Re: Question on bitmap fonts

2008-04-01 Thread Aki Inoue
From the look of it, I think there is floating-point rounding involved. After all, the graphics system is treating it as a scalable font so the notion of bitmap (or pixel-based) font design doesn't apply. Aki On 2008/04/01, at 9:48, Tobia Conforto wrote: Thank you! I hadn't thought of

Re: Question on bitmap fonts

2008-04-01 Thread Tobia Conforto
Thank you! I hadn't thought of using gdb :-) Now I only need to understand why y = -2.6643 instead of -2.6651 Tobia On 1 Apr 2008, at 18:36, Aki Inoue wrote: This is the information returned from the font. (gdb) p glyphBBox $30 = { origin = { x = 0, y = -2.6643 }, size

CoreAnimation with and manual animation...

2008-04-01 Thread Jesse Grosjean
I'd like to create something like a spaceship with core animation. That is the object should be animated on screen, but it's velocity will always be changing. Because of this I'm not sure if using core animations build in animation system makes sense, because it seems like most of those

Re: ERROR: __CFURLCache::StepSQLStatement

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 10:22 AM, Kimo wrote: ERROR: __CFURLCache::StepSQLStatement - step failed (exceed retry) - ErrCode: 5 That's an internal error from CFNetwork's URL cache (which happens to use a sqlite database.) Nothing to do with CoreData. —Jens smime.p7s Description: S/MIME

Fixing my massive memory leak with NSImage/CALayer

2008-04-01 Thread Nathan Vander Wilt
I want to pop up photographs inside their own Core Animation layers, but I get huge real memory usage that never goes down. I have an FRPhoto class whose instances manage other metadata for the image, and also have a convenience method to get an NSImage* as follows: - (NSImage*)image {

Re: PDF file in NSTextAttachment

2008-04-01 Thread Douglas Davidson
On Apr 1, 2008, at 11:33 AM, [EMAIL PROTECTED] wrote: I am trying to add a pdf image to an NSTextAttachment. I create a file wrapper from a pdf image on disk and insert it into my textstorage, with no problem, which draws fine on screen but then when I want to print the document it draws

Re: ERROR: __CFURLCache::StepSQLStatement

2008-04-01 Thread Bill
On Apr 1, 2008, at 10:45 AM, Jens Alfke wrote: On 1 Apr '08, at 10:22 AM, Kimo wrote: ERROR: __CFURLCache::StepSQLStatement - step failed (exceed retry) - ErrCode: 5 That's an internal error from CFNetwork's URL cache (which happens to use a sqlite database.) Nothing to do with

Need for a creator code?

2008-04-01 Thread Marc Respass
Hi All, I haven't registered for a creator code since System 7.5. Apple has information and registration page (http://developer.apple.com/datatype/index.html ) about it but no indication if it's actually still required. Can anyone tell me if it is still required or maybe point me at the

Re: Need for a creator code?

2008-04-01 Thread Ricky Sharp
On Apr 1, 2008, at 2:59 PM, Marc Respass wrote: Hi All, I haven't registered for a creator code since System 7.5. Apple has information and registration page (http://developer.apple.com/datatype/index.html ) about it but no indication if it's actually still required. Can anyone tell me

Re: Need for a creator code?

2008-04-01 Thread Andrew Farmer
On 01 Apr 08, at 12:59, Marc Respass wrote: I haven't registered for a creator code since System 7.5. Apple has information and registration page (http://developer.apple.com/datatype/index.html ) about it but no indication if it's actually still required. Can anyone tell me if it is still

[Meeting] Toronto Area Cocoa and WebObjects Developer Group - April 8

2008-04-01 Thread Karl Moskowski
The next meeting of tacow / Cocoaheads Toronto will be held on Tuesday, April 8 at 6:30 PM at Ryerson University. Apple's Steve Hayman will be talking about the iPhone SDK. More info and directions are available at http://www.tacow.org/?p=74. Thanks and see you there. Karl Moskowski

Re: Custom interface

2008-04-01 Thread Ricky Sharp
On Apr 1, 2008, at 10:13 AM, I. Savant wrote: Of course we don't know what the requirements are. You may have a perfectly valid reason but customizing AppKit might be a perfectly poor choice ... The best thing to do - as I said - is to explain what you are trying to accomplish and why Cocoa

UTIs and CFBundleDocumentTypes

2008-04-01 Thread Rick Mann
I'm trying to use the editor you get when you get info on a target in Xcode to add support to my application to open files ending in .gpx. I've added a second line to that editor with what I thought was the appropriate information. But I'm confused, because these lines create

Re: CGDisplayReconfigurationCallBack

2008-04-01 Thread Trygve Inda
What exactly would I put in here? It calls into my code with void DisplayReconfigurationCallBack (CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, void *userInfo) { if (flags kCGDisplayAddFlag) { // do stuff } else if (flags kCGDisplayRemoveFlag) {

Re: CoreAnimation with and manual animation...

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 10:44 AM, Jesse Grosjean wrote: n my app it seems like it would be simpler to just setup a timer and just directly update the ships position based on it's velocity for each time interval from my timer. I'd still want to use the built in core animation animations for other

Re: test if another app has hung

2008-04-01 Thread Martin Redington
I went to check the referenced thread, as this is something I wanted to do occasionally, when I noticed that I was the OP for it. The discussion was exhaustive, and veered OT at the end, but I'm not sure that I ever discerned how one would do this efficiently. This was probably the most

DataSource for NSTableView with ButtonCell

2008-04-01 Thread Thomas Bartelmess
Hello List, i've created a NSTableview with Interface Builder. In one of my Collums is a NSButton. I've no idea how to set up the DataSource for this. Can anyone help me? Thanks a lot Thomas Bartelmess [EMAIL PROTECTED] ___ Cocoa-dev mailing

Finding out about new windows.

2008-04-01 Thread Paul FitzGerald
I have a need to find a way for my application to find out when new windows are opened within it. The specific case I'm currently looking at is when the print dialog is opened and the user chooses Save as PDF This action will open a file save dialog and I need to know when this happens.

Re: CoreAnimation with and manual animation...

2008-04-01 Thread Jesse Grosjean
Jens, Thanks for your reply. What I'm doing now is something like this: [CATransaction begin]; [CATransaction setValue:[NSNumber numberWithFloat:0] forKey:kCATransactionAnimationDuration]; for (CALayer *each in [rootLayer.sublayers copy]) {

Re: test if another app has hung

2008-04-01 Thread John Stiles
I have a vague recollection that the mechanism used by Activity Monitor and friends is not public API, unfortunately. Martin Redington wrote: I went to check the referenced thread, as this is something I wanted to do occasionally, when I noticed that I was the OP for it. The discussion

Re: CGDisplayReconfigurationCallBack

2008-04-01 Thread Jean-Daniel Dupas
As we are on the cocoa list, I assume you are using obj-c. If you are using plain C API in your code, you should not have problem. But if // do stuff contains some obj-c calls that can raise an exception, you have to make sure to catch it. void DisplayReconfigurationCallBack

Re: Fixing my massive memory leak with NSImage/CALayer

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 11:07 AM, Nathan Vander Wilt wrote: The NSImage that my FRPhoto holds on to should have invalidate[d] and free[d] the offscreen caches of all image representations. That doesn't mean the image representations themselves are flushed, though. They're still there, typically

Re: Finding out about new windows.

2008-04-01 Thread Kyle Sluder
I'm pretty sure this is no longer the recommended way to do a kiosk application. Instead, you can use SetSystemUIMode to hide the menubar and dock (or replace the Finder as the first app launched). TN2062 http://developer.apple.com/technotes/tn2002/tn2062.html has more information. --Kyle

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-01 Thread stephen joseph butler
On Tue, Apr 1, 2008 at 6:20 PM, Martin Redington [EMAIL PROTECTED] wrote: I'm running /sbin/md5 via an NSTask on a number of files (3,000 or so, with a new NSTask each time). This would run a lot faster (and avoid fd issues) if you used libcrypto. Try man EVP_DigestInit to get an idea of

Re: ERROR: __CFURLCache::StepSQLStatement

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 12:06 PM, Bill wrote: Is my app causing it to happen? If so, should I try and correct it? Or can I safely ignore it? IIRC, sqlite error 5 means the database is locked. I think the only way that could happen is if you have multiple copies of your app/ process running at

Re: Southern California Coders?

2008-04-01 Thread James Merkel
On Tue, 1 Apr 2008 15:23:40, Casey Becking wrote: Sorry to take any ones time if this has been discussed before. I was curious if there was any group meeting for Southern California coders to get together? Well, Southern California is a pretty big area. I have seen reference to Lake

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-01 Thread Jean-Daniel Dupas
Le 2 avr. 08 à 01:36, stephen joseph butler a écrit : On Tue, Apr 1, 2008 at 6:20 PM, Martin Redington [EMAIL PROTECTED] wrote: I'm running /sbin/md5 via an NSTask on a number of files (3,000 or so, with a new NSTask each time). This would run a lot faster (and avoid fd issues) if you

Re: Need for a creator code?

2008-04-01 Thread Rainer Brockerhoff
At 15:21 -0700 01/04/08, [EMAIL PROTECTED] wrote: From: Andrew Farmer [EMAIL PROTECTED] References: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] Date: Tue, 1 Apr 2008 13:26:58 -0700 Message-ID: [EMAIL PROTECTED] On 01 Apr 08, at 12:59, Marc Respass wrote: I haven't registered for a creator

Re: Finding out about new windows.

2008-04-01 Thread Rob Napier
This is a good part of the solution. You also want to consider your window level. Rather than taking over the entire screen, move your window level up to NSModalPanelWindowLevel-1 and put a masking window at NSModalPanelWindowLevel-2. That way the modal dialog will pop up over your app. -Rob On

Re: Cocoa Tutoring in SF Bay Area

2008-04-01 Thread Joel Norvell
Hi Brad, Based on the description of your application, I think you'll find Brent Simmons' excellent XML-RPC Class for Cocoa helpful. And as Eric Wing pointed out, you can't go wrong with Cocoaheads and NSCoder Night! Sincerely, Joel http://ranchero.com/cocoa/xmlrpc/

Re: KVO question on Tree Controllers

2008-04-01 Thread Adam Gerson
What is bound to your NSTreeController? If its something like an OutlineView you can have the delegate impliment outlineViewSelectionDidChange. I tested it in my app and it does get called when the OutlineView selection is changes to empty. Adam On Tue, Apr 1, 2008 at 3:11 PM, Jeff LaMarche

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-01 Thread John Stiles
I haven't experimented with CC_MD5, but we do have code which calculates MD5s (calculated via simple C code). Is CC_MD5 optimized e.g. using SSE or AltiVec? Should I expect to see a perf boost if I swapped in this code instead of our regular C code? Jean-Daniel Dupas wrote: Le 2 avr. 08 à

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-01 Thread Martin Redington
On 2 Apr 2008, at 00:46, Jean-Daniel Dupas wrote: Le 2 avr. 08 à 01:36, stephen joseph butler a écrit : On Tue, Apr 1, 2008 at 6:20 PM, Martin Redington [EMAIL PROTECTED] wrote: I'm running /sbin/md5 via an NSTask on a number of files (3,000 or so, with a new NSTask each time). This

Re: core data and sqlite db store problem

2008-04-01 Thread Adam Swift
On Mar 31, 2008, at 10:23 AM, Scott Guyer wrote: Thanks Jeff, That would explain it. Crikey...whole lotta Zs in the CD created SQLite schema. :) In XCode, there is an Design - Data Model - Import... menu item. It is looking to import an XML file of a particular format. Any

Problems with custom NSScrollView/ NSTableView

2008-04-01 Thread mike woodworth
Hey all, I've made a whole set of custom controls, including custom NSScrollers, a NSScrollVIew to use them in, and an NSTableView based off these. What I can't figure out is my table is set to show Scrollers when needed, but when they appear, I get a white corner where the two

Re: Finding out about new windows.

2008-04-01 Thread Paul FitzGerald
Thanks Ricky, Kyle and Rob. I do appreciate your comments, but none of this addresses my question. I started working from TN2062 several months ago and only after a ton of research and experimentation found that this alone does not meet my needs (for reasons I won't get into here). I do, in

Re: PDF file in NSTextAttachment

2008-04-01 Thread Martin Wierschin
I create a file wrapper from a pdf image on disk and insert it into my textstorage, with no problem, which draws fine on screen but then when I want to print the document it draws the image at low resolution. This is a bug that was introduced in Leopard that affects PDF and EPS images. I

Re: test if another app has hung

2008-04-01 Thread has
Martin Redington wrote: There were some AppleScript based approaches, but they all seemed to involve activating the app ... Shouldn't do, as long as you check to see if the application is running first. That said, you may not want to use AppleScript itself as it has issues running in

Re: Finding out about new windows.

2008-04-01 Thread Rob Napier
You can get what you're looking for by observing NSWindowDidBecomeKeyNotification or several of the others. Look at the Notifications section at the bottom of NSWindow's documentation. Should be something like [[NSNotificationCenter defaultCenter] addObserver:self selector:...

Re: KVO question on Tree Controllers

2008-04-01 Thread Rob Keniger
On 02/04/2008, at 5:11 AM, Jeff LaMarche wrote: I've also tried using @selectedObjects rather than @selection. Now this notifies me when the selection changes, except it doesn't notify me if the user clicked somewhere resulting in an empty selection, nor when the selection is currently

Re: Is there a Source List control in Cocoa

2008-04-01 Thread Markus Spoettl
On Apr 1, 2008, at 5:50 PM, Rob Napier wrote: It won't exactly match Mail or iTunes, but the new Leopard way of doing what you're talking about is to use an NSTableView or NSOutlineView and call: [tableView setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSurceList ]

Re: Is there a Source List control in Cocoa

2008-04-01 Thread Markus Spoettl
On Apr 1, 2008, at 5:57 PM, Rob Keniger wrote: http://developer.apple.com/samplecode/SourceView Excellent, thanks Rob! Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list

Re: Need for a creator code?

2008-04-01 Thread Dave Sopchak
Ah, a subject near and dear to my heart. I agree with Rainer, UTIs can be deduced from file types, extensions and file creators, but I would sure like it if one could set a UTI for a document and have this take care of things, not the other way around. Also, it certainly seems that UTIs do

Deletion+processPendingChanges+transient attributes

2008-04-01 Thread Quincey Morris
I was surprised to see a Core Data object throw an exception during 'processPendingChanges' because the object couldn't handle 'setValue:nil forKey:'. AFAICT, this happened under the following conditions: -- the object had been inserted into the managed object context -- the object had then

Re: Finding out about new windows.

2008-04-01 Thread Paul FitzGerald
Thanks Rob. I thought I looked through all the window notifications. Maybe I just overlooked this. I'll try. This really is a stop-gap measure. I want to be implementing the drawing of all the dialogs myself but need to get this out with a reasonable solution in the mean time. Paul On

NSManagedObject data only shows up in view sometimes

2008-04-01 Thread Adam Gerson
I have a classic NSTreeController / NSOutlineView situation. The TreeController has a SortDescriptor on it. I am programatically adding a leaf node to a group node. It does not appear in the OutlineView when I first add it. When I inspect the CoreData .xml file the leaf node is there and it

Re: Fixing my massive memory leak with NSImage/CALayer

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 7:47 PM, Nathan Vander Wilt wrote: Looks like I'll have to design a smarter architecture to keep the right images in memory at the right time. IKImageBrowserView (new in 10.5) pretty much does this for you. If its look and feel are compatible with what you're doing (it's

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 4:53 PM, Martin Redington wrote: You'd kind of hope that NSTask would clean up in its dealloc method, but apparently not. But you're not (and shouldn't be) calling -dealloc, you're calling - release. My guess is that the NSTask retains itself while the process is