[Ann] DMG Canvas

2008-04-22 Thread Seth Willits
Greetings Cocoa Heads, Off topic, I admit, but y'all being fellow Cocoa developers, and having specifically written the app for us, I thought it fitting to post here. http://www.araelium.com/dmgcanvas/ Short and sweet, -- Seth Willits ___

problem getting main bundle inside initWithCoder:

2008-04-22 Thread Nick Rogers
hi, here's my initWithCoder: method:- This method is for a class other then AppController. - (id)initWithCoder:(NSCoder *)coder { if ((self = [super init]) != nil) { [self setPath:[coder decodeObjectForKey:@"path"]]; [self setModel:[coder decodeObje

Re: problem getting main bundle inside initWithCoder:

2008-04-22 Thread stephen joseph butler
On Tue, Apr 22, 2008 at 3:35 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: >// The last parameter is the name of a ".strings" file that > contains the localised prompts >// for any custom rights that we use. >CFStringRef bundleID = > CFBundleGetIdentifi

Re: [Ann] DMG Canvas

2008-04-22 Thread Scott Anguish
On Apr 22, 2008, at 3:00 AM, Seth Willits wrote: Greetings Cocoa Heads, Off topic, I admit, but y'all being fellow Cocoa developers, and having specifically written the app for us, I thought it fitting to post here. http://www.araelium.com/dmgcanvas/ Definitely _not_ off topic. Applic

Re: Callbacks from IOKit

2008-04-22 Thread Florent Pillet
Rick Mann wrote: I'm doing some stuff with USB, and the example code I'm using uses IOServiceAddMatchingNotification() to add a pointer to a C callback to get notified when things happen on the USB bus. In C++, one typically uses the refcon parameter in these APIs to pass a pointer to the C++

Re: Programmatically placing an item in the dock

2008-04-22 Thread Mike Abdullah
Quite simply there is no public API to control the dock. The closest (and hacky) solution is to modify the dock's plist and restart it. Mike. On 22 Apr 2008, at 07:02, Oliver Wagner wrote: Hi everyone, I would like to add and remove an item in the dock (preferably with a nice poof when re

Re: NSCollectionView and CoreData question

2008-04-22 Thread I. Savant
What I currently have is a core data store that holds information I want to display in an NSCollectionView. What I'm wondering is whether there is a way to get this accomplished and if so how? Yes, as described in the NSCollectionView documentation and the Leopard release notes. Hint: "bi

Using OSMemoryBarrier() with KVO

