Re: View Hierarchies for apps like Quartz Composer

2009-10-09 Thread Darren Minifie
Cool, thanks for the advice. I was a bit vague in my approach. I did in fact separate model from view in my implementation. What you guys are saying about better modeling the connections seems to be the right approach. On another note, Graham, I looked at your framework and it looks very

Re: Hide an Item on Desktop

2009-10-09 Thread M Pulis
On Oct 8, 2009, at 7:55 PM, Dave Carrigan wrote: On Oct 8, 2009, at 6:51 PM, M Pulis posted a screen capture of a finder error. That's just the finder being nice to the non-techies. The longer if you name this with a dot then you'll have to hit a special key combination in order to see

Re: Hide an Item on Desktop

2009-10-09 Thread Paul M
On 9/10/2009, at 2:51 PM, M Pulis wrote: Picture 2.png Naming a file with leading period is THE traditional unix way of making a file less visible to the casual observer. OSX is based on unix. (Actually, isnt OSX the most widely used OS legally able to use the name 'Unix'?) The dialog

Re: How to set checkbox state in TableView columnheader

2009-10-09 Thread Zhang Li
- Original Message - From: Jerry Krinock je...@ieee.org To: Cocoa Developers cocoa-dev@lists.apple.com Sent: Friday, October 09, 2009 11:20 AM Subject: Re: How to set checkbox state in TableView columnheader Congratulations, it looks like you got the hard parts! NSButtonCell

Re: How to set checkbox state in TableView columnheader

2009-10-09 Thread Zhang Li
NSButtonCell inherits from NSActionCell and NSCell. (See 2nd line of the NSButtonCell documentation). Click the links. Now, try -[NSCell setState:], which will probably work, and -[NSActionCell setObjectValue:], which might work. I called [cell setObjectValue:[NSNumber numberWithInt:1]]

Instance variables: access directly vs. getter / setter

2009-10-09 Thread Matthias Arndt
While restructuring some old classes I'm uncertain about the preferred way to access instance variables within their own instance: I tend to defines all these variables as properties and use their implicit getters / setters, but ... 1. ) ... in the designated initializer I have to access

Re: Instance variables: access directly vs. getter / setter

2009-10-09 Thread Graham Cox
On 09/10/2009, at 8:01 PM, Matthias Arndt wrote: While restructuring some old classes I'm uncertain about the preferred way to access instance variables within their own instance: I tend to defines all these variables as properties and use their implicit getters / setters, but ... 1. )

Updating application info plist

2009-10-09 Thread Zephyroth Akash
Hi, I'm facing a weird issue. I get the Info.plist of the app like this. NSMutableDictionary *infoPlist = [[NSBundle mainbundle] infoDictionary]; After the update of some resources I want to write the new version of these resources in the Info.plist. No problem. But when the app execute

Re: Hide an Item on Desktop

2009-10-09 Thread I. Savant
On Oct 8, 2009, at 9:18 PM, M Pulis wrote: Please do not advise this hack. It is not supported by the Finder. Wrong. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Hide an Item on Desktop

2009-10-09 Thread I. Savant
On Oct 9, 2009, at 2:00 AM, M Pulis wrote: Following trends, it is easy to imagine a future Desktop becoming an increasingly protected space. One thing I have learned in 25 years is never underestimate Apple's ability to change and force our world to recompile. 10.6 just killed off an

Re: How to set checkbox state in TableView columnheader

2009-10-09 Thread Zhang Li
Maybe you should update the NSTableView ? I did, but no luck. What's more, the creation of the checkbox and set its state to on are inside awakeFromNib, updating NSTableView looks like not necessary. BTW, when I click left mouse button on the checkbox, I can see tick appear inside the

Re: Updating application info plist

2009-10-09 Thread Mike Abdullah
On 9 Oct 2009, at 10:55, Zephyroth Akash wrote: Hi, I'm facing a weird issue. I get the Info.plist of the app like this. NSMutableDictionary *infoPlist = [[NSBundle mainbundle] infoDictionary]; Warning lights should be going off here. -infoDictionary is defined as returning an

Re: Instance variables: access directly vs. getter / setter

2009-10-09 Thread Matthias Arndt
Am 09.10.2009 um 11:30 schrieb Graham Cox: In init and dealloc, it is usual recommended to access the ivar directly - not because self isn't defined (it is), but because at those times you are usually only concerned with setting the ivar's initial value (possibly to an object), or

