-[NSURLCredentialStorage removeCredential:forProtectionSpace:] broken?

2011-10-06 Thread Jim Correia
Is there a known problem with -[NSURLCredentialStorage removeCredential:forProtectionSpace:], or are my expectations wrong? I iterate all the credials in the storage looking for the one I wish to remove, then send -removeCredential:forProtectionSpace: to the instance, and it doesn't actually

Re: adding something to a setter

2011-10-06 Thread Jim Correia
Do not use self as your observation context. Your observation context has to be unique for all observers of the object. “self” is a bad choice. Also, you should only do your own work in the case that the observer is your observer. In the code below, you are also doing your work in the case

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-30 Thread Jim Correia
On Sep 30, 2011, at 12:06 AM, Quincey Morris wrote: The actual failure scenario I described has 2 necessary conditions. One is a save boundary. The other is the flushing of cached property information for the deleted object. The latter is difficult to cause, especially in a trivial

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-30 Thread Jim Correia
On Sep 30, 2011, at 5:41 AM, Jerry Krinock wrote: I'm still working on this issue, trying to find the trigger which moves my corner case into the corner, hoping for a workaround. It's tedious because of different operations and states. But you have a pretty reliable way to reproduce the

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-29 Thread Jim Correia
On Sep 29, 2011, at 11:20 AM, Quincey Morris wrote: I think the answer to your original question is that You're Doing It Wrong™. :) I'm pretty sure (though I never really thought about it before today) that Core Data undo *doesn't* work across 'save:' boundaries. The documentation for

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Jim Correia
On Aug 11, 2011, at 7:27 PM, William Squires wrote: On Aug 11, 2011, at 6:51 PM, Kyle Sluder wrote: On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke j...@mooseyard.com wrote: On Aug 11, 2011, at 4:10 PM, Luther Baker wrote: static void

Re: Using Multi-Gesture events with Carbon

2011-07-13 Thread Jim Correia
On Jun 29, 2011, at 2:24 PM, Abdul Sowayan wrote: I have a carbon based application that we are converting overtime to Cocoa. What I would like to do, if possible, is to incorporate multi-gesture events (such as magnify event) into my carbon application. I can see that NSResponder has

Re: TransformProcessType() still doesn't show menu (Bug ID# 5905139)

2011-05-26 Thread Jim Correia
On May 26, 2011, at 7:21 PM, Jerry Krinock wrote: I just thought I'd lift my head up long to say thank you, Anders. Unfortunately, your code doesn't work in my app. Tried several mutations; still no good. Another thing I learned is that programmatically switching apps, simulating the

Re: -[NSSet containsObject:] returns NO when it should return YES

2011-02-19 Thread Jim Correia
On Feb 19, 2011, at 2:17 PM, Michael Crawford wrote: I'm trying to compare instances of NSNumber using NSSet. I have a set of numbers, which represent 64-bit persistent IDs for iTunes media-items. I access these values using the -[NSNumber longLongValue] method. I'm adding them to an

Re: Return key should enter return in textfield and not press default button

2010-10-18 Thread Jim Correia
On Oct 11, 2010, at 2:21 AM, Thorsten Lemke wrote: I have a dialog in my app wich should let the user enter a carriage return. How can I avoid pressing the default button with return? Only enter should press it in this case. As you probably know, implementing this will be hugely popular

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Jim Correia
On Mar 25, 2010, at 8:23 PM, Jim Graham wrote: This is a problem that occurred a few months back in a project. I Never actually used it in the project but it has bugged me ever since. I have simplified the problem into a small example There is a window with three NSTextFields and a

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Jim Correia
On Mar 25, 2010, at 8:23 PM, Jim Graham wrote: This is a problem that occurred a few months back in a project. I Never actually used it in the project but it has bugged me ever since. I have simplified the problem into a small example There is a window with three NSTextFields and a

Re: Core Data: fetching a subset of attributes/columns

2010-03-21 Thread Jim Correia
On Mar 20, 2010, at 1:52 PM, Gabriel Fernandez wrote: I wanted to get a subset of an entity's attributes because one of the ManagedObject's attributes is a large image. […] 2) using the -setPropertiesToFetch: method of NSFetchRequest, with the id NSAttributeDescription I'm looking for as

Re: NSComboBox problem in 10.6.2

