Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9

2008-03-25 Thread Greg Parker
Jerry Krinock wrote: Now, please understand that I'm not sure whether or not it's kosher to add +initialize in a category on a Cocoa class Don't add +initialize in a category. The category's method will replace any present in the original class, which could break that class. However, I don

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread mmalc crawford
On Mar 25, 2008, at 4:28 PM, Jack Repenning wrote: On Mar 25, 2008, at 4:02 PM, Rob Napier wrote: I was thinking If people will read nothing but "Practical Memory Management" (the page afte

Re: Best practice for overridden initializers in subclasses

2008-03-25 Thread Andy Lee
On Mar 25, 2008, at 8:09 PM, Quincey Morris wrote: On Mar 25, 2008, at 16:26, Andy Lee wrote: - (id)init { NSLog(@"%@ -- '%@' is not the designated initializer", [self class], NSStringFromSelector(_cmd)); [self release]; return nil; } Unless there is some special runtime magic

Re: outlineViewSelectionDidChange not called

2008-03-25 Thread Adam Gerson
I take that back. [outlineView selectedRow] does appear to tell the absolute truth. So I should now be able to try what you said and tie the tree controller's @"selectionIndexPaths" to [outlineView selectedRow]. I will report back my results... Adam On Tue, Mar 25, 2008 at 11:12 PM, Adam Gerson

NSOutlineView "sliding" animation

2008-03-25 Thread Mitchell Livingston
Hello, I want to use core animation to add a sliding effect when expanding/ collapsing rows in an outline view (like iChat's groups), but I can't figure out where to get started. I have tried using nsview's animator, but it doesn't seem to be compatible with this type of animation. Could s

Re: outlineViewSelectionDidChange not called

2008-03-25 Thread Adam Gerson
I think the big problem I am having is that an OutlineView doesn't always accurately update its index paths to match the selection the GUI is displaying. So I dont have accurate information to pass onto the tree controller. Adam On Tue, Mar 25, 2008 at 10:29 AM, Jonathan Dann <[EMAIL PROTECTED]>

Re: Ephemeral Changes

2008-03-25 Thread Sherm Pendley
On Tue, Mar 25, 2008 at 10:07 PM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: > > On 25 Mar 2008, at 23:12, Graham Cox wrote: > > There may be a simpler way, but this is what occurred to me when I > > read this: > > > > Subclass NSTextView and override -changeFont: -changeAttributes: > > and an

Re: Adding CalendarStore.framework changes managed object model version?

2008-03-25 Thread Brad Willoughby
Thanks, Melissa. That was it. It looks like the template code generated by XCode in our AppDelegate from 2006 had this line: managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles: [allBundles allObjects]] retain]; Since we're using Leopard and Garbage Collection, I've change

Re: Ephemeral Changes

2008-03-25 Thread Gerriet M. Denkmann
On 25 Mar 2008, at 23:12, Graham Cox wrote: There may be a simpler way, but this is what occurred to me when I read this: Subclass NSTextView and override -changeFont: -changeAttributes: and any other "ephemeral" method. Turn off the undo manager using - disableUndoRegistration, call super

Re: Adding CalendarStore.framework changes managed object model version?

2008-03-25 Thread Melissa J. Turner
Brad - At a guess, you're somehow pulling in CalendarStore.calmom into your model. This might happen if you're doing [NSManagedObjectModel mergedModelFromBundles: [NSBundle allBundles]], which is declared dangerous for just this reason. +Melissa On Mar 25, 2008, at 17:56, Brad Willoughby

Re: Adding CalendarStore.framework changes managed object model version?

2008-03-25 Thread Andrew Farmer
On 25 Mar 08, at 17:56, Brad Willoughby wrote: When I add /System/Library/Frameworks/CalendarStore.framework to my Leopard Core Data application in XCode 3.0 and click Build & Run, I get the following error: "The managed object model version used to open the persistent store is incompatibl

Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9