Re: Instance variables: access directly vs. getter / setter

2009-10-09 Thread Graham Cox
On 09/10/2009, at 10:14 PM, Matthias Arndt wrote: [self setIvar:[self ivar] + 1]; instead of iVar++; looks a bit confusing to me. Maybe confusing, but the two are not necessarily equivalent. In the second case, you are merely incrementing the ivar. No-one else would know

Re: Instance variables: access directly vs. getter / setter

2009-10-09 Thread Matthias Arndt
Am 09.10.2009 um 13:32 schrieb Graham Cox graham@bigpond.com: In the first case, interested observers using KVO to track changes to ivar will get automatically notified, and any subclasses that have overridden -setIvar: or -ivar also get called as they should. Got it :-) As always

Are these Apple or 3rd party classes?

2009-10-09 Thread Philip White
Hello, A customer of one of my shareware programs has reported that my program frequently crashes when he tries to print. No one else has reported this kind of error. The stack trace he sends me includes the following lines: (this is just some of them) 20 EPIJDataManager_Core_L

Re: Hide an Item on Desktop

2009-10-09 Thread David Patrick Henderson
On 09 Oct 2009, at 03:44, I. Savant wrote: On Oct 8, 2009, at 9:18 PM, M Pulis wrote: Please do not advise this hack. It is not supported by the Finder. Wrong. Depends on one's definition of supported. One cannot rename a file or folder in the Finder directly with a leading '.', or a

Re: How to set checkbox state in TableView columnheader

2009-10-09 Thread Jerry Krinock
Try to send your button cell a -drawWithFrame:inView: message after setting its state. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: How to ease the burden on the Garbage Collector?

2009-10-09 Thread Gabriel Zachmann
It seems that about 20% of the time is spent in the Garbage Collector thread! Which is a bit surprising to me, since I don't allocate a large number of objects (I think) -- just a small number of large objects (the images). The collector only chews CPU when there are lots of allocation

Re: Automatic language detection - a bug (again) or what. Snow Foundation NSSpellServer.

2009-10-09 Thread MacProjects
Just submitted in bug reporter. Bug ID# 7290111 Problem Report Title: NSSpellServer: OSX 10.6. Error in automatic language detection. Product: Mac OSX Version/Build Number: 10B504 Classification: Serious Bug Is It Reproducible?: Always NSSpellServer: OSX 10.6. Error in automatic language

Re: Hide an Item on Desktop

2009-10-09 Thread Dave Camp
On Oct 9, 2009, at 6:50 AM, David Patrick Henderson wrote: Depends on one's definition of supported. One cannot rename a file or folder in the Finder directly with a leading '.', or a ':'. Attempting to do so will cause warning dialogs for all these cases (and perhaps of which I am

Re: Updating application info plist

2009-10-09 Thread Randall Meadows
On Oct 9, 2009, at 3:55 AM, Zephyroth Akash wrote: I get the Info.plist of the app like this. NSMutableDictionary *infoPlist = [[NSBundle mainbundle] infoDictionary]; After the update of some resources I want to write the new version of these resources in the Info.plist. No problem.

Re: Updating application info plist

2009-10-09 Thread Kyle Sluder
On Oct 9, 2009, at 2:55 AM, Zephyroth Akash zephyroth.os...@gmail.com wrote: After the update of some resources I want to write the new version of these resources in the Info.plist. Sorry, you cannot do this. Changing an app's Info.plist is not supported, especially while the app is

Re: How to set checkbox state in TableView columnheader

2009-10-09 Thread Corbin Dunn
On Oct 8, 2009, at 1:23 AM, Zhang Li wrote: Hi All, I want to place a checkbox on each NSTableView column header, when user click on it, the checkbox can be set to checked/unchecked state accordingly. I successfully put checkbox on NSTableView column header by using following

Re: Updating application info plist

2009-10-09 Thread Bill Bumgarner
On Oct 9, 2009, at 8:19 AM, Kyle Sluder wrote: Sorry, you cannot do this. Changing an app's Info.plist is not supported, especially while the app is running. As well, it is likely that the .app directory is installed in some place where the current user does not have write access or the

Re: Are these Apple or 3rd party classes?