2008-04-22 Thread Paul Thomas
Hi, I'm trying to implement a basic promise variable and I'm not sure if OSMemoryBarrier() is enough to make it correct. If anyone is familiar with the memory model, I'd appreciate a quick look-over. It's basically like this: { BOOL done; id result; NSError* error; NSExcept

Carriage returns and NSXMLParser

2008-04-22 Thread Brad Peterson
Hi, Have there been any recent changes to NSXMLParser with respect to carriage returns? I haven't noticed it previously, but I'm suddenly seeing a lot of cases where carriage returns embedded in data are returned as spaces by the parser. That is: Is read in as if it were: I know that whitesp

Re: NSCollectionView and CoreData question

2008-04-22 Thread Matthew Delves
On 22/04/2008, at 9:13 PM, I. Savant wrote: What I currently have is a core data store that holds information I want to display in an NSCollectionView. What I'm wondering is whether there is a way to get this accomplished and if so how? Yes, as described in the NSCollectionView documentat

properties implementation

2008-04-22 Thread Optical Ali
Hi, Is there a way to know how the compiler synthesized a property? For example, property(copy) NSSttring *str; AND @synthesize str; Will produce -(NSString) str{ return str; } OR -(NSString) str{ return [[str retain] autorelease]; } ? These two can change the behavior of the program

Re: properties implementation

2008-04-22 Thread Michael Vannorsdel
I believe if you use the nonatomic attribute it will be the first example, for atomic it's the second. Atomic is the default if not specified. On Apr 22, 2008, at 6:49 AM, Optical Ali wrote: Hi, Is there a way to know how the compiler synthesized a property? For example, property(copy)

Re: NSCollectionView and CoreData question

2008-04-22 Thread I. Savant
> Having set the 'content' binding to the arrangedObjects key in IB didn't > produce a result though doing it programmatically has. Not sure why this > would be. It depends. Since you have provided neither the exact bindings settings you're using nor the code you used to establish the binding m

[NSMoveHelper _doAnimation] causes beachball of death

2008-04-22 Thread Matthias Schonder
Hi, first I have to apologise that my information is very vague, but the crash happens in an Application and till today I was not able to create an demo-app to show this crash. The Application hangs when an Animation in a NSWindow happens. For Example NSWindow - (void)setFrame:(NSRect)win

Re: Truncated Table Headers

2008-04-22 Thread Jens Alfke
On 21 Apr '08, at 9:14 PM, Jason Barker wrote: When I test the interface in Interface Builder as well as building and running the project in Xcode, I notice that the column names get cut off towards the end by about 15 pixels for single-word column names or just the last word is removed for

Re: [Ann] DMG Canvas

2008-04-22 Thread Jens Alfke
This looks very cool! But for the benefit of those of us who hate the use of DMGs for software downloads*, would it be possible to add an option to create a ZIP file instead? —Jens * Because the user then has to unmount the disk image after copying the app; and because way too many naive

Font-related crash in drawing method on PowerPC machines

2008-04-22 Thread Justin Williams
Hi, I'm running into an odd crasher on PowerPC machines. I have a custom NSView called TYCurrentDayView that draws an nsmutableattributedstring on top of a gradient. On a few instances, I will receive the following crash: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTI

Re: properties implementation

2008-04-22 Thread Jens Alfke
On 22 Apr '08, at 6:38 AM, Michael Vannorsdel wrote: I believe if you use the nonatomic attribute it will be the first example, for atomic it's the second. Atomic is the default if not specified. And atomic setters are even more complicated, as they incorporate a lock, to avoid race con

Re: [Ann] DMG Canvas

2008-04-22 Thread I. Savant
> * Because the user then has to unmount the disk image after copying the > app; and because way too many naive users don't understand what a "disk > image" is, and run the app right from the DMG, which works fine until the > next time they reboot or log in ... and then suddenly "OMG all the apps

Re: Font-related crash in drawing method on PowerPC machines

2008-04-22 Thread I. Savant
> I'm running into an odd crasher on PowerPC machines. I have a custom > NSView called TYCurrentDayView that draws an nsmutableattributedstring > on top of a gradient. On a few instances, I will receive the > following crash: I haven't looked at this in detail and don't know if this has a

Calling NSNumber class methods on NSDecimalNumber

2008-04-22 Thread Dave Camp
After some testing, it appears that calling NSDecimalNumber with class methods of it's NSNumber parent class return the expected NSDecimalNumber object. For example, [[NSDecimalNumber numberWithDouble:1.1] isKindOfClass:[NSDecimalNumber class]] returns YES (and the resulting object has the

Re: [Ann] DMG Canvas

2008-04-22 Thread j o a r
First off: The app looks great from your screenshots! Well done! On Apr 22, 2008, at 8:05 AM, Jens Alfke wrote: * Because the user then has to unmount the disk image after copying the app; and because way too many naive users don't understand what a "disk image" is, and run the app right fro

Re: properties implementation

2008-04-22 Thread mmalc crawford
On Apr 22, 2008, at 5:49 AM, Optical Ali wrote: Is there a way to know how the compiler synthesized a property? mmalc __

NSButton "reveals" keyboard shortuct

2008-04-22 Thread Pierre Bernard
Hi! I love how the buttons in some "save before closing" sheets reveal themselves by being added to the button name when the command key is held for a while. The one example I can think of is AppleWorks 6. Wish all apps / buttons had that. Is this a Carbon thing? How would I go about to

Re: NSTableView -editColumn:row:withEvent:select: question

2008-04-22 Thread Corbin Dunn
On Apr 21, 2008, at 10:43 AM, John Stiles wrote: Corbin Dunn wrote: On Apr 18, 2008, at 3:37 PM, John Stiles wrote: Ben Lachman wrote: > Well, you should be able to just override the drawing code, since > thats really your problem. Going directly against the docs, while it > may work fi

Re: Consistent Contextual Menu in NSTableview

2008-04-22 Thread Corbin Dunn
And to elaborate further, the DragNDropOutlineView demo app on Leopard has sample code for how to do it. corbin On Apr 21, 2008, at 1:37 PM, Nate Weaver wrote: I would probably override -menuForEvent: instead of -rightMouseDown: . Leopard also has a bit nicer contextual menu handing for table

SOLVED: Truncated Table Headers

2008-04-22 Thread Jason Barker
Thanks for that explanation. The smaller columns where this truncating behavior is exhibited do not need to have sort descriptors created so I just unchecked the "Creates Sort Descriptor" option. Thanks again for your help! Jason On Tue, Apr 22, 2008 at 9:00 AM, Jens Alfke <[EMAIL PROTECTED]> wr

Re: Programmatically placing an item in the dock

2008-04-22 Thread John Stiles
This "solution" will also kill all the user's Dashboard widgets, so it's not to be taken lightly. Mike Abdullah wrote: Quite simply there is no public API to control the dock. The closest (and hacky) solution is to modify the dock's plist and restart it. Mike. On 22 Apr 2008, at 07:02, Oliv

Re: Calling NSNumber class methods on NSDecimalNumber

2008-04-22 Thread Jens Alfke
On 22 Apr '08, at 8:19 AM, Dave Camp wrote: The problem is that I get the warning "initialization from distinct Objective-C type" when I do this, because the NSNumber class methods return a specific type instead of id. It's safe; you'll just need to cast the return value to (NSDecimalNum

Re: Programmatically placing an item in the dock

2008-04-22 Thread Oliver Wagner
I know what I'm wanting to do used to be possible (link is from 2002), so I wasn't sure if it had migrated over to 10.5 http://developer.apple.com/adcnews/pastissues/devnews110102.html (search for CFPrefDockItems) Ollie On Apr 22, 2008, at 9:51 AM, John Stiles wrote: This "solution" will

AppleScript - occasional crashes on Leopard

2008-04-22 Thread Steve Cronin
Folks; I've seen some inconsistent behavior on AppleScript running under Leopard. Here's an example: ... NSString *theScript =@"some valid dynamic script text" NSDictionary *errorDict = [NSDictionary dictionary]; NSAppleScript *appleScriptObject = [[NSAppleScript alloc] ini

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Nick Zitzmann
On Apr 22, 2008, at 11:47 AM, Steve Cronin wrote: will OCCASIONALLY crash at the NSAppleEventDescriptor specification: Are you using NSAppleScript in the main thread? The only time I've ever seen compiling a script crash was when it was not running in the main thread. Nick Zitzmann

Re: [Ann] DMG Canvas

2008-04-22 Thread John Joyce
Is there a way using this tool or even programmatically, to have disk images mount without having the collapsed toolbar? The biggest user confusion I see is that they do not even recognize it to be a window since most users don't even know what that capsule shaped button does. There is defi

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Michael Watson
Sounds like you're using NSAppleScript from a non-main thread, which will result in random crashes like that. NSAppleScript is only designed to work from the main thread. -- m-s On 22 Apr, 2008, at 13:47, Steve Cronin wrote: Folks; I've seen some inconsistent behavior on AppleScript runni

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Steve Cronin
NO threading involved here. Just straight up Cocoa code... Do you know enough about AS internals to read the stack trace and KNOW that the error is during compilation? If so, why is the error not being propagated back thru errorDict? And the biggest mystery (to me anyway) why only sometimes?

Re: [Ann] DMG Canvas

2008-04-22 Thread Seth Willits
On Apr 22, 2008, at 8:23 AM, j o a r wrote: Technically I guess that the backgrounds and stuff is just Finder folder configuration, but for it to "work" the folder would have to automatically open, and I don't think you can make Safari (or the other browsers) do that for you when it comes t

Re: [Ann] DMG Canvas

2008-04-22 Thread Sean McBride
On 4/22/08 12:00 AM, Seth Willits said: >Off topic, I admit, but y'all being fellow Cocoa developers, and >having specifically written the app for us, I thought it fitting to >post here. >http://www.araelium.com/dmgcanvas/ Looks nice. Care to comment why a FileStorm user might want to switch? :)

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Michael Watson
For reference, you're not supposed to pass a pointer to a valid NSDictionary object in -executeAndReturnError:, you're supposed to pass a pointer to an NSDictionary pointer variable. On return, if there were errors encountered, errorDict will be a valid NSDictionary object. -- m-s On 22

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Bill Cheeseman
on 2008-04-22 2:31 PM, Steve Cronin at [EMAIL PROTECTED] wrote: > NO threading involved here. > Just straight up Cocoa code... Bear in mind that running a script via NSAppleScript (or the corresponding method in OSAKit) on a machine that has Unsanity's Application Enhancer (APE) installed automat

Re: [Ann] DMG Canvas

2008-04-22 Thread Alex Curylo
On 22-Apr-08, at 12:03 PM, [EMAIL PROTECTED] wrote: Looks nice. Care to comment why a FileStorm user might want to switch? :) Because I keep running into annoying bugs in FileStorm's AppleScript implementation, and the dmgcanvas command line tool might integrate into my workflow better

GUI Time Field

2008-04-22 Thread Justin Giboney
I am trying to put a automatic date and time field into my GUI. I have a text field connected to a variable called "theDateTime" in my controller class. If I set the variable manually the text field works just fine. But I want it to update automatically. My code is attached. Thank you Just

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Mark Piccirelli
Is this a garbage-collected app? If so the crash is a known bug. -- Mark On Apr 22, 2008, at 10:47 AM, Steve Cronin wrote: Folks; I've seen some inconsistent behavior on AppleScript running under Leopard. Here's an example: ... NSString *theScript =@

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Michael Watson
Mark, So GC + NSAppleScript == avoid for now? -- m-s On 22 Apr, 2008, at 15:53, Mark Piccirelli wrote: Is this a garbage-collected app? If so the crash is a known bug. -- Mark On Apr 22, 2008, at 10:47 AM, Steve Cronin wrote: Folks; I've seen some inconsist

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Mark Piccirelli
Yes. But we intend to fix it in a software update. (And I can't say anything more specific than that. A fix isn't a fix until it's shipped.) -- Mark On Apr 22, 2008, at 1:01 PM, Michael Watson wrote: Mark, So GC + NSAppleScript == avoid for now? -- m-s On

Re: AppleScript - occasional crashes on Leopard

2008-04-22 Thread Steve Cronin
Mark; 10 months after the first Leopard seed to developers, 6 months after commercial release, and after 2 system updates to the commercial product, the message to developers using ANY AppleScript in Cocoa is: "No Garbage Collection for you!" Perhaps you can try and understand how this might be

Re: GUI Time Field

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 12:34 PM, Justin Giboney <[EMAIL PROTECTED]> wrote: > I am trying to put a automatic date and time field into my GUI. Why not simply use an NSTimer that fires every 0.5 seconds. No reason to startup a secondary thread. -Shawn ___

Re: GUI Time Field

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 12:34 PM, Justin Giboney <[EMAIL PROTECTED]> wrote: > I am trying to put a automatic date and time field into my GUI. > > I have a text field connected to a variable called "theDateTime" in my > controller class. If I set the variable manually the text field works just > fi

Problems with [NSArray count]

2008-04-22 Thread Peter Browne
Hi, I'm returning to Cocoa after quite a long break, and it seems that I'm a little rusty... All I want to do is find out the number of items in an NSArray and store that as a variable, which I can then find the square root of. The docs tell me that [NSArray count] returns an NSUInteger,

Re: Problems with [NSArray count]

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 2:03 PM, Peter Browne <[EMAIL PROTECTED]> wrote: > Hi, > > I'm returning to Cocoa after quite a long break, and it seems that I'm a > little rusty... > > All I want to do is find out the number of items in an NSArray and store > that as a variable, which I can then find th

Re: Problems with [NSArray count]

2008-04-22 Thread David Duncan
On Apr 22, 2008, at 2:03 PM, Peter Browne wrote: I'm returning to Cocoa after quite a long break, and it seems that I'm a little rusty... All I want to do is find out the number of items in an NSArray and store that as a variable, which I can then find the square root of. The docs tell me

Re: Problems with [NSArray count]

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 2:10 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > On Tue, Apr 22, 2008 at 2:03 PM, Peter Browne > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm returning to Cocoa after quite a long break, and it seems that I'm a > > little rusty... > > > > All I want to do is f

Re: Problems with [NSArray count]

2008-04-22 Thread Andy Lee
On Apr 22, 2008, at 5:03 PM, Peter Browne wrote: The docs tell me that [NSArray count] returns an NSUInteger, but exactly WHAT one of these is, or how I use it is baffling me. You could do a search using the built-in documentation browser in Xcode (it's in the Help menu). Alternatively, Goo

Re: NSTextfields and keyboard equivalents - am I missing something?

2008-04-22 Thread Mattias Arrelid
On Mon, Apr 21, 2008 at 7:05 PM, John Stiles <[EMAIL PROTECTED]> wrote: > In "The Path Of Key Events" in the URL you posted, the #1 item in the list > is "key equivalents." > AppKit checks keyDown events to see if command is held; if it is, it tries > to match it against the menus before passing i

Saving NSTextView data to CoreData without ending editing

2008-04-22 Thread Mike Manzano
I have an application that periodically needs to save content contained in an NSTextView. The text view is bound to a Core Data managed object. Currently, I am ending editing on the text view to force it to save its contents into the store. However, since I'm doing it automatically on a tim

Re: Problems with [NSArray count]

2008-04-22 Thread Peter Browne
On 22 Apr 2008, at 22:15, David Duncan wrote: On Apr 22, 2008, at 2:03 PM, Peter Browne wrote: I'm returning to Cocoa after quite a long break, and it seems that I'm a little rusty... All I want to do is find out the number of items in an NSArray and store that as a variable, which I can

Re: NSTextfields and keyboard equivalents - am I missing something?

2008-04-22 Thread John Stiles
Mattias Arrelid wrote: On Mon, Apr 21, 2008 at 7:05 PM, John Stiles <[EMAIL PROTECTED]> wrote: In "The Path Of Key Events" in the URL you posted, the #1 item in the list is "key equivalents." AppKit checks keyDown events to see if command is held; if it is, it tries to match it against the

Re: Problems with [NSArray count]

2008-04-22 Thread Hamish Allan
On Tue, Apr 22, 2008 at 11:45 PM, Peter Browne <[EMAIL PROTECTED]> wrote: > The process followed is: ... > 2) myArray then grabs this data (a bunch of numbers) using NSArray's > -componentsSeparatedByString: You haven't told us where "myArray" comes from in the first place... Hamish __

Re: [Ann] DMG Canvas

2008-04-22 Thread Ricky Sharp
On Apr 22, 2008, at 2:00 AM, Seth Willits wrote: Off topic, I admit, but y'all being fellow Cocoa developers, and having specifically written the app for us, I thought it fitting to post here. http://www.araelium.com/dmgcanvas/ Where was this a few months ago? :) I'll have to check this

Re: Problems with [NSArray count]

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 2:45 PM, Peter Browne <[EMAIL PROTECTED]> wrote: > I'm getting an "EXC_BAD_ACCESS" error. > > I've since managed to solve the problem by inserting a > > [myArray retain]; > > but I'm not entirely sure WHY this fixed it... > > The process followed is: > > 1) the myCont

Re: Using OSMemoryBarrier() with KVO

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 4:37 AM, Paul Thomas <[EMAIL PROTECTED]> wrote: > Is this enough? Or will I need to use a full blown lock? Yes and no... 1) KVO and multiple thread gets ugly quick, 2) using NSCondition/Lock may make more sense, 3) using just a volatile BOOL could be enough depending on h