2010-03-19 Thread Jim Correia
On Mar 18, 2010, at 3:38 PM, H. Miersch wrote: when i try to launch the app from within xcode, the console shows the following: 2010-03-18 19:26:28.515 StoX[63999:a0f] An uncaught exception was raised 2010-03-18 19:26:28.534 StoX[63999:a0f] *** -[NSCFArray objectAtIndex:]: index (-1 (or

Re: NSComboBox problem in 10.6.2

2010-03-19 Thread Jim Correia
On Mar 19, 2010, at 3:21 PM, H. Miersch wrote: just had another surprise: i inserted NSLogs into the method that initializes the array and into -numberOfItemsInComboBox, trying to see the contents of my array and find out why -numberOfItemsInComboBox returns zero. the surprise was that

Re: File Backup Date

2010-03-16 Thread Jim Correia
On Mar 16, 2010, at 12:09 PM, gMail.com wrote: Anyway, I have noticed that if in the Finder (MacOS X 10.6.2) I open a file which contains a backup date, then I modify the content and I save it, the backup date disappears. What are you using to modify the content of the file? Consider the

Re: Making a beta version expire

2010-03-11 Thread Jim Correia
On Mar 11, 2010, at 11:03 PM, Ulai Beekam wrote: Do you think this would work? I mean, it seems that it should, but one can never be sure Why can’t you be sure? After reading your algorithm and convincing yourself that the code is correct, step through it in the debugger with expirations

Re: Core Data: inverse relationship not updated until next Run Loop

2010-03-11 Thread Jim Correia
On Mar 11, 2010, at 8:11 PM, Eric Lin wrote: In using Core Data, I was under the impression that if I do this: [department addEmployeesObject:employee] // department now has 1 employee [moc deleteObject:employee] Then department will end up with no employees, assuming that the inverse

Re: NSServices - Validation bug

2010-03-11 Thread Jim Correia
On Mar 8, 2010, at 5:02 AM, tr...@atheeva.com wrote: I have some queries regarding Services menu validation . I would like to enable different services provided by my app based on whether a file or folder is selected in the Finder. I have set NSFilenamesPboardType as the send type for the

Re: Using Core Data in Command Line utility

2010-03-08 Thread Jim Correia
On Mar 8, 2010, at 8:44 PM, Paul Johnson wrote: The problem I'm having is the line that tries to store the integer: [object setValue:i forKey:@fileIndex]; I get the compiler error Passing argument 1 of 'setValueforKey' makes pointer from integer without a cast”. -setValue:forKey: takes an

Re: NSWindow - how to resize it keeping aspect ratio?

2010-02-18 Thread Jim Correia
On Feb 18, 2010, at 1:55 PM, Alexander Bokovikov wrote: I'm sorry if this is a stupid question, but I don't see an evident answer... I need the subj, but don't see appropriate NSWindow method... Am I missing something? -[NSWindow setAspectRatio:] -[NSWindow setContentAspectRatio:] - Jim

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Jim Correia
On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote: Maybe I misunderstood I must conform NSCopying protocol also even when using core data? If you have an NSCell subclass which adds iVars, you must implement -copyWithZone: to do correct memory management. Your -copyWithZone: needs to work

Re: Typo in notification name

2010-01-18 Thread Jim Correia
On Mon, Jan 18, 2010 at 4:20 AM, Mark Munz unmar...@gmail.com wrote: Apple usually addresses binary compatibility by changing behavior if you link against a newer major SDK. So a behavior changes if you link against 10.6 vs. 10.5. Apple has done this numerous times. With notifications, they

Re: Managed Object with Getter

2010-01-13 Thread Jim Correia
On Jan 13, 2010, at 8:39 AM, Richard Somers wrote: On Jan 13, 2010, at 1:17 AM, Kyle Sluder wrote: This code cannot generate that error because it doesn't send any messages. You need to post the code to which the error actually refers. This works. @property (nonatomic, retain)

Re: Managed Object with Getter

2010-01-13 Thread Jim Correia
On Jan 13, 2010, at 7:29 PM, Richard Somers wrote: On Jan 13, 2010, at 7:14 AM, Jim Correia wrote: This style is typically used for non-object BOOL values. If you use it for an NSNumber attribute, you run the risk of someone familiar with the pattern assuming it is a BOOL property

Re: Enabling NSZombieEnabled programatically

2010-01-09 Thread Jim Correia
On Jan 9, 2010, at 6:22 PM, Sean McBride wrote: I've never tried, but NSDebug.h seems to say that there is an NSZombieEnabled global var that you can set. Read the warning at the top of the header. While those variables have been there as long as I can remember, as soon as you ship software

Re: Enabling NSZombieEnabled programatically

2010-01-09 Thread Jim Correia
On Jan 9, 2010, at 7:54 PM, Graham Cox wrote: I'm getting something odd though. If I set NSZombieEnabled during app delegate -applicationDidFinishLaunching: method from my preference, a later deliberate over-release still causes a EXC_BAD_ACCESS. If I set it as an environment variable

Re: NSFilesPromisePboardType

2010-01-08 Thread Jim Correia
On Jan 8, 2010, at 7:52 PM, Nick Paulson wrote: Can someone please explain to me how I handle NSFilesPromisePboardType? I register for the dragged types, but I don't understand exactly how to get the data. Did you read the documentation?

Re: NSFilesPromisePboardType

2010-01-08 Thread Jim Correia
On Jan 8, 2010, at 10:24 PM, Nick Paulson wrote: I am doing the following code: NSArray *filenames = [sender namesOfPromisedFilesDroppedAtDestination:[NSURL fileURLWithPath:@/]]; However, it is getting the following lines in console: Couldn't get a copy of an HFS Promise from the

Re: NSFilesPromisePboardType

2010-01-08 Thread Jim Correia
On Jan 8, 2010, at 11:33 PM, Jim Correia wrote: Ultimately, it appears that iTunes is putting bad promise data in the drag. At this point it is probably best to file a bug against iTunes. Looks like this might simply be a byte order bug with the value in the promisedFlavor field

Re: duplicate method found, but can't locate

2010-01-06 Thread Jim Correia
On Jan 6, 2010, at 7:33 PM, Shane wrote: I'm getting this error from my main app controller which is trying to send a message to a thread on a queue (using YAMessageQueue). [[networkQueue proxyForTarget:networkServer] save:[self saveFile]]; Cannot convert 'NSString*' to 'NSError**' in

Re: Why do bindings make my image disabled?

2010-01-02 Thread Jim Correia
On Jan 1, 2010, at 5:39 PM, Michael Bishop wrote: What I have been able to figure out is that using bindings is somehow making my NSImageCell instances draw an image semi-transparently. I haven't been able to explain why this is but I'm hoping someone else has seen this. […] In the

Re: Reference NSSearchFieldCell within NSSearchField?

2009-12-29 Thread Jim Correia
On Dec 29, 2009, at 3:02 PM, Mike Chambers wrote: The NSSearchField docs mention that it wraps an NSSearchFieldCell, which contains such APIs as setSendsWholeSearchString (which i need to dynamically set). Is there any programatic way to get a reference to the NSSearchFieldCell wrapped in

Re: Creating CoreData classes

2009-12-27 Thread Jim Correia
On Dec 27, 2009, at 11:52 PM, Brian Bruinewoud wrote: If I've generated core data classes from my model, how do I use them to create new values? Currently I'm doing this: CDClass *cdObject = (CDClass *)[ NSEntityDescription insertNewObjectForEntityForName: @CDClass

Re: NSViewAnimationFadeInEffect broken in Snow Leopard?

2009-12-24 Thread Jim Correia
On Tue, Dec 22, 2009 at 7:58 PM, Kevin Wojniak kain...@kainjow.com wrote: NSViewAnimationFadeInEffect doesn't seem to be working like it was in Leopard. I filed this as when SL was being seeded. If Regression: NSViewAnimation doesn't fade in view if initially hidden rdar://problem/7020352 If

Re: Core Data registered editors?

2009-12-22 Thread Jim Correia
On Tue, Dec 22, 2009 at 9:33 PM, Rick Mann rm...@latencyzero.com wrote: I noticed that NSPersistentDocument's docs for isDocumentEdited talks about editors registered with the managed object context. Is there something that explains what a registered editor is? See the docs about

Re: Are views active or inactive?

2009-12-22 Thread Jim Correia
On Dec 22, 2009, at 10:45 PM, Rick Mann wrote: I'm listening for that notification. Sure is a clunky way to do things. I've never used a view framework that didn't tell views when they became active/inactive. AppKit views don’t have a native active/inactive status like carbon HIToolbox

Re: Detaching a thread to save a file?

2009-12-11 Thread Jim Correia
On Fri, Dec 11, 2009 at 8:43 PM, Keith Blount keithblo...@yahoo.com wrote: Oops, sorry, forgot to ask: what happens if the user hits save again while the separate thread is already saving the search indexes to disk? Also consider what happens when the user hits save, then immediately quits

Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions

2009-12-04 Thread Jim Correia
On Dec 4, 2009, at 1:52 PM, Grant Erickson wrote: I have implemented a custom class that derives from NSTextFieldCell to draw status for an associated device (not unlike the network source list in the Network System Preferences) overriding only: […] The issue I am having is determining the

Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions

2009-12-04 Thread Jim Correia
On Dec 4, 2009, at 10:54 PM, Grant Erickson wrote: Thanks for the prompt reply. I forgot to mention one key element. The subclass must support 10.4- and later so I cannot rely on 10.5- and later APIs such as this. In that situation I’d probably write (and test!) if ([self

Behavior of CFStringUpper/Lowercase for NULL Locale?

2009-11-30 Thread Jim Correia
The documentation for CFStringUppercase says: locale A CFLocale object that specifies a particular language or region. Prior to Mac OS X v10.3, this parameter was an untyped pointer and not used. The locale argument affects

Re: Dealing with faults in CoreData / AppleScript

2009-11-20 Thread Jim Correia
On Nov 19, 2009, at 10:19 PM, Greg Hoover wrote: I've been working through adding scriptability to my CoreData application but ran into a snag: accessing relationships may return a fault instead of the actual set of objects. Is there an accepted way of solving this issue? I don't want

Re: Question about Style wrt private methods

2009-11-18 Thread Jim Correia
On Nov 18, 2009, at 1:49 PM, Jens Alfke wrote: This is unfortunately true. The danger is that if you add an _- prefixed method to your class, it might conflict with a private method declared in a superclass. If this happens your method will override the internal one, and Really Bad Things

Re: Question about Style wrt private methods

2009-11-18 Thread Jim Correia
On Nov 18, 2009, at 2:32 PM, Jens Alfke wrote: On Nov 18, 2009, at 11:15 AM, Jim Correia wrote: This problem is just not restricted to private methods, or additions through categories. You can also run afoul of a namespace conflict with a public method in your subclass. Yes

Dependent/injected tests vs. linker visibility

2009-11-16 Thread Jim Correia
[Moved from Xcode-Users since it really isn’t an Xcode issue.] I have some dependent/injected unit tests to test application-specific functionality. I've added a test that calls a C function which is defined in the application. This causes a link-time error because, by default,

Re: removeObserver:forKeyPath: when already removed

2009-11-11 Thread Jim Correia
On Nov 11, 2009, at 5:35 PM, James Walker wrote: I had a situation where removeObserver:forKeyPath: was called twice for the same receiver (an NSUserDefaultsController), the same observer, and the same key path. It threw an NSRangeException. But the KVO docs don't say anything about

Re: Programmatic Binding KVC KVO

2009-11-04 Thread Jim Correia
On Nov 4, 2009, at 3:17 PM, Richard Somers wrote: @interface MyView : NSView { double num; } @end @implementation MyView - (double)num { return num; } - (void)setnum:(double)newNum { [self willChangeValueForKey:@num]; num = newNum; [self didChangeValueForKey:@num]; }

Re: Core Data Managed Object with Custom Data Caches

2009-10-31 Thread Jim Correia
On Sat, Oct 31, 2009 at 12:05 PM, Richard Somers rsomers.li...@infowest.com wrote: The documentation states didTurnIntoFault method may be used to clear out custom data caches. So far so good. I was creating custom data caches in awakeFromFetch (or awakeFromInsert) until I realized that

Re: Core Data Managed Object with Custom Data Caches

2009-10-31 Thread Jim Correia
On Oct 31, 2009, at 12:25 PM, Richard Somers wrote: On Oct 31, 2009, at 10:12 AM, Jim Correia wrote: Typically you set up the baseline value in -awakeFromFetch. Is there a specific reason you need this to be undoable? When the managed object is removed, didTurnIntoFault is called

Re: Programmatically invoking double-click bindings on NSTableView

2009-10-28 Thread Jim Correia
On Wed, Oct 28, 2009 at 12:25 PM, Gerd Knops gerti-cocoa...@bitart.com wrote: Seems this should be easy: I have an NSTableView's Double Click Target, Double Click Argument,  Double Click Argument2 etc. binding set, and they work fine. Now I would like to programmatically get the tableview to

Re: keyPathsForValuesAffectingValueForkey: not updating immediately

2009-10-27 Thread Jim Correia
On Tue, Oct 27, 2009 at 11:39 AM, Brad Gibbs bradgi...@mac.com wrote: I don't think there's anything wrong with the method -- I've used it successfully in other apps and have seen it work in Apple sample apps, it just isn't working in this particular case. I'm sure that there's something

Re: keyPathsForValuesAffectingValueForkey: not updating immediately

2009-10-26 Thread Jim Correia
On Mon, Oct 26, 2009 at 10:03 PM, Brad Gibbs bradgi...@mac.com wrote: I did read the documentation, which is why I used +keyPathsForValuesAffectingFullAddress.  I also tried +keyPathsForValuesAffectingValueForFullAddress: Both methods work, but only after changing the view and then coming

Re: Trying to understand -awakeFromNib problem

2009-10-25 Thread Jim Correia
On Oct 25, 2009, at 7:53 AM, Graham Cox wrote: Then, running on 10.5.(8) I stared to get an error that the object new class derived from new base class did not respond to - awakeFromNib. I'd not previously seen this error until I refactored my code. Sure enough my new base class and its new

Re: Trying to understand -awakeFromNib problem

2009-10-25 Thread Jim Correia
On Oct 25, 2009, at 12:22 PM, Roland King wrote: Where's that documented??? I looked for that when I saw the original question. For iPhone it's documented under NSObject UIKit Additions Reference, for 10.6 it's under NSNibAwakingProtocol which doesn't show up anywhere as an implemented

Re: Preserving camelCase when prefixing a method name?

2009-10-13 Thread Jim Correia
On Oct 13, 2009, at 10:24 AM, Graham Cox wrote: I think just making the first character uppercase would be sufficient, but I'm not sure how to do that reliably with the unichar data type, so that's my first question. Well you don't have to consider all of unicode, just those characters

Re: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef?

2009-10-12 Thread Jim Correia
On Mon, Oct 12, 2009 at 6:36 PM, Iceberg-Dev dev.iceb...@gmail.com wrote: From what I've found in the documentation, the UTI type of a file can be retrieved using the LaunchServices APIs. This requires to provide a FSRef. Wouldn't there be an API I didn't see in Foundation that lets you

NSAttributedString always returns NO for -isEqualToAttributedString with attachments present?

2009-10-07 Thread Jim Correia
The documentation for -[NSAttributedString isEqualToAttributedString:] says: Attributed strings must match in both characters and attributes to be equal. It doesn't mention attachments at all. Consider the following code: attributedString is the input string, and it may contain image

Re: Can an app query the values in its own Info.plist?

2009-09-28 Thread Jim Correia
On Sep 28, 2009, at 1:34 AM, Kyle Sluder wrote: Done. rdar://problem://7257097 Also notes that the same collision issue exists for user defaults, where AppKit stores window and splitter autosave information. It is unlikely that any apple framework is ever going to introduce a key of the

Re: [UNSOLVED] How to observe every child entity

2009-09-20 Thread Jim Correia
First, a bit about terminology. What you are talking about is not observing child entities. You wish to observe related instances (NSManagedObject or subclass thereof). The entity describes the instance, but is not the instance. (I'm trying to avoid being overly pedantic, but talking about

Re: restoring NSSplitView divider's position

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

Re: Getting a StringPtr from Gestalt on 64-bit

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

Replace NSScroller instances in NSScrollView?

2009-08-21 Thread Jim Correia
I have a subclass of NSScrollView in which I'm also using a custom NSScroller subclass. If I am unarchiving from a NIB, I can set the object classes for the NSScroller to my subclass. However, there doesn't appear to be an API to specify the class of the scroller used when I alloc+init

Re: Replace NSScroller instances in NSScrollView?

2009-08-21 Thread Jim Correia
On Aug 21, 2009, at 12:22 PM, Jim Correia wrote: I have a subclass of NSScrollView in which I'm also using a custom NSScroller subclass. If I am unarchiving from a NIB, I can set the object classes for the NSScroller to my subclass. However, there doesn't appear to be an API to specify

Re: NSArrayController subclass computed property not being updated

2009-07-29 Thread Jim Correia
On Jul 29, 2009, at 1:09 AM, Alexander Heinz wrote: I've got an NSArrayController subclass with a computed property: @property (readonly) BOOL canRemoveSelection; (This basically adds some application-specific checks to the canRemove: property, so that I can bind a remove button in

Re: UUID method Garbage Collection safe?

2009-07-22 Thread Jim Correia
On Jul 22, 2009, at 3:42 PM, Squ Aire wrote: Yes I was aware of this method. However, according to the docs it only guarantees uniqueness for a given process, and doesn't guarantee it will be globally unique, if you know what I mean. Thanks for the suggestion though. The documentation

Re: AppleScript Record and NSDictionary

2009-07-21 Thread Jim Correia
On Jul 21, 2009, at 6:51 PM, Steve Cronin wrote: From my Cooca app I want to call an AppleScript with several parameters one of which is an AppleScript record. [...] When I look at the docs for -recordDescriptor and I see the 4 character code business - I get the ugly sinking feeling but

Re: Best approach for selective spell-checking...

2009-07-20 Thread Jim Correia
On Jul 20, 2009, at 9:48 PM, Daniel Jalkut wrote: I'm trying to figure out how to prevent spell checking in my NSTextView from being applied to certain ranges within the text document. [...] It would be nice if NSSpellChecker offered a delegate relationship, something like

Re: NSTextView help

2009-07-20 Thread Jim Correia
On Jul 20, 2009, at 11:49 PM, Dave DeLong wrote: The problem I'm facing is that in order to display the RTF data properly, I need an NSTextView, but NSTextView has its own enclosing scroll view that's conflicting with my overall scrollview. NSTextView doesn't intrinsically have its own

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-11 Thread Jim Correia
On Jul 9, 2009, at 5:52 PM, Charles Srstka wrote: On Jul 9, 2009, at 4:29 PM, Ben Trumbull wrote: It may be that under certain circumstances (dictionary storage, synthesized properties on 10.5, etc) that you must use an accessor method even in init dealloc. That requires more care, is

Re: NSLinkAttributeName: can I control the visual presentation?

2009-07-04 Thread Jim Correia
On Jul 4, 2009, at 9:18 AM, Stuart Malin wrote: I have a mutable attributed string that is displayed in an NSTextView. For a certain range, I set several attributes, including NSLinkAttributeName. However, the presentation shows as blue underlined text even though I have set other

Re: Determining OS at Runtime

2009-07-03 Thread Jim Correia
On Jul 3, 2009, at 1:06 PM, Steve Christensen wrote: For the case of a function, if you're deploying on 10.4 but using a 10.5 function, that function will be weak-linked so doing a runtime check is both faster and more accurate in determining whether a function exists or not. Beware that

Re: Replace -[NSKeyedUnarchiver unarchiveObjectWithData:] so it doesn't crash on corrupt archive

2009-07-02 Thread Jim Correia
On Thu, Jul 2, 2009 at 11:17 PM, Jerry Krinock je...@ieee.org wrote: If -[NSKeyedUnarchiver unarchiveObjectWithData:] is handed a corrupt archive, it raises an exception AND crashes the program. Do you have a sample app data combo which demonstrates the crash? +[NSKeyedUnarchiver

Re: Problem with NSValueTransformer, NSTableView and NSAttributedString

2009-06-23 Thread Jim Correia
On Jun 23, 2009, at 1:35 AM, Kyle Sluder wrote: On Mon, Jun 22, 2009 at 9:12 PM, Jim Correiajim.corr...@pobox.com wrote: The documentation for the value binding of NSTableView says that NSString and NSNumber are the supported value types. I do not see where you're finding this. The

Re: Problem with NSValueTransformer, NSTableView and NSAttributedString

2009-06-23 Thread Jim Correia
On Jun 23, 2009, at 11:06 AM, Kyle Sluder wrote: On Tue, Jun 23, 2009 at 6:53 AM, Jim Correiajim.corr...@pobox.com wrote: On Jun 23, 2009, at 1:35 AM, Kyle Sluder wrote: I do not see where you're finding this. The bindings documentation says: The object should be suitable for the passing to

Re: Problem with NSValueTransformer, NSTableView and NSAttributedString

2009-06-22 Thread Jim Correia
On Jun 21, 2009, at 10:37 AM, Donnie Lee wrote: I created NSTableView and bind table column with NSTextFieldCell with custom NSValueTransformer subclass to NSArrayController. My value transformer should return NSAttributedString transformed from NSString. Everything works fine except that the

Re: Possible to set tab stops in an NSTextView?

2009-06-21 Thread Jim Correia
On Sun, Jun 21, 2009 at 11:44 AM, Ken Tozier kentoz...@comcast.net wrote: I'm working with an NSText view and want to display tab delimited strings in a table format. I don't need a full NSTable, just the ability to break up the text into columns using tab stops. Is there any built-in way to

Re: Add same object/key to NSMapTable

2009-06-17 Thread Jim Correia
On Wed, Jun 17, 2009 at 9:51 PM, Bill Bumgarner b...@mac.com wrote: You can't assume that the container didn't make a copy or do something else. If you need the object, you should hold a retain. In general, I agree. However, the following code is also problematic: [o release]; [testTable

Re: orderFrontStandardAboutPanel problem on Tiger - [NSCFDictionary setObject:forKey:]: attempt to insert nil value

2009-06-01 Thread Jim Correia
On Mon, Jun 1, 2009 at 7:29 AM, Chris Jones littlemaca...@gmail.com wrote: The error is: [NSCFDictionary setObject:forKey:]: attempt to insert nil value. And the StandardAboutPanel does not appear. [...] I don't think it could get more simple, but I can't see where I'm passing a nil value.

Re: [ NSSplitview ] -setAutosaveName

2009-05-31 Thread Jim Correia
On Sat, May 30, 2009 at 11:22 PM, Erg Consultant erg_consult...@yahoo.com wrote: What does setAutosaveName actually do? I assume it saves the position of the splitview to user defaults? The behavior is documented, succinctly, here:

Re: [ NS KeyedArchiver ] archiveRootObject:toFile: hoses my directory's permissions

2009-05-30 Thread Jim Correia
On Sat, May 30, 2009 at 1:39 AM, Erg Consultant erg_consult...@yahoo.com wrote: Why does archiveRootObject:toFile: change the permissions on the parent directory? I didn't ask it to. This dir has to be writable for all users - the way I installed it - not by only the current user. How can I

Re: NSEvent virtual keycodes

2009-05-18 Thread Jim Correia
On Mon, May 18, 2009 at 10:44 PM, Christopher Hansen christopher.han...@yahoo.com wrote: The NSEvent Reference documentation for the keyCode method states that the value returned is the same value returned in the kEventParamKeyCode when using Carbon Events. Are the virtual key codes

Re: Core Data Predicate Bug?

2009-05-17 Thread Jim Correia
On Sat, May 16, 2009 at 8:13 AM, ALEXander alexan...@wackazong.com wrote: I am currently developing a Core Data Application. I have an entity (set) with a boolean attribute 'isActive' (optional, non-transient, non-indexed, default NO). For some of my objects, this attribute is set to YES.

Re: Which field is the NSTextFieldCell drawing?

2009-05-17 Thread Jim Correia
On Sat, May 16, 2009 at 9:05 PM, K. Darcy Otto do...@csusb.edu wrote: I have an NSTextFieldCell subclass that needs to draw itself differently depending on which NSTableView row it is drawing.  My current solution is to store the row that is being drawn in my document class in an instance

Re: Which field is the NSTextFieldCell drawing?

2009-05-17 Thread Jim Correia
On Sun, May 17, 2009 at 12:08 PM, K. Darcy Otto do...@csusb.edu wrote: Thank you.  The thing is, the cell object returned by -tableView:willDisplayCell:forTableColumn:row: is not from my NSTextFieldCell subclass but rather the superclass – even though it is the subclass doing the drawing.  Any

Re: -[NSScriptCommand suspendExecution]

2009-05-15 Thread Jim Correia
On Fri, May 15, 2009 at 12:26 PM, kvic...@pobox.com kvic...@pobox.com wrote: if i call -[NSScriptCommand suspendExecution] whilst execution a script command, i find that the executing script will still time out after 2 minutes. is this a bug in cocoa? or a misunderstanding on my part about

Re: NSTask temrinationStatus always == 1?

2009-05-10 Thread Jim Correia
On Sun, May 10, 2009 at 2:18 PM, marc hoffman m...@elitedev.com wrote: i have an odd issue with NSTask. for some reason, no matter what result code my executable returns (im running xcodebuild, if that matters), NSTask's terminationStatus always reports back as 1. if instead i use system() to

Re: NSTask temrinationStatus always == 1?

2009-05-10 Thread Jim Correia
On Sun, May 10, 2009 at 2:18 PM, marc hoffman m...@elitedev.com wrote: i have an odd issue with NSTask. for some reason, no matter what result code my executable returns (im running xcodebuild, if that matters), NSTask's terminationStatus always reports back as 1. if instead i use system() to

Re: NSManagedObjectContext -insertObject: Cancels Prior Deletion -- BUT!

2009-05-06 Thread Jim Correia
On Wed, May 6, 2009 at 1:05 PM, Jerry Krinock je...@ieee.org wrote: In any case using multiple MOCs for different jobs is a good idea. Accessing the same store?  I always thought that was a bad idea, but I'll give it some thought. Using multiple MOCs with a single persistent store

Re: -[CALayer hitTest:] incorrect when embedding layer-backed NSView subclass inside NSScrollView

2009-05-04 Thread Jim Correia
On Mon, May 4, 2009 at 6:19 PM, Steven Degutis steven.degu...@gmail.com wrote: Specifically, you'll notice that the -hitTest: returns the correct layer *only* if you click the view while it is fully visible in the window, and before you have made it not-fully-visible for the first time. After

Re: Why is NSString-FSRef so hard?

2009-04-29 Thread Jim Correia
On Thu, Apr 30, 2009 at 12:02 AM, Charles Srstka cocoa...@charlessoft.com wrote: With that said, I don't really see what is harmful about recommending the use of NSString's path concatenation methods, which could save quite a few headaches in the case that this *does* somehow change for some

Re: Key Value Coding is not case-sensitive?

2009-04-27 Thread Jim Correia
On Tue, Apr 28, 2009 at 12:09 AM, DairyKnight dairykni...@gmail.com wrote:   And have the following set methods:   -(void) setfido ...   -(void) setFido ...   Both by calling [self setValue: ... forKey:@fido] or [self setValue:... forKey:@Fido], the runtime would call the same 'setFido'

Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie

2009-04-26 Thread Jim Correia
On Sun, Apr 26, 2009 at 10:41 AM, Jerry Krinock je...@ieee.org wrote: // Table View delegate method. // A little more complicated since we have to dig into the // parts of the table, and assign it as a header cell. - (void)               tableView:(NSTableView*)tableView  

Re: figuring out which TableView I am?

2009-04-26 Thread Jim Correia
On Sun, Apr 26, 2009 at 7:05 PM, WT jrca...@gmail.com wrote: More importantly, perhaps, is the fact that adding property/ivars is not a scalable solution in that it requires adding more code in several places if more tables are added. The tags solution only requires some fiddling with IB and

Re: figuring out which TableView I am?

2009-04-26 Thread Jim Correia
On Sun, Apr 26, 2009 at 8:04 PM, Graham Cox graham@bigpond.com wrote: This is true, but your example of non-scalability does reflect a poor approach that you wouldn't be likely to follow in practice. A tag is 32 bits, so can represent 2^32 different states, if used wisely. Dividing this

Re: Trying to get flagsChanged: to work

2009-04-25 Thread Jim Correia
On Sat, Apr 25, 2009 at 1:19 PM, Dave DeLong davedel...@me.com wrote: It seems that the responder chain is not set up during awakeFromNib (even though all the outlets are), because I moved the loop to my addGroup: IBAction, where it printed off my chain.  My GroupListController was not in the

Core Data: thread safety of NSPersistentStore +metadataForPersistentStoreWithURL:... (and +set...)?

2009-04-24 Thread Jim Correia
I don't see that the documentation specifically calls out @interface NSPersistentStore + (NSDictionary *)metadataForPersistentStoreWithURL:(NSURL *)url error: (NSError **)error; + (BOOL)setMetadata:(NSDictionary *)metadata forPersistentStoreWithURL: (NSURL*)url error:(NSError **)error; @end

Re: Problem implementing keyPathsForvaluesAffectingKey

2009-04-23 Thread Jim Correia
On Apr 22, 2009, at 10:45 AM, jonat...@mugginsoft.com wrote: The property canDelete is dependent on three other properties as shown below. Is there a problem with my implementation of + keyPathsForValuesAffectingCanDelete with regard to the key path @arrayController.canRemove? Is is a

Re: ESC while editing NSOutlineView subclass

2009-04-23 Thread Jim Correia
On Thu, Apr 23, 2009 at 5:16 PM, Kevin Gessner ke...@kevingessner.comwrote: I've got this in MyEditorOutlineView, my NSOutlineView subclass. - (void)keyDown:(NSEvent *)theEvent { [super keyDown:theEvent]; NSLog(@keyDown: %d, [theEvent keyCode]); #define returnKeyCode 36

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-20 Thread Jim Correia
On Apr 20, 2009, at 2:02 PM, Jerry Krinock wrote: A much better way appears to be to fetch all objects from the store with no predicate and then use -[NSArray filteredArrayWithPredicate:]. This takes only one more line of code, solves all problems, and is supposedly cheaper too: If you

Re: KVC and @ as key

2009-04-14 Thread Jim Correia
On Apr 15, 2009, at 12:19 AM, Micha Fuhrmann wrote: I'm bumping against KVC, indirectly. I've got a dictionary with first character keys, each object of the key is an Array with objects. So key b of my Dictionary is an array with file objects' name starting with the letter b. The problem

  1   2   >