2009-10-09 Thread Steve Christensen
A quick Google search came up with a reference to EPIJDataManager that somehow relates to Epson printers. I couldn't find any other info than that. On Oct 9, 2009, at 6:48 AM, Philip White wrote: A customer of one of my shareware programs has reported that my program frequently crashes

Changing the edit behaviour of a cell

2009-10-09 Thread Tom Davie
I've been busy reading the documentation all day, and can't for the life of me figure out how to change the editing behavior of an NSCell. I have a cell, which I'd like to pop up a window over when the user attempts to edit it (much like many websites do to present a date picker for example). I

Re: Are these Apple or 3rd party classes? (printing error)

2009-10-09 Thread Philip White
On Oct 9, 2009, at 10:27 AM, Steve Christensen wrote: A quick Google search came up with a reference to EPIJDataManager that somehow relates to Epson printers. I couldn't find any other info than that. Oops, my Yahoo search came up with nothing. I guess there is a reason Google is

Re: Changing the edit behaviour of a cell

2009-10-09 Thread Corbin Dunn
.. What is the correct way to set up such behaviour? There's a demo for that. http://developer.apple.com/mac/library/samplecode/AnimatedTableView/index.html corbin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

NSWindowCollectionBehaviorMoveToActiveSpace has failed me for the last time

2009-10-09 Thread Chilton Webb
Hi, I'm trying to wrap my head around what I thought was a simple concept. I created a simple test app to test this. The source to it can be found here... http://www.conjurebunny.com/SpaceTest.zip All it does is... 1) Sets the window collection behavior to

Re: Are these Apple or 3rd party classes? (printing error)

2009-10-09 Thread Philip White
Ok, I guess I wrote these lines too hastily: On Oct 9, 2009, at 11:02 AM, Philip White wrote: That is the last my code hears of it, below is the stack trace from that point to where the exception is thrown, it doesn't look like my printing view ever gets sent a -drawRect: or any other

Re: debugging cursors

2009-10-09 Thread Sean McBride
On 10/7/09 5:50 PM, David M. Cotter said: how do i tell the OS to stop setting my cursor to the beachball whilst stopped in the debugger? i'm debugging my cursor setting stuff and that makes it impossible Debugging such things is often easier with two machines. This is dated, but a good

Re: debugging cursors

2009-10-09 Thread David M. Cotter
yes i have been using remote debugging the whole time. On Oct 9, 2009, at 10:00 AM, Sean McBride wrote: On 10/7/09 5:50 PM, David M. Cotter said: how do i tell the OS to stop setting my cursor to the beachball whilst stopped in the debugger? i'm debugging my cursor setting stuff and that

dealloc and finalize

2009-10-09 Thread Gabriel Zachmann
If my screensaver must be able to run both in the reference-counted and in the garbage collecting environment, should I then implement both the dealloc and the finalize method? Regards, Gabriel. smime.p7s Description: S/MIME cryptographic signature

Re: Core-data binding to all entities