NSString memory management question

2008-04-22 Thread Rick Mann
I wrote a routine that creates a CFStringRef from some USB calls. I use it like this: NSString* s = (NSString*) createStringDescriptor(dev, stringIndex); [mSerialNumberDisplay setStringValue: [s lowercaseString]]; [s release]; Two main questions: am I right to release

Re: GUI Time Field

2008-04-22 Thread Justin Giboney
Thank you for response, I hope I have improved my code. I am binding my text field to the variable "theDateTime." I know this works because if I uncomment the commented line, I can see the date and time. The problem is that the UI isn't updating. Thanks again. Justin Giboney #import "Co

Re: GUI Time Field

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 3:24 PM, Justin Giboney <[EMAIL PROTECTED]> wrote: > Thank you for response, I hope I have improved my code. The setter isn't doing the proper memory management. Review the following...

Re: NSString memory management question

2008-04-22 Thread Shawn Erickson
On Tue, Apr 22, 2008 at 3:25 PM, Rick Mann <[EMAIL PROTECTED]> wrote: > I wrote a routine that creates a CFStringRef from some USB calls. I use it > like this: > > NSString* s = (NSString*) createStringDescriptor(dev, stringIndex); > [mSerialNumberDisplay setStringValue: [s lowercas

Re: NSString memory management question

2008-04-22 Thread Rick Mann
On Apr 22, 2008, at 3:51 PM, Shawn Erickson wrote: We don't know how you created the CFStringRef so we cannot say. The answer depends on the create/get rule of the Core Foundation method you used. Additionally it depends on the contract you want to present to clients for the createStringDescrip

Re: Problems with [NSArray count]

2008-04-22 Thread David Duncan
On Apr 22, 2008, at 2:45 PM, Peter Browne wrote: The process followed is: 1) the myController object acquires data from a text file, using NSString's -stringWithContentsOfFile:encoding:error 2) myArray then grabs this data (a bunch of numbers) using NSArray's -componentsSeparatedByString: 3

[ANN] TransactionKit, Lockless Multi-Reader, Multi-Writer Transaction Capable Hash Tables

2008-04-22 Thread John Engelhart
All, I've recently released the first version of TransactionKit, which is made of two main components: The core library, and a Foundation compatibility API layer. Homepage: http://transactionkit.sourceforge.net/ Documentation: http://transactionkit.sourceforge.net/Documentation/index.html S

Re: NSString memory management question

2008-04-22 Thread Uli Kusterer
Am 23.04.2008 um 00:25 schrieb Rick Mann: I wrote a routine that creates a CFStringRef from some USB calls. I use it like this: NSString* s = (NSString*) createStringDescriptor(dev, stringIndex); [mSerialNumberDisplay setStringValue: [s lowercaseString]]; [s release];

Master-Detail binding in User Defaults

2008-04-22 Thread Steve Nicholson
I'm trying to set up a Master-Detail binding with User Defaults under OS X 10.4.11. It is correctly reading values I manually put into the Preferences file. I can select different items in the table and the detail items display the correct information, but no changes are written to the file

Re: NSString memory management question

2008-04-22 Thread Rick Mann
On Apr 22, 2008, at 5:46 PM, Uli Kusterer wrote: But apart from that, the rules in the CoreFoundation docs apply, so assuming you're using a CFStringCreateXXX call, yes, you should release this string. Yeah, I was fairly sure about that one, it was the NSString - lowercaseString I wasn't

Re: Using OSMemoryBarrier() with KVO

2008-04-22 Thread Ken Thomases
On Apr 22, 2008, at 6:37 AM, Paul Thomas wrote: I'm trying to implement a basic promise variable and I'm not sure if OSMemoryBarrier() is enough to make it correct. If anyone is familiar with the memory model, I'd appreciate a quick look-over. It's basically like this: { BOOL done; id

"Safe" frameworks for privileged tools?

2008-04-22 Thread Michael Watson
Hey all, I'm writing a privileged helper tool that at one point needs to determine if a given directory is a package. Normally, I'd use NSWorkspace, but that's part of AppKit, which is tied to Window Server. I don't link to AppKit in my privileged tool, so I don't get the oh-so-convenvien

NSArrayController vs NSImage sort indicator image

2008-04-22 Thread Greg Hoover
Has anyone noticed that the image NSArrayController puts in the header of a table column looks different than the one retrieved by [NSImage imageNamed: @"NSAscendingSortIndicator"] -- the NSArrayController image looks sharper and aligns vertically centered to the header. Greg __

Re: "Safe" frameworks for privileged tools?

2008-04-22 Thread stephen joseph butler
On Tue, Apr 22, 2008 at 10:52 PM, Michael Watson <[EMAIL PROTECTED]> wrote: > I would like to use LaunchServices for this, but wasn't sure if it was > kosher to link to ApplicationServices.framework from a privileged tool. Are > there guidelines as to which frameworks should and shouldn't be used

How to create shortcuts after installing the my package

2008-04-22 Thread JanakiRam
Hi All, I'm porting a windows based application to Mac OS X. My application in windows will create desktop shortcut once we install. I really don't whether its mac standard to create desktop shortcut and dock icon once i install my cocoa application. Can any one suggest me whether its a sta

Re: How to create shortcuts after installing the my package

2008-04-22 Thread Michael Watson
It's not standard practice on the Mac, and most will probably agree that it's not something your application should be doing. It's a presumptuous invasion of the user's desktop space, and most Mac users are very protective of that. -- m-s On 23 Apr, 2008, at 00:53, JanakiRam wrote: Hi Al

How to retain Previous content view in cocoa

2008-04-22 Thread KATHERASALA KALPANA
___ 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 cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/

Re: How to create shortcuts after installing the my package

2008-04-22 Thread Michael Vannorsdel
Generally this goes against accepted Mac OS guidelines. But I understand you might not have a choice. What you can do is either use FSNewAlias to make an alias (shortcuts on Mac, will require you to learn how Carbon file management works), or use the ln command line tool to make a symboli

Re: How to create shortcuts after installing the my package

2008-04-22 Thread Jens Alfke
On 22 Apr '08, at 9:53 PM, JanakiRam wrote: I'm porting a windows based application to Mac OS X. My application in windows will create desktop shortcut once we install. I really don't whether its mac standard to create desktop shortcut and dock icon once i install my cocoa application.

Resource Fork - is this a good use/the right thing to do?

2008-04-22 Thread Daniel DeCovnick
I'm writing an application that opens particular kinds of files, parses them, displays an editable graphical representation of the contents of a file, and saves the results of the changes to the file. However, some graphical changes don't result in changes to the original file, yet those ch

Re: How to create shortcuts after installing the my package

2008-04-22 Thread Ron Fleckner
On 23/04/2008, at 2:53 PM, JanakiRam wrote: Hi All, I'm porting a windows based application to Mac OS X. My application in windows will create desktop shortcut once we install. I really don't whether its mac standard to create desktop shortcut and dock icon once i install my cocoa ap

Re: Font-related crash in drawing method on PowerPC machines

2008-04-22 Thread Rob Keniger
On 23/04/2008, at 1:16 AM, I. Savant wrote: I haven't looked at this in detail and don't know if this has anything to do with your problem, but how are you handling the case where the user has disabled or otherwise modified their fonts? Even system fonts can be screwed with and if the font is

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-22 Thread Jens Alfke
On 22 Apr '08, at 10:21 PM, Daniel DeCovnick wrote: Through a lot of thought experiments, I've come to the conclusion that the best place to save this sort of thing would be in the resource fork of the file being opened, but I could be totally off the mark there, and it's certainly an unor

Targeting nil in Interface Builder menu item

2008-04-22 Thread Rick Mann
I have an Import command in my File menu that can apply to both the current document, and the app as a whole. I want it to send the - import action to the main window's document first, and if that doesn't exist, send it to the app. This seems like an application of an action sent to a nil re

Re: Targeting nil in Interface Builder menu item

2008-04-22 Thread Graham Cox
Just ctrl-drag the link between the item and the "first responder" object in the nib main window. First responder stands for nil. hth, G. On 23 Apr 2008, at 4:08 pm, Rick Mann wrote: I have an Import command in my File menu that can apply to both the current document, and the app as a whol

Re: "Safe" frameworks for privileged tools?

2008-04-22 Thread Michael Watson
That's a good table to know/have handy. Thanks. Okay, so LaunchServices is out as well. Is there *any* reliable way to know if a directory is a bundle or package without using NSWorkspace or LaunchServices? (I'm also going to have to omit Spotlight, since I can't be guaranteed it's enabled

Re: Targeting nil in Interface Builder menu item

2008-04-22 Thread Rick Mann
On Apr 22, 2008, at 11:13 PM, Graham Cox wrote: Just ctrl-drag the link between the item and the "first responder" object in the nib main window. First responder stands for nil. Well, now, that was obvious. For some reason, I was fixated on "File's Owner," and I knew that wasn't right. I

Re: "Safe" frameworks for privileged tools?

2008-04-22 Thread Kevin Grant
Does the target directory require privilege to see, or does it just happen to be used by a privileged tool? If the latter, you could always rely on a 2nd executable (without privilege) to examine the directory and return its results to your privileged program. Kevin G. That's a good table to

Re: "Safe" frameworks for privileged tools?

2008-04-22 Thread Michael Watson
That's the hang-up. The target directory may require privilege to see. -- m-s On 23 Apr, 2008, at 02:42, Kevin Grant wrote: Does the target directory require privilege to see, or does it just happen to be used by a privileged tool? If the latter, you could always rely on a 2nd executable (wit

Inserting my own Responder before App?

2008-04-22 Thread Rick Mann
I've got a subclass of NSWindowController (a singleton in my app) inserted after the NSApplication in the responder chain, but is there any way for it to be the last responder before the app, such that Cocoa automatically makes things point first to my responder and then I can pass things o

Re: Targeting nil in Interface Builder menu item

2008-04-22 Thread Graham Cox
On 23 Apr 2008, at 4:36 pm, Rick Mann wrote: Well, now, that was obvious. For some reason, I was fixated on "File's Owner," and I knew that wasn't right. I *knew* there was a First Responder object in there, but it just wasn't registering. Round these parts they call that a "brainfart". Hap