2008-03-25 Thread Jerry Krinock
An off-list respondent suggested that possibly Panther is not correctly initializing the NSString category in my framework into the NSString class. I added a +initialize method to my category, and got a strange result which might give someone a clue... @implementation NSString (Crash) + (

Adding CalendarStore.framework changes managed object model version?

2008-03-25 Thread Brad Willoughby
When I add /System/Library/Frameworks/CalendarStore.framework to my Leopard Core Data application in XCode 3.0 and click Build & Run, I get the following error: "The managed object model version used to open the persistent store is incompatible with the one that was used to create the persi

Re: Appropriate interface element for representing a dropped file

2008-03-25 Thread Mike Abdullah
On 25 Mar 2008, at 19:06, has wrote: Evan Chaney wrote: I am writing an AppleScript Studio application that is a front-end for the ditto command. I would like the main application window to have two drag and drop targets where the user can drop a source folder and a destination folder. Each t

Re: Source list using bindings?

2008-03-25 Thread Hamish Allan
Hi Jon, On Tue, Mar 25, 2008 at 9:49 PM, Jonathan Dann <[EMAIL PROTECTED]> wrote: > As of 10.5 it's the Apple-sanctioned way to go! I've used it for ages > now, no problems at all. The tree node is a proxy for whatever 'real' > item you add to the tree. I just wondered why it was NSTreeContr

Re: Best practice for overridden initializers in subclasses

2008-03-25 Thread Chris Suter
On 26/03/2008, at 11:09 AM, Quincey Morris wrote: Unless there is some special runtime magic going on, this seems not absolutely safe. Your '[self release]' is going to eventually lead to a call of '[super dealloc]' and theoretically you can't safely call the superclass's dealloc if you ha

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Erik Buck
We have been asked not to paraphrase or restate the memory management rules in this forum because slight inaccuracies, imprecisions, misstatements, or just idiocy confuses people. Here is a quote: From file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.doc

Re: Best practice for overridden initializers in subclasses

2008-03-25 Thread Quincey Morris
On Mar 25, 2008, at 16:26, Andy Lee wrote: A similar question was asked recently. To paraphrase (and slightly correct) my reply: I do essentially this: - (id)init { NSLog(@"%@ -- '%@' is not the designated initializer", [self class], NSStringFromSelector(_cmd)); [self r

Re: Disabling NSTableView's text cell wrap-around tool tip?

2008-03-25 Thread Kyle Sluder
On Tue, Mar 25, 2008 at 4:46 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > At some point in time (probably 10.5), a new feature was added to > NSTableView where mousing over a row & column that displays more than > one line of text throws up a table view containing all of the row & > column's

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread colo
> > I'll make a compromise with you. :-) > > I'll let you try one... just one... RubyCocoa application before you > start looking at Objective-C. Start here: > > > http://developer.apple.com/documentation/Cocoa/Conceptual/RubyPythonCocoa/Articles/BuildingRubyCocoaAppl.html#/ > /apple_ref/doc

Re: Best practice for overridden initializers in subclasses

2008-03-25 Thread Kyle Sluder
On Tue, Mar 25, 2008 at 6:01 PM, Andy Klepack <[EMAIL PROTECTED]> wrote: > Anyone have a recommendation for the best practice in this case? Throw an exception. There's really nothing you can do at this point. --Kyle Sluder ___ Cocoa-dev mailing list

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Jack Repenning
On Mar 25, 2008, at 4:02 PM, Rob Napier wrote: On Tue, Mar 25, 2008 at 6:15 PM, Randall Meadows <[EMAIL PROTECTED] pc.com> wrote: I was thinking < http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/ObjectOwnership.html#/ /apple_ref/doc/uid/2043 . If people

Re: Best practice for overridden initializers in subclasses

2008-03-25 Thread Andy Lee
A similar question was asked recently. To paraphrase (and slightly correct) my reply: I do essentially this: - (id)init { NSLog(@"%@ -- '%@' is not the designated initializer", [self class], NSStringFromSelector(_cmd)); [self release]; return nil; } You can imagine

Re: Best practice for overridden initializers in subclasses

2008-03-25 Thread Quincey Morris
On Mar 25, 2008, at 15:01, Andy Klepack wrote: I have a subclass of NSObject that provides its own designated initializer that allows client code to configure an instance with initial values. Instances of the class itself are immutable. At the same time, instances where no initial values a

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Rob Napier
On Tue, Mar 25, 2008 at 6:15 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > On Mar 25, 2008, at 4:07 PM, Nick Zitzmann wrote: > > > > On Mar 25, 2008, at 4:01 PM, Jack Repenning wrote: > >> On Mar 25, 2008, at 2:06 PM, Scott Ribe wrote: > >>> There's a *very* simple set of rules to follow regard

Re: How to delay application quit?

2008-03-25 Thread j o a r
On Mar 25, 2008, at 3:19 PM, James Hober wrote: On the other hand, the documentation for dealloc says: "Note that when an application terminates, objects may not be sent a dealloc message since the process’s memory is automatically cleared on exit—it is more efficient simply to allow the o

Re: How to delay application quit?

2008-03-25 Thread James Hober
On Mar 25, 2008, at 9:44 AM, j o a r wrote: I wouldn't recommend doing that. I'd suggest using something like this: - (void) dealloc { NSAssert(FALSE, @"Singleton objects should never be released"); [super dealloc]; } This communicates better what your intention is, and also

Re: NSArrayController, managedObjects and KVO

2008-03-25 Thread Eric Crichlow
On Tue, 25 Mar 2008 15:04:07 -0400, Brian Krisler wrote: > All I would like to do is get notified with the check box is > selected and have a way of determining with item was selected. Well then, all I do is connect the checkbox column in IB to an action method in my code. The method gets cal

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Randall Meadows
On Mar 25, 2008, at 4:07 PM, Nick Zitzmann wrote: On Mar 25, 2008, at 4:01 PM, Jack Repenning wrote: On Mar 25, 2008, at 2:06 PM, Scott Ribe wrote: There's a *very* simple set of rules to follow regarding retain/ release. Yes, but where are they documented? > I was thinking

Re: Ephemeral Changes

2008-03-25 Thread Graham Cox
There may be a simpler way, but this is what occurred to me when I read this: Subclass NSTextView and override -changeFont: -changeAttributes: and any other "ephemeral" method. Turn off the undo manager using - disableUndoRegistration, call super, then turn it back on again. Be warned I ha

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Paul Bruneau
On Mar 25, 2008, at 6:01 PM, Jack Repenning wrote: On Mar 25, 2008, at 2:06 PM, Scott Ribe wrote: There's a *very* simple set of rules to follow regarding retain/ release. Yes, but where are they documented? Or, if they're so simple, can you quote them here? Not to sound querulous, but

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Nick Zitzmann
On Mar 25, 2008, at 4:01 PM, Jack Repenning wrote: On Mar 25, 2008, at 2:06 PM, Scott Ribe wrote: There's a *very* simple set of rules to follow regarding retain/ release. Yes, but where are they documented? > Nick Zitzmann __

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Jack Repenning
On Mar 25, 2008, at 2:06 PM, Scott Ribe wrote: There's a *very* simple set of rules to follow regarding retain/ release. Yes, but where are they documented? Or, if they're so simple, can you quote them here? Not to sound querulous, but what I know of these very simple rules I picked up

Best practice for overridden initializers in subclasses

2008-03-25 Thread Andy Klepack
I have a subclass of NSObject that provides its own designated initializer that allows client code to configure an instance with initial values. Instances of the class itself are immutable. At the same time, instances where no initial values are supplied do not make conceptual sense. I'm wonder

Re: Source list using bindings?

2008-03-25 Thread Jonathan Dann
Ah, thanks. I wonder what the purpose of this subclass is and how fragile this solution? As of 10.5 it's the Apple-sanctioned way to go! I've used it for ages now, no problems at all. The tree node is a proxy for whatever 'real' item you add to the tree. You can also get the selectedNo

Re: Beginner with Cocoa

2008-03-25 Thread Bill Cheeseman
on 2008-03-25 4:57 PM, Scott Ribe at [EMAIL PROTECTED] wrote: > ...and the autorelease pool is pretty much unique. Actually, it is unique. Apple has several patents on it. Apple's Ali Ozer and Bertrand Serlet are credited as inventors, along with others. I read all of the patents a long time ago

Re: Perform selector on thread

2008-03-25 Thread Randall Meadows
On Mar 24, 2008, at 11:19 PM, Mike wrote: And that begs another question: How do I do what you mentioned but using the performSelector:withObject:afterDelay: variant? That method executes the given selector in the current thread; so, if you need something to run on the main thread after a

Re: Source list using bindings?

2008-03-25 Thread Hamish Allan
Hi Rob, On Tue, Mar 25, 2008 at 6:20 AM, Rob Keniger <[EMAIL PROTECTED]> wrote: > On 25/03/2008, at 11:42 AM, Hamish Allan wrote: > >> Is there any way to use bindings for a source list? The object that >> gets passed to the delegate method -outlineView:isGroupItem: is an >> NSTreeControllerTreeN

Re: Garbage collection - was Beginner with Cocoa

2008-03-25 Thread Scott Ribe
> Aside from that. Are there tutorials or some such for these Cocoa > Release ideals or will I cross them when I read the pdf ? There's a *very* simple set of rules to follow regarding retain/release. Newbies sometimes make it hard on themselves by doing extra work, rather than trying to follow th

Re: Beginner with Cocoa

2008-03-25 Thread Scott Ribe
> For the record, reference counting for memory management is one of the > oldest techniques in software and is not unique to Objective-C or > Cocoa. True, but slightly-deferred release is not common, and the autorelease pool is pretty much unique. And the uniqueness does throw newbies off. The au

Re: Perform selector on thread

2008-03-25 Thread Mike
And that begs another question: How do I do what you mentioned but using the performSelector:withObject:afterDelay: variant? Thanks, Mike Tony Becker wrote: Eddy: In response to your question, yes, it is necessary. It turns out that many things aren't "thread-safe". This means you

Disabling NSTableView's text cell wrap-around tool tip?

2008-03-25 Thread Nick Zitzmann
I checked the archives but didn't see anything. At some point in time (probably 10.5), a new feature was added to NSTableView where mousing over a row & column that displays more than one line of text throws up a table view containing all of the row & column's text. That's nice, but my ap

Re: Plug-in with Window

2008-03-25 Thread Sherm Pendley
On Tue, Mar 25, 2008 at 12:40 PM, Herr Thomas Bartelmess < [EMAIL PROTECTED]> wrote: > Hello List! > > I'm currently working on a Plugin (Cocoa Plugin Arcitecture). > Does somebody know, how I open a new Window, desigend in Interface > Bulider. > At the moment I open a new Window with by Code, wit

Re: NSArrayController, managedObjects and KVO

2008-03-25 Thread Quincey Morris
On Mar 25, 2008, at 12:04, Brian Krisler wrote: I have an NSArrayController in a NIB that contains Core Data Entities. The represented entity has a two values, a boolean and a name, and these are displayed in a table as a checkbox and text. (two columns). All I would like to do is get notified

Re: Plug-in with Window

2008-03-25 Thread Nick Zitzmann
On Mar 25, 2008, at 10:40 AM, Herr Thomas Bartelmess wrote: I'm currently working on a Plugin (Cocoa Plugin Arcitecture). Does somebody know, how I open a new Window, desigend in Interface Bulider. -makeKeyAndOrderFront:? Nick Zitzmann

Re: Invoke IKImageEditPanel for IKImageView without double click?

2008-03-25 Thread Jamie Phelps
Thanks, Glenn. This will also give me more control over the edit panel's initial position. The "for free" implementation from IKImageView puts it below the image view. In my GUI, that means it's off the screen. Thanks again, Jamie On Mar 25, 2008, at 3:15 PM, glenn andreas wrote: On Mar

Plug-in with Window

2008-03-25 Thread Herr Thomas Bartelmess
Hello List! I'm currently working on a Plugin (Cocoa Plugin Arcitecture). Does somebody know, how I open a new Window, desigend in Interface Bulider. At the moment I open a new Window with by Code, with a View by code Hope you unterstand my Problem.. Thanks a lot. Thomas Bartelmess __

Re: Invoke IKImageEditPanel for IKImageView without double click?

2008-03-25 Thread glenn andreas
On Mar 25, 2008, at 3:04 PM, Jamie Phelps wrote: Before I file this as a bug, I wanted to check with the list to see if there's something I'm missing. I have an IKImageBrowserView and I want to implement the -(void)imageBrowser:(IKImageBrowserView *)aBrowser cellWasDoubleClickedAtIndex:(N

Invoke IKImageEditPanel for IKImageView without double click?

2008-03-25 Thread Jamie Phelps
Before I file this as a bug, I wanted to check with the list to see if there's something I'm missing. I have an IKImageBrowserView and I want to implement the -(void)imageBrowser:(IKImageBrowserView *)aBrowser cellWasDoubleClickedAtIndex:(NSUInteger)index; delegate method to set the image

Re: Obtaining the foreground application's path

2008-03-25 Thread Matt Burnett
Thanks everyone, the NSWorkspace class will most likely work for me. I remember seeing it years ago but havent had a need to use it untill now. If it turns out to be a computationally expensive method then I will give the carbon way a try. On Mar 25, 2008, at 9:11 AM, Jean-Daniel Dupas wrot

Re: Appropriate interface element for representing a dropped file

2008-03-25 Thread has
Evan Chaney wrote: I am writing an AppleScript Studio application that is a front-end for the ditto command. I would like the main application window to have two drag and drop targets where the user can drop a source folder and a destination folder. Each target would then display the name and ic

NSArrayController, managedObjects and KVO

2008-03-25 Thread Brian Krisler
Hello All, I know this topic occurs often (I have searched the archive), but I am still confused. I have an NSArrayController in a NIB that contains Core Data Entities. The represented entity has a two values, a boolean and a name, and these are displayed in a table as a checkbox and text. (t

Re: Get root privileges with NSTask

2008-03-25 Thread Jean-Daniel Dupas
Apparently you neither listen what other people says, nor read basic info on technologie you are using, else you would have note that settings the MAGICK_HOME environment variable is enough to install ImageMagick in an other location. (took me less than 2 minutes to find this info on the

Ephemeral Changes

2008-03-25 Thread Gerriet M. Denkmann
I have a document based Cocoa editor, which handles simple text files (setRichText: NO). It handles undo and font changes. But the files are just plain text files; no font information gets stored. So I would like that the document does NOT get dirty (isDocumentEdited) if only the font h

Re: Issues implementing [NSArrayController replaceObjectsAtArrangedObjectIndexes: withObjects:]

2008-03-25 Thread Keary Suska
on 3/25/08 1:15 AM, [EMAIL PROTECTED] purportedly said: > Since NSArrayController does not have 'replace' functionality, I'm > trying to implement my own for performance reasons. Problem is, I > keep getting an exception when my code runs. Here is a code snippit: > > - (void) replaceObjectsAtAr

Re: Get root privileges with NSTask

2008-03-25 Thread Clark Cox
On Tue, Mar 25, 2008 at 10:58 AM, Mr. Gecko <[EMAIL PROTECTED]> wrote: > how about this code? If you're not going to listen to any of the answers that you get, why do you bother asking? -- Clark S. Cox III [EMAIL PROTECTED] ___ Cocoa-dev mailing list

Re: Get root privileges with NSTask

2008-03-25 Thread Mr. Gecko
how about this code? NSTask* download = [[NSTask alloc] init]; [download setLaunchPath:@"/usr/bin/curl"]; [download setCurrentDirectoryPath:@"/tmp/"]; [download setArguments: [NSArray arrayWithObjects:@"-O",@"http://www.imagemagick.org/download/binaries/ImageMagick-universal-apple-darwin8.11.0.tar

Re: Debugging an input manager that refuses to load

2008-03-25 Thread Michael Ash
On Tue, Mar 25, 2008 at 10:49 AM, Pat Homelvig <[EMAIL PROTECTED]> wrote: > I assumed you have looked at this article on them, right? > > http://developer.apple.com/releasenotes/Cocoa/AppKit.html#NSInputManager > > Maybe it will help. I have looked through all of that and everything seems to be as

Re: Bluetooth Question

2008-03-25 Thread Nick Zitzmann
On Mar 25, 2008, at 11:30 AM, Casey Becking wrote: I am trying to receive a signal from a box that has a bluetooth chip in it. can this be done with OSX, can i receive a hex value from anything i choose and if so how? Check out the documentation for the IOBluetooth class family. There's

Bluetooth Question

2008-03-25 Thread Casey Becking
I am trying to receive a signal from a box that has a bluetooth chip in it. can this be done with OSX, can i receive a hex value from anything i choose and if so how? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: Alternate row colors and selection

2008-03-25 Thread Cathy Shive
Hi Ivan, If you want all of the table views in your app to have the same special color scheme, the most reliable way to do this is by adding a category to NSColor and overriding the class method: + (NSArray *)controlAlternatingRowBackgroundColors; to return an array containing the two colors you

Appropriate interface element for representing a dropped file

2008-03-25 Thread Evan Chaney
Hello. I am writing an AppleScript Studio application that is a front-end for the ditto command. I would like the main application window to have two drag and drop targets where the user can drop a source folder and a destination folder. Each target would then display the name and icon of

Re: How to delay application quit?

2008-03-25 Thread j o a r
On Mar 25, 2008, at 9:26 AM, James Hober wrote: Do you write the dealloc anyway? Just wondering what others do. Personally I still write a dealloc method in a class for an object that I keep around for the life of the app. Then I preface it with a self-amusing comment: //actually this

Re: Convert kernel AbsoluteTime to a NSDate

2008-03-25 Thread David Duncan
On Mar 25, 2008, at 2:32 AM, Matt Burnett wrote: I really need to get it in to a NSDate. The big question here is Why? Without understanding what you want to do, it is unlikely that anyone will be able to help you. -- David Duncan Apple DTS Animation and Printing [EMAIL PROTECTED] __

Re: Interpreting [movie currentTime]

2008-03-25 Thread Quincey Morris
On Mar 25, 2008, at 08:50, Joseph Ayers wrote: Tech Note 2138 http://developer.apple.com/technotes/tn2005/ tn2138.html states that this is AKA: // ,,,dd:hh:mm:ss.ff/ts which translates into: days:hours:minutes:seconds:frames/timescale But as I step through my movie the string that [movie cur

Re: How to delay application quit?

2008-03-25 Thread Steve Bird
On Mar 25, 2008, at 12:26 PM, James Hober wrote: When an application quits, it does _not_ properly release all of your objects. Thus, their dealloc methods are generally not called. This is a deliberate optimization since there's no point in manually cleaning up the process memory. The kerne

Re: Providing synch/asynch API

2008-03-25 Thread Jean-Daniel Dupas
In case you choose option 2. For the sync version, as you want to block the execution thread, you don't have to run the runloop. You may use a condition lock to wait the worker thread completion (NSConditionLock or pthread condition). performSync() { // create condition performAsync(). /

Re: Alternate row colors and selection

2008-03-25 Thread Jens Alfke
On 25 Mar '08, at 12:34 AM, Ivan C Myrvold wrote: This works fine for the columns which have NSTextFieldCell, and it also colors the column with the NSButtonCell, but when I select a row, the column with NSButtonCell still have the color as set above, and not the selection color. You could

Re: How to delay application quit?

2008-03-25 Thread James Hober
When an application quits, it does _not_ properly release all of your objects. Thus, their dealloc methods are generally not called. This is a deliberate optimization since there's no point in manually cleaning up the process memory. The kernel will completely eliminate the process address spac

Providing synch/asynch API

2008-03-25 Thread Andy Klepack
I have several methods for which I'd like to provide asynchronous and synchronous variants. These methods are not simple operations and have non-void return values. Is there a good model to follow in implementing this? I don't recall ever seeing a technique for this in any of the Cocoa documenta

Interpreting [movie currentTime]

2008-03-25 Thread Joseph Ayers
I'm trying to determine the current frame, the total number of frames in the movie a and real time (in seconds from beginning of a movie using [movie currentTime] QTTime is defined as typedef struct { long longtimeValue; longtimeScale; longflags; } QTTi

Windows networking API

2008-03-25 Thread Robert Claeson
Is there an API/framework to interface with the SMB/Samba/Windows networking functionality of OS X? More specifically, I need to: * Find the Active Directory domain (or Windows workgroup name if not in an AD network) * Ensure that the OS X user is authenticated via AD (if available) As you

Re: Get root privileges with NSTask

2008-03-25 Thread Jens Alfke
Sorry for a 2nd reply but I just looked at what ImageMagick is. If your app uses this library, you don't need to (and shouldn't) install it at the root of the OS. Instead, put the shared library into your application bundle. That way your app doesn't need authorization, doesn't alter the OS

Re: Get root privileges with NSTask

2008-03-25 Thread Jens Alfke
This is REALLY not the right way to be doing this. I'm not talking about what auth mechanism to use; I'm talking about what you should be doing as root. I speak as someone who might download and use your program someday. (a) Most of what you're doing can be done in Cocoa without having to

Re: Get root privileges with NSTask

2008-03-25 Thread Clark Cox
You don't seem to be listening. You were given the correct answer: use AuthorizationServices: Please read, and understand, this page: On Tue, Mar 25, 2008 at 7:47 AM, Mr.

Re: Get root privileges with NSTask

2008-03-25 Thread Mr. Gecko
I guess I will use applescript for this task On Mar 25, 2008, at 8:19 AM, Jean-Daniel Dupas wrote: If you didn't find anything useful in the Chris Hanson post and in the link it provides, I'm not sure we can give you more help. NSTask cannot launch an executable with more privilege than you

Re: outlineViewSelectionDidChange not called

2008-03-25 Thread Jonathan Dann
Have your tried binding the tree controller's @"selectionIndexPaths" binding to a variable in your model object? I havent tried it but it seems that you can do this in IB and then get the model to observe the bound instance variable and you cab then see each time the variable changes. Not s

Re: NSView over QTMovieView

2008-03-25 Thread Oliver Quas
Hi Joseph, as you see, you can't just add your custom view to the QTMovieView. One solution to your problem would be to add your custom view to a borderless window, and add that window to your NSWindow containing the QTMovieView. Another solution would be to use CoreAnimation and use a QT

Re: Obtaining the foreground application's path

2008-03-25 Thread Jean-Daniel Dupas
And I know this is not what you ask for, but if you need to track application usage, I suggest you to have a look at thoses carbons events. kEventAppLaunched: kEventAppTerminated: kEventAppFrontSwitched: It may avoid you to check the frontmost application using a timer, or some other

Re: Debugging an input manager that refuses to load

2008-03-25 Thread Michael Ash
On Fri, Mar 21, 2008 at 12:15 AM, Michael Ash <[EMAIL PROTECTED]> wrote: > I have a user who can't use my program because it won't load. It loads > into Safari by using an input manager, but it simply doesn't show up. > I've placed logging statements in my input manager principal class's > +load

Re: Obtaining the foreground application's path

2008-03-25 Thread Ivan C Myrvold
This will give you an NSDictionary with a lot of information about the active application: [[NSWorkspace sharedWorkspace] activeApplication]; Ivan Den 25. mars. 2008 kl. 08:12 skrev Matt Burnett: Im sure this is not the right list, but it is the closest one i could think of for this topic

Re: Writing a preference pane that configures hotkeys?

2008-03-25 Thread Brian Kendall
On Mon, 24 Mar 2008 01:46:27 -0400, Jens Alfke <[EMAIL PROTECTED]> wrote: Take a look at Nathan Day's "NDHotKeyEvent" utility code: http://homepage.mac.com/nathan_day/pages/source.xml I tried to use this in my preference pane, but I can't get the control to receive hot key events.

NSView over QTMovieView

2008-03-25 Thread Joseph Ayers
I'm working on an application to make measurements on each of the frames of a QTMovie. I have a window with a QTMovieView and a superimposed NSView. When the QTMovieView is offset from the NSView, My app draws to the NSView, but when they are exactly overlaid, I see nothing in the image. In fact

Re: Get root privileges with NSTask

2008-03-25 Thread Jean-Daniel Dupas
If you didn't find anything useful in the Chris Hanson post and in the link it provides, I'm not sure we can give you more help. NSTask cannot launch an executable with more privilege than your current task (except if it launches a setuid tool), and previous responses already give you eve

Re: DO problems

2008-03-25 Thread Aurélien Hugelé
I encountered this very same problem with DO since Leopard. I noticed that a large part of the DO backend has been rewritten in Leopard. If you know how to fix/reproduce the problem, I'll be glad to know. I suggest trying your program on a Tiger/Tiger configuration.. I'm pretty sure it will

Re: Get root privileges with NSTask

2008-03-25 Thread Mr. Gecko
I looked around there and found nothing useful. Here is my code that I am tying to get root privileges with. NSTask* download = [[NSTask alloc] init]; [download setLaunchPath:@"/usr/bin/curl"]; [download setCurrentDirectoryPath:@"/"]; [download setArguments: [NSArray arrayWithObjects:@"-O",@"http:

Re: Core Data & Sheet problem

2008-03-25 Thread Jeff LaMarche
Never mind. I got it working. When you reach a certain point, you should just walk away from a problem I guess Setting the sheet's first responder to nil is now working, but I do it when the button is pressed, not in my sheet callback method. On Mar 25, 2008, at 7:59 AM, Jeff LaMarche

User authentication example (CRAM-MD5)

2008-03-25 Thread [EMAIL PROTECTED]
Hello List My app requires to authenticate network clients. To this end I have integrated the C based Apple example code from NetworkAuthentication into a wrapper class which links against the DirectoryService framework (no Cocoa for you in there I'm afraid). Now, clear text authentication

Core Data & Sheet problem

2008-03-25 Thread Jeff LaMarche
Okay, I know I've had this problem before a couple of years ago when Core Data was fairly new, but searching the archives didn't turn anything up and I think I've just been looking at it too long - it's probably something really obvious, but... I have a custom sheet with several text field

CoreAnimation presets in Interface Builder

2008-03-25 Thread Herr Thomas Bartelmess
Hello everyone! Does somebody know how to use the CoreAnimation preset Transtions form Interface Bulilder. I would really like to use them. I think about the transtions, like flash, rotating cube etc. Thanks a lot. Greetings Thomas ___ Cocoa-dev

Re: Convert kernel AbsoluteTime to a NSDate

2008-03-25 Thread Jean-Daniel Dupas
I think this is an absolute time. Don't know if it may help you, but have a look at http://developer.apple.com/qa/qa2004/qa1398.html I think absolute time 0 corresponds to machine boot time. Le 25 mars 08 à 10:32, Matt Burnett a écrit : Thanks for your reply, but im not sure if this is going

Re: Convert kernel AbsoluteTime to a NSDate

2008-03-25 Thread Matt Burnett
Thanks for your reply, but im not sure if this is going to help me. It seems like the most i could get from that would be the value which IOHIKeyboard is presently supplying. The following message also says that it is essentially impossible to do what I want from the kernel. http://lists.app

Re: CoreAudio / AudioUnit

2008-03-25 Thread John C. Randolph
On Mar 24, 2008, at 10:30 PM, Alex ROUGE wrote: Hi everybody. I guess it's not the best place to put my request but perhaps you can help with a CoreAudio / AudioUnit question. Try here: http://lists.apple.com/mailman/listinfo/coreaudio-api Cocoa-dev is a pretty high-volume list, and you're

Re: Convert kernel AbsoluteTime to a NSDate

2008-03-25 Thread John C. Randolph
On Mar 25, 2008, at 1:23 AM, Matt Burnett wrote: I have a KEXT which hooks in to IOHIKeyboard->_keyboardEventAction. How can i convert the AbsoluteTime (UnsignedWide) I receive to a NSDate? Thanks! Try searching for "Using Mach Absolute Time Functions" in the Kernel programming guide. -

Convert kernel AbsoluteTime to a NSDate

2008-03-25 Thread Matt Burnett
I have a KEXT which hooks in to IOHIKeyboard->_keyboardEventAction. How can i convert the AbsoluteTime (UnsignedWide) I receive to a NSDate? Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderat

Alternate row colors and selection

2008-03-25 Thread Ivan C Myrvold
I have an NSOutlineView, where the cells in one of the columns are NSButtonCell. In the delegate method outlineView:willDisplayCell:forTableColumn:item:, I am setting the alternate colors with if ([te isColored]) // even row number [aCell setBackgroundColor:evenColor]; else [aCell set

Issues implementing [NSArrayController replaceObjectsAtArrangedObjectIndexes: withObjects:]

2008-03-25 Thread Rob Petrovec
Hey, Since NSArrayController does not have 'replace' functionality, I'm trying to implement my own for performance reasons. Problem is, I keep getting an exception when my code runs. Here is a code snippit: - (void) replaceObjectsAtArrangedObjectIndexes:(NSIndexSet*)indexes withObjects:(

Obtaining the foreground application's path

2008-03-25 Thread Matt Burnett
Im sure this is not the right list, but it is the closest one i could think of for this topic (or maybe carbon-dev). I am looking to obtain the current foreground application. The applications path, bundle identifier, or application name would be fine, however the path would be ideal. I wan