2009-10-09 Thread Martin Hewitson
In the end I was able to solve this by making an NSArrayController bound to all entities of the type Note, then set the Filter Predicate of that array controller depending on the switch state. So I have: - (IBAction)allCategoriesSelected:(id)sender { [singleCategoryButton

Re: Hide an Item on Desktop

2009-10-09 Thread Maggie Zhang
Thanks all of you for your answers. I apologize for the unclear question in the beginning. Let me try to explain it again. What I want is to hide existing mounted volumes whose names I don't want to change. Say, I create 20 disk images and mount them all on the desktop but I want them to be

Re: dealloc and finalize

2009-10-09 Thread Nick Zitzmann
On Oct 9, 2009, at 11:31 AM, Gabriel Zachmann wrote: If my screensaver must be able to run both in the reference-counted and in the garbage collecting environment, should I then implement both the dealloc and the finalize method? If you allocated objects in your class that you need to

Re: dealloc and finalize

2009-10-09 Thread Bill Bumgarner
On Oct 9, 2009, at 10:31 AM, Gabriel Zachmann wrote: If my screensaver must be able to run both in the reference-counted and in the garbage collecting environment, should I then implement both the dealloc and the finalize method? That is correct. b.bum

Re: Hide an Item on Desktop

2009-10-09 Thread Dave Carrigan
On Oct 9, 2009, at 10:37 AM, Maggie Zhang wrote: What I want is to hide existing mounted volumes whose names I don't want to change. Say, I create 20 disk images and mount them all on the desktop but I want them to be selectively invisible from the Desktop and can still be accessible

Re: Are these Apple or 3rd party classes?

2009-10-09 Thread David Duncan
On Oct 9, 2009, at 6:48 AM, Philip White wrote: I don't really know a lot about the inner workings of the print system, but would anyone be able to tell me if this looks like it is third party stuff (printer drivers?) or Apple stuff? The bottom of the crash report should tell you the full

Re: Hide an Item on Desktop

2009-10-09 Thread Maggie Zhang
Thanks Dave. I will give that a try. MZ On Fri, Oct 9, 2009 at 10:49 AM, Dave Carrigan d...@rudedog.org wrote: On Oct 9, 2009, at 10:37 AM, Maggie Zhang wrote: What I want is to hide existing mounted volumes whose names I don't want to change. Say, I create 20 disk images and mount them

Undo architecture advice needed

2009-10-09 Thread David Hirsch
Hello list- I have a document-based application. Each document has a NSArray of phases. Phases is an NSArrayController created in IB and bound to FIle's Owner.phases. When a given phase is selected in the NSTableView (bound to phase controller), then its properties show up in a set of

Re: Are these Apple or 3rd party classes?

2009-10-09 Thread Philip White
On Oct 9, 2009, at 12:51 PM, David Duncan wrote: On Oct 9, 2009, at 6:48 AM, Philip White wrote: I don't really know a lot about the inner workings of the print system, but would anyone be able to tell me if this looks like it is third party stuff (printer drivers?) or Apple stuff? The

Re: Undo architecture advice needed

2009-10-09 Thread Kai Brüning
Hello Dave, undo/redo is a model operation and should be handled inside the model. That is, I wouldn’t pick your suggestions 1) or 2), because they both do not observe (in a general case, not KVO) the model to generate undo information. If I understand you correctly, the phase objects

Re: Undo architecture advice needed

2009-10-09 Thread David Hirsch
Thanks. For the second time on this list, I have forgotten that bindings work through setters/getters, rather than directly on the object's variables. -Dave On Oct 9, 2009, at 11:07 AM, Kai Brüning wrote: Hello Dave, undo/redo is a model operation and should be handled inside the

Detecting if application is running as Finder

2009-10-09 Thread Mike Joseph
Hi folks, I am writing an application the replaces the Finder (by writing to com.apple.loginwindow/Finder). That bit is working fine and my application starts up normally as expected. However, it would be very useful if I could enable different behavior in my application depending on whether it

Re: Hide an Item on Desktop

2009-10-09 Thread Michael Domino
M Pulis wrote: Unless you can absolutely prove that your file fits Apple specs for a legitimately installed dot system file that is not the best practice to make a non-system file invisible. Seek an alternative. There are temp directories and other legit facilities. Can someone point out the

Re: How to set checkbox state in TableView columnheader

2009-10-09 Thread Jerry Krinock
On 2009 Oct 09, at 08:24, Corbin Dunn wrote: What you are doing will not work. You have to create an NSTableHeaderCell subclass. Even then, you may have to subclass NSTableHeaderView to get it to work like a button with a button in it (header's are essentially buttons). Yes, I found

Re: Detecting if application is running as Finder

2009-10-09 Thread Greg Guerin
Mike Joseph wrote: I know that launchd pays special attention to the application it considers to be Finder since it will restart it when it exits, etc. So clearly launchd knows the PID/PSN of Finder. Surely there's some way to ask for it, but I can't figure out how. Since launchd is

Binding to currently selected object in a list?

2009-10-09 Thread A B
Is there a way to bind an ivar to the currently selected object of a list which is being represented in an NSTableView via bindings? Unfortunately there does not seem to be a selectedObject key (though there is one for selectedObjects). Binding to the controller's selection doesn't really

Binding to values which aren't there

2009-10-09 Thread A B
I have a situation in which I would like a column in a table that is bound to an NSArrayController to display information that isn't actually in the objects being represented, but is instead the result of an operation that involves a bit of data in that row's object and a separate bit of data

Re: Updating application info plist

2009-10-09 Thread Rob Keniger
On 10/10/2009, at 1:19 AM, Kyle Sluder wrote: Sorry, you cannot do this. Changing an app's Info.plist is not supported, especially while the app is running. I've noticed that some apps (LittleSnapper is the first example I can think of), have a hide the app icon in the dock after relaunch

Re: Updating application info plist

2009-10-09 Thread Kyle Sluder
On Fri, Oct 9, 2009 at 4:05 PM, Rob Keniger r...@menumachine.com wrote: To do this, surely they must be rewriting the LSUIElement key in the app's own Info.plist while the app is running, right? Or is there another way to do this? I don't know how LittleSnapper is implemented, but you can

Re: Binding to values which aren't there

2009-10-09 Thread mmalc Crawford
On Oct 9, 2009, at 3:17 PM, A B wrote: I have a situation in which I would like a column in a table that is bound to an NSArrayController to display information that isn't actually in the objects being represented, but is instead the result of an operation that involves a bit of data in

Re: Binding to values which aren't there

2009-10-09 Thread A B
On Friday, October 09, 2009, at 04:21PM, mmalc Crawford mmalc_li...@me.com wrote: On Oct 9, 2009, at 3:17 PM, A B wrote: I have a situation in which I would like a column in a table that is bound to an NSArrayController to display information that isn't actually in the objects being

Re: Hide an Item on Desktop

2009-10-09 Thread Paul M
This will be the POSIX spec, not an Apple one. OSX has been POSIX compliant since Leopard, accoring to this page: http://developer.apple.com/leopard/overview/osfoundations.html paulm On 10/10/2009, at 8:23 AM, Michael Domino wrote: M Pulis wrote: Unless you can absolutely prove that your

using QLPreviewPanel and supporting 10.5

2009-10-09 Thread Mitchell Livingston
Hello, I want to support Quick Look in my application, but still support 10.5. I'm using the 10.6 SDK and 10.5 deployment target. Launching on 10.5 gives: Dyld Error Message: Symbol not found: _OBJC_CLASS_$_QLPreviewPanel Referenced from:

Document architecture - stop it from opening untitled documents?

2009-10-09 Thread aaron smith
Hey All, quick question. I'm trying to figure out how to stop untitled documents from opening when the application first runs. I've been looking on google, and tried some different combinations of method overrides on NSDocumentController. I figured out how to stop the untitled doc from opening,

Re: Document architecture - stop it from opening untitled documents?

2009-10-09 Thread aaron smith
ok. nevermind. I got it. You have to implement a method from NSApplicationDelegate: - (BOOL) applicationOpenUntitledFile:(NSApplication *) theApplication { return true; } On Fri, Oct 9, 2009 at 6:52 PM, aaron smith beingthexemplaryli...@gmail.com wrote: Hey All, quick question. I'm

Re: Hide an Item on Desktop

2009-10-09 Thread Jens Alfke
On Oct 9, 2009, at 10:37 AM, Maggie Zhang wrote: What I want is to hide existing mounted volumes whose names I don't want to change. Setting the HFS invisible bit is the way to go, then. I've done this before. You can do this from the command line: SetFile -a V /Volumes/HideMe

Re: How to ease the burden on the Garbage Collector?

2009-10-09 Thread Jens Alfke
On Oct 9, 2009, at 7:23 AM, Gabriel Zachmann wrote: http://zach.in.tu-clausthal.de/tmp/malloc1.png http://zach.in.tu-clausthal.de/tmp/malloc2.png http://zach.in.tu-clausthal.de/tmp/malloc3.png Those are showing all malloc operations. Most of those are not garbage- collected, so they don't

Re: Are these Apple or 3rd party classes?

2009-10-09 Thread Jens Alfke
On Oct 9, 2009, at 11:05 AM, Philip White wrote: The crash report is actually from my own crash reporter, not from Apple's and it doesn't report what libraries are loaded. I slapped together my own reporter because few users think to send the info from Apple's crash reporter to the

Re: Instance variables: access directly vs. getter / setter

2009-10-09 Thread Jens Alfke
On Oct 9, 2009, at 2:30 AM, Graham Cox wrote: In init and dealloc, it is usual recommended to access the ivar directly - not because self isn't defined (it is), but because at those times you are usually only concerned with setting the ivar's initial value (possibly to an object), or

Re: How to allocate and delegate; or how to keep GC and the static analyzer happy

2009-10-09 Thread Jens Alfke
On Oct 8, 2009, at 7:33 PM, Glen Low wrote: 1. The code is not GC friendly as between the end of start and the beginning of finishWithSomething, there are no references to the object, so it may be collected. There must be references to it; otherwise how would that object's methods get