Re: User interface validation doesn't work, right?

2009-07-02 Thread Bill Cheeseman
On Jul 2, 2009, at 12:02 AM, mmalc Crawford wrote: On Jul 1, 2009, at 4:33 PM, Bill Cheeseman wrote: But it doesn't work at all for user controls in general, and the docs are misleading (i.e., wrong) about that. although I'm not sure I'd agree with Bill that the docs are *wrong*, they

Re: NSComparisonResult and equality

2009-07-02 Thread Martin Wierschin
Since NSComparisonResult is an ordered enum typedef, I'd like to know if it's safe to write the following code to test for 'greater or equal to': // This would cover both NSOrderAscending and NSOrderSame if ([obj1 compare:obj2] NSOrderDescending) { I'd just use isGreaterThanOrEqualTo:,

Re: Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:

2009-07-02 Thread Duncan McGregor
On Wed, Jul 1, 2009 at 11:20 PM, Scott Thompsonea...@mac.com wrote: If I understand... you're going all the way to NSGraphicsContext just to flip the coordinate system? That's a long row to hoe :-). It would be, but I'm actually going to NSGraphicsContext so that I can draw NSImages and

Re: User interface validation doesn't work, right?

2009-07-02 Thread Bill Cheeseman
On Jul 1, 2009, at 9:15 PM, Keary Suska wrote: So I think you are claiming this works because the documentation says so. I'm saying the documentation is wrong because it doesn't work. I would love to see a project proving me wrong. Can you show me one? No, I am saying that it works as

Sorting on a table view of a managed object - debugger throws exception

2009-07-02 Thread Steve Cronin
Folks; 10.5.7 - 10.5 SDK - target 10.4 I have a managed core data entity working pretty nicely. I can display values in a tableView blah-blah Clicking on table column headers does as expected IN RELEASE versions for both Tiger and Leopard. However, in the debugger a click on table

Re: Sorting on a table view of a managed object - debugger throws exception

2009-07-02 Thread Quincey Morris
On Jul 2, 2009, at 01:10, Steve Cronin wrote: 10.5.7 - 10.5 SDK - target 10.4 I have a managed core data entity working pretty nicely. I can display values in a tableView blah-blah Clicking on table column headers does as expected IN RELEASE versions for both Tiger and Leopard.

Re: Programmatically adding to one big Finder selection ?

2009-07-02 Thread André Berg
Thanks everyone for your input. Interesting to see that I was wrong about selecting multiple files in the finder being a common task. Maybe a little background will shed some light on why I was trying to write this program: Currently I am primarily doing visual effects (digital

Re: Drawing the background of a single row in NSTableView

2009-07-02 Thread Peter Zegelin
On 02/07/2009, at 11:57 AM, Adam R. Maxwell wrote: On Jul 1, 2009, at 6:40 PM, Graham Cox wrote: On 02/07/2009, at 10:09 AM, Peter Zegelin wrote: Problem with this is there is no obvious concordance ( that I can see) between a row and its rectangle. Wouldn't scrolling affect all this?

Re: Programmatically adding to one big Finder selection ?

2009-07-02 Thread André Berg
On a related sidenote, I saw that the Finder AppleScript dictionary has a couple of properties for its folder type that seem to deal with list views: completely expanded, which has the description of: (NOT AVAILABLE YET) Are the container and all of its children opened as outlines? (can

Re: warning:assignment from distinct Objective-C type

2009-07-02 Thread Mac First
On Jul 1, 2009, at 9:34 AM, Ken Thomases wrote: On Jul 1, 2009, at 11:26 AM, David Blanton wrote: in .h file NSMutableArray *m_sources; [...] m_sources = [volumes stringsByAppendingPaths:[defaultManager directoryContentsAtPath:volumes]]; -stringsByAppendingPaths: returns

Setting a document's icon and default app

2009-07-02 Thread Michael Domino
Hi, I¹ve set up my app with a document type (see below), moved the app to Applications, logged out, logged back in, created a document of this type, but the setting the doc¹s icon and association with my app does not occur automatically, only when I manually do Get Info and set it. What am I

NSTableView bug?

2009-07-02 Thread Chris Carson
Hello, I've created a simple application with an NSTableView. I have written a delegate for this table, numberOfRowsInTableView:objectValueForTableColumn:row:, that returns the number of rows in the table when requested. My application uses the table view to display hexadecimal data on a

UIImageView source

2009-07-02 Thread Development
I need to create a filebrowser of sorts that allows a user to select an image from the iPhone/iPod images directory. The same one that iPhone camera images are saved to preferably. Is there s built in method of doing this or perhaps some guidance I could get on how to select and set images

Re: NSTableView bug?

2009-07-02 Thread Michael Ash
On Thu, Jul 2, 2009 at 10:51 AM, Chris Carsoncucar...@yahoo.com wrote: Hello, I've created a simple application with an NSTableView. I have written a delegate for this table, numberOfRowsInTableView:objectValueForTableColumn:row:, that returns the number of rows in the table when

Re: UIImageView source

2009-07-02 Thread Dave DeLong
Check out the UIImagePickerController class. Dave On Jul 2, 2009, at 9:33 AM, Development wrote: I need to create a filebrowser of sorts that allows a user to select an image from the iPhone/iPod images directory. The same one that iPhone camera images are saved to preferably. Is there s

Re: UIImageView source

2009-07-02 Thread Luke the Hiesterman
Creating your own file browser for photos on the phone is not supported. An excellent one has already been written for you, though. See UIImagePickerController.

Re: Dynamically loading a part of a Window in Cocoa

2009-07-02 Thread Michael Ash
On Wed, Jul 1, 2009 at 11:18 PM, Marco S Hymanm...@snafu.org wrote: On Jul 1, 2009, at 6:50 PM, Adam R. Maxwell wrote: Well, I generally avoid bindings, since I can't comment nib/xib files, and it takes too long to reverse engineer my own (or worse, someone else's) bindings when I'm doing

Re: Drawing the background of a single row in NSTableView

2009-07-02 Thread Michael Ash
On Wed, Jul 1, 2009 at 8:09 PM, Peter Zegelinpe...@fracturedsoftware.com wrote: On 01/07/2009, at 6:55 PM, Dado Colussi wrote: Subclass NSTableView and implement your special drawing in - (void)drawBackgroundInClipRect:(NSRect)clipRect. /Dado Problem with this is there is no obvious

Re: NSTableView bug?

2009-07-02 Thread Scott Andrew
I had this problem but it had to do with calculating the height for the row and returning a float value. When i made sure i returned an int this went away. Not sure if you doing that. Scott On Jul 2, 2009, at 7:51 AM, Chris Carson wrote: Hello, I've created a simple application with an

Re: User interface validation doesn't work, right?

2009-07-02 Thread Andy Lee
On Thursday, July 02, 2009, at 03:48AM, Bill Cheeseman b...@cheeseman.name wrote: I'm not assuming that it works with all user controls. The document I quoted from says it does, explicitly and in detail, without qualification. This is why in my Radar I suggested the validated item

Re: User interface validation doesn't work, right?

2009-07-02 Thread Keary Suska
On Jul 2, 2009, at 1:48 AM, Bill Cheeseman wrote: I'm not assuming that it works with all user controls. The document I quoted from says it does, explicitly and in detail, without qualification. All I asked in my original post is whether I'm correct in concluding that in fact buttons don't

Re: warning:assignment from distinct Objective-C type

2009-07-02 Thread Kyle Sluder
On Thu, Jul 2, 2009 at 7:06 AM, Mac Firstmacfi...@playnaked.com wrote: Note that, if you want a mutable array, you can wrapper the return-result in  [NSMutableArray arrayWithArray: ... ] Or use the -mutableCopy method. --Kyle Sluder ___ Cocoa-dev

Re: UIImageView source

2009-07-02 Thread Tan E-Liang
You could try this if you're lazy... Just call the presentImagePickerWithSource and choose your source type (camera or photo library) - (void)presentImagePickerWithSource: (UIImagePickerControllerSourceType)sourceType { pickerController = [[UIImagePickerController alloc]init];

Re: Setting a document's icon and default app

2009-07-02 Thread Kyle Sluder
On Thu, Jul 2, 2009 at 7:06 AM, Michael Dominomichael.dom...@identityfinder.com wrote: I¹ve set up my app with a document type (see below), moved the app to Applications, logged out, logged back in, created a document of this type, but the setting the doc¹s icon and association with my app does

Re: NSTableView bug?

2009-07-02 Thread Shawn Erickson
On Thu, Jul 2, 2009 at 8:37 AM, Michael Ashmichael@gmail.com wrote: On Thu, Jul 2, 2009 at 10:51 AM, Chris Carsoncucar...@yahoo.com wrote: Hello, I've created a simple application with an NSTableView. I have written a delegate for this table,

Re: Sorting on a table view of a managed object - debugger throws exception

2009-07-02 Thread Steve Cronin
Quincy; Hey thanks for some useful data! BUT it is not what is happening in this case. I have a base class MyManagedObject that all entities are derived from. MyManagedObject has the - setNilValueForKey: method defined. I set a breakpoint there and a log message as well. Neither are ever

Re: User interface validation doesn't work, right?

2009-07-02 Thread Michael Ash
On Thu, Jul 2, 2009 at 3:48 AM, Bill Cheesemanb...@cheeseman.name wrote: I did find it confusing when I read the NSMenuItem and NSToolbarItem Class Reference documents, which say that they conform to the other protocol, the NSValidatedUserInterface protocol. But this tends to suggest that

Re: NSTableView bug?

2009-07-02 Thread Tito Ciuro
On 2 Jul 2009, at 9:36 AM, Shawn Erickson wrote: On Thu, Jul 2, 2009 at 8:37 AM, Michael Ashmichael@gmail.com wrote: On Thu, Jul 2, 2009 at 10:51 AM, Chris Carsoncucar...@yahoo.com wrote: Hello, I've created a simple application with an NSTableView. I have written a delegate for

Re: NSTableView bug?

2009-07-02 Thread I. Savant
On Jul 2, 2009, at 12:52 PM, Tito Ciuro wrote: Not to mention that dragging the scroll thumb one pixel will result in thousands of rows scrolled at once. Simply useless. Well, yes, but the only real way to avoid that is to design your application to limit the amount of data presented to

Re: NSTableView bug?

2009-07-02 Thread Tito Ciuro
On 2 Jul 2009, at 9:56 AM, I. Savant wrote: On Jul 2, 2009, at 12:52 PM, Tito Ciuro wrote: Not to mention that dragging the scroll thumb one pixel will result in thousands of rows scrolled at once. Simply useless. Well, yes, but the only real way to avoid that is to design your

Re: NSTableView bug?

2009-07-02 Thread I. Savant
On Jul 2, 2009, at 1:11 PM, Tito Ciuro wrote: I totally agree. I would never present anywhere that much info to the user. It's overwhelming and difficult to navigate through. My comment referred to a bad approach in design: I was adding another argument as to why displaying 14 million rows

Re: NSTableView bug?

2009-07-02 Thread Jean-Daniel Dupas
I've created a simple application with an NSTableView. I have written a delegate for this table, numberOfRowsInTableView:objectValueForTableColumn:row:, that returns the number of rows in the table when requested. My application uses the table view to display hexadecimal data on a flash

Re: NSTableView bug?

2009-07-02 Thread Scott Andrew
I was going to recommend 0xED is a good one too. Very fast and he appears to be using a custom view of somesort. Scott On Jul 2, 2009, at 10:21 AM, Jean-Daniel Dupas wrote: I've created a simple application with an NSTableView. I have written a delegate for this table,

NSDocument's -close method calls itself?

2009-07-02 Thread Sean McBride
Hi all, I'm trying to find somewhere to undo what was done in my NSDocument subclass' initializer. Specifically, to start/stop KVO observation. It seemed like 'close' would be a good place. First, should/must one call super in one's 'close' implementation? It seems so. After trying this,

Re: User interface validation doesn't work, right?

2009-07-02 Thread Bill Cheeseman
On Jul 2, 2009, at 12:24 PM, Keary Suska wrote: Because the two protocols in question are formal protocols, the @interface declaration must specify conformance. If it doesn't, then no assumption of conformance should be made. Pure and simple. Also, protocol conformance is not inheritable

Re: NSTableView bug?

2009-07-02 Thread Greg Guerin
Tito Ciuro wrote: Not to mention that dragging the scroll thumb one pixel will result in thousands of rows scrolled at once. Simply useless. Hold down the Option key and drag the thumb. It should micro scroll for as long as Option remains down. This scroller gesture modifier has been

Why I have to set position at the middle?

2009-07-02 Thread Agha Khan
Hi I am new to Apple programming. I have UIView and it has CALayer (numberLayer). I would like to write something at the middle of that layer. So in my - (id)initWithFrame:(CGRect)frame function I write somthing like this. CGRect viewRect = [self bounds]; CGPoint center =

Re: Sorting on a table view of a managed object - debugger throws exception

2009-07-02 Thread Quincey Morris
On Jul 2, 2009, at 09:41, Steve Cronin wrote: BUT it is not what is happening in this case. Do you in fact have a code property? On the app delegate? What's does it's @property (or accessor prototype) look like? ___ Cocoa-dev mailing list

Drag and Drop UI

2009-07-02 Thread Jay Kickliter
I've been working on some ground station software for controlling amateur UAV's. I have the basic functionality working, but I'd like to make it more generic so other people can configure it without having to recompile. My thoughts are to have a palette of UI elements, suck as dials,

CoreData - $FETCH_SOURCE and fetched properties (coredata newby)

2009-07-02 Thread Jose P.
Hi everybody Here, a CoreData novice, stumped at a fairly simple issue, a bit under- documented by apple (Apple under-documenting? uh?). If anyone can give me a hint, I'll be much in debt. Well, the thing is about $FETCH_SOURCE and a Fetched property in Core Data. I create two entities

Re: NSDocument's -close method calls itself?

2009-07-02 Thread Quincey Morris
On Jul 2, 2009, at 10:34, Sean McBride wrote: I'm trying to find somewhere to undo what was done in my NSDocument subclass' initializer. Specifically, to start/stop KVO observation. It seemed like 'close' would be a good place. 'close' isn't a good place, because it isn't necessarily

Re: NSTableView bug?

2009-07-02 Thread Tito Ciuro
On 2 Jul 2009, at 11:10 AM, Greg Guerin wrote: Hold down the Option key and drag the thumb. It should micro scroll for as long as Option remains down. This scroller gesture modifier has been around for a while. Wow. Never heard about this one before. I wonder how many people know about

Private copy not working correctly

2009-07-02 Thread Joe Turner
Hello, I'm trying to create a private copy of an object, but yet when the original changes, my copy changes too. I have an array of dictionaries called spacesData. Then, when I do: NSDictionary *backup = [[spacesData objectAtIndex:index] copy]; everything is fine, and this one looks as it

How a subview can inform to the controler that an event has happened?

2009-07-02 Thread Agha Khan
I am looking the sample Dragging views (The iPhone Developer's Cookbook) where the are N subviews (flowers) are floating inside UIViewController. It is a sample and working, but how subview can inform to UIViewController that the dragging (an event) has finished? -Agha

Re: How a subview can inform to the controler that an event has happened?

2009-07-02 Thread WT
On Jul 2, 2009, at 9:40 PM, Agha Khan wrote: I am looking the sample Dragging views (The iPhone Developer's Cookbook) where the are N subviews (flowers) are floating inside UIViewController. The subviews are not floating inside the view controller. Views are subviews only to other views,

Re: Debugging NSService

2009-07-02 Thread Laurent Cerveau
Hi Peter Thanks for the tips. I ended up finding that yes the Service was appearing but in Finder only. I think the main confusion was between the steps of having the service appear in the menu and the service menu item being enabled or not. It looks like a trick to simply appear is,

Reading and writing rtf(d) files

2009-07-02 Thread Ian Piper
bump bump :-) Ian. -- ianpi...@mac.com 07590 685840 | 01926 811383 Begin forwarded message: From: Ian Piper ianpi...@mac.com Date: 1 July 2009 3:53:52 pmBST To: Cocoa-dev@lists.apple.com Subject: Reading and writing rtf(d) files Hi all, I have a question about reading and writing file

Re: User interface validation doesn't work, right?

2009-07-02 Thread Andy Lee
On Thursday, July 02, 2009, at 01:52PM, Bill Cheeseman b...@cheeseman.name wrote: On Jul 2, 2009, at 12:24 PM, Keary Suska wrote: Because the two protocols in question are formal protocols, the @interface declaration must specify conformance. If it doesn't, then no assumption of

screen lock events?

2009-07-02 Thread Carl Harris
Are there events that I can observe that indicate when the screen lock has activated/deactivated? I have a background agent that should really be disabled when the screen is locked... Thanks for any pointers... -- Carl Harris cehar...@vt.edu ___

documenting bindings (was: Re: Dynamically loading a part of a Window in Cocoa)

2009-07-02 Thread Andy Lee
On Thursday, July 02, 2009, at 11:39AM, Michael Ash michael@gmail.com wrote: On Wed, Jul 1, 2009 at 11:18 PM, Marco S Hymanm...@snafu.org wrote: [...] That leads directly to something I've been thinking about as one new to cocoa: how do you document your bindings?   Any preferred formats

probablem with NSView redisplay.

2009-07-02 Thread Mac First
I have an NSWindowController driving a window, with a view, with subviews. One of the subviews is an NSView *imageParentView. This view's only purpose is to provide a frame, a bounding box inside which its subview will be held. It's one and only subview is NSImageView *imageView. The

Changing content of object inside NSMutableArray

2009-07-02 Thread Agha Khan
HI I have saved some objects inside GameArray (type NSMutableArray) and I would like to change of content of an object inside that array. GameObj is type of UIView so it has a frame. GameObj* p = [GameArray objectAtIndex:0]; p.frame = frame; This works, but this is not changing the content

Re: documenting bindings (was: Re: Dynamically loading a part of a Window in Cocoa)

2009-07-02 Thread Kyle Sluder
On Thu, Jul 2, 2009 at 2:25 PM, Andy Leeag...@mac.com wrote: My first reaction was: Elegantly put!  But then I thought, isn't *not* generating this kind of code one of the reasons we tell people nibs are good?  Wouldn't a .m be a good place to document targets and actions as well?   And

Re: Changing content of object inside NSMutableArray

2009-07-02 Thread Nick Zitzmann
On Jul 2, 2009, at 4:36 PM, Agha Khan wrote: This works, but this is not changing the content inside the GameArray. How this can be done. Use -replaceObjectAtIndex:withObject:. You are responsible for maintaining your own arrays; changing a pointer will not change the contents of the

Re: Determining OS at Runtime

2009-07-02 Thread Steve Christensen
On Jul 1, 2009, at 5:22 PM, Sherm Pendley wrote: On Wed, Jul 1, 2009 at 7:24 PM, iseecolorsiseecol...@sbcglobal.net wrote: I need to support 10.4 in my application, but it uses some Carbon APIs that are deprecated in 10.5 and I am using some new 10.5 APIs that require the 10.5 SDK. I am

Re: Determining OS at Runtime

2009-07-02 Thread Dave DeLong
One way that I've seen used is to do this: BOOL isLeopardOrBetter = YES; Class gcClass = NSClassFromString(@NSGarbageCollector); if (gcClass == nil) { isLeopardOrBetter = NO; } Cheers, Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: User interface validation doesn't work, right?

2009-07-02 Thread Quincey Morris
On Jul 2, 2009, at 14:05, Andy Lee wrote: Hm, you know what, it seems odd to me that the NSValidatedUserInterfaceItem protocol doesn't include setEnabled: or some such. The doc says, If no responder returns YES, the item is disabled. But how can the application know it *can* disable the

Re: disabling grammar checking

2009-07-02 Thread kvic...@pobox.com
At 6:57 PM -0700 6/29/09, Martin Wierschin wrote: i'm not happy that the framework is changing the name of my menu item from Show SpellingS (as i've specified in IB) to Show Spelling and Grammar. is there some way to globally fix this? (i know i can provide my overrides of showGuessPanel: and

Re: Private copy not working correctly

2009-07-02 Thread Adam R. Maxwell
On Jul 2, 2009, at 12:05 PM, Joe Turner wrote: I'm trying to create a private copy of an object, but yet when the original changes, my copy changes too. I have an array of dictionaries called spacesData. Then, when I do: NSDictionary *backup = [[spacesData objectAtIndex:index] copy];

Re: Reading and writing rtf(d) files

2009-07-02 Thread Ali Ozer
TextEdit sources in /Developer/Examples/AppKit/TextEdit may be useful. TextEdit's document types are set up to read/write RTF and RTFD, in addition to a number of other types. Ali On Jul 2, 2009, at 14:04 , Ian Piper wrote: bump bump :-) Ian. -- ianpi...@mac.com 07590 685840 | 01926

Re: Determining OS at Runtime

2009-07-02 Thread Steve Christensen
On Jul 2, 2009, at 4:29 PM, Steve Christensen wrote: On Jul 1, 2009, at 5:22 PM, Sherm Pendley wrote: On Wed, Jul 1, 2009 at 7:24 PM, iseecolorsiseecol...@sbcglobal.net wrote: I need to support 10.4 in my application, but it uses some Carbon APIs that are deprecated in 10.5 and I am using

Re: User interface validation doesn't work, right?

2009-07-02 Thread Quincey Morris
Er, sorry about all the typos in the previous post on this subject. On Jul 2, 2009, at 16:33, Quincey Morris wrote: Something (presumabl[y] NSApp) presumabl[y] calls 'update' for the main NSMenu, and the 'update' calls trickle down to the NSMenuItems, which then initiate their own

Re: Determining OS at Runtime

2009-07-02 Thread Clark Cox
On Thu, Jul 2, 2009 at 4:33 PM, Dave DeLongdavedel...@me.com wrote: One way that I've seen used is to do this: BOOL isLeopardOrBetter = YES; Class gcClass = NSClassFromString(@NSGarbageCollector); if (gcClass == nil) { isLeopardOrBetter = NO; } Don't do that. Check for the specific feature

Re: Why Applespell.service fail to launch?

2009-07-02 Thread Dave Keck
This code works just fine for me: NSLog(@%@, NSStringFromRange([[NSSpellChecker sharedSpellChecker] checkSpellingOfString: @hello, hwo are you today? startingAt: 0])); Which prints '{7, 3}', as expected. I'll go out on a limb and guess that you're trying to access the spell checker from an

Re: User interface validation doesn't work, right?

2009-07-02 Thread Andy Lee
On Thursday, July 02, 2009, at 07:33PM, Quincey Morris quinceymor...@earthlink.net wrote: I really all makes sense, I think, I think it makes the most sense if you figure out the validateMenuItem: mechanism, then figure out the validateToolbarItem: mechanism, then see they're closely related

Possible NSPredicateEditor bug

2009-07-02 Thread Tom
Hi everyone, I'm either doing something wrong, or I've found a bug in NSPredicateEditor. Whenever I use setObjectValue: on the NSPredicateEditor, it displays the new predicate, but if I change a couple of the operators (is, contains, begins with, etc) the text fields on the rows

Re: Sorting on a table view of a managed object - debugger throws exception

2009-07-02 Thread Steve Cronin
Quincey; Do you in fact have a code property? On the app delegate? What's does it's @property (or accessor prototype) look like? The 'code' property is declared on an entity: MyEntity. The accessors were created by XCode itself using the 'Copy Method Declaration/Implementation to Clipboard'

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

2009-07-02 Thread Jerry Krinock
If -[NSKeyedUnarchiver unarchiveObjectWithData:] is handed a corrupt archive, it raises an exception AND crashes the program. I find this to be very annoying since, almost always, archives come from files or network sources where corruption is possible. Therefore, I have always protected

Re: Windows on main thread always only sometimes?

2009-07-02 Thread Michael Ash
On Thu, Jul 2, 2009 at 2:16 PM, Jack Repenningjackrepenn...@tigris.org wrote: I've always been taught that one must only create and run AppKit objects on the main thread. Recently, though, over in objc-language,  http://lists.apple.com/archives/Objc-language/2009/Jul/msg2.html it was

Re: documenting bindings (was: Re: Dynamically loading a part of a Window in Cocoa)

2009-07-02 Thread Michael Ash
On Thu, Jul 2, 2009 at 5:25 PM, Andy Leeag...@mac.com wrote: On Thursday, July 02, 2009, at 11:39AM, Michael Ash michael@gmail.com wrote: On Wed, Jul 1, 2009 at 11:18 PM, Marco S Hymanm...@snafu.org wrote: [...] That leads directly to something I've been thinking about as one new to

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

2009-07-02 Thread Michael Ash
On Thu, Jul 2, 2009 at 11:17 PM, Jerry Krinockje...@ieee.org wrote: If -[NSKeyedUnarchiver unarchiveObjectWithData:] is handed a corrupt archive, it raises an exception AND crashes the program.  I find this to be very annoying since, almost always, archives come from files or network sources

Re: documenting bindings (was: Re: Dynamically loading a part of a Window in Cocoa)

2009-07-02 Thread Jeff Johnson
On Jul 2, 2009, at 4:25 PM, Andy Lee wrote: On Thursday, July 02, 2009, at 11:39AM, Michael Ash michael@gmail.com wrote: On Wed, Jul 1, 2009 at 11:18 PM, Marco S Hymanm...@snafu.org wrote: [...] That leads directly to something I've been thinking about as one new to cocoa: how do you

Re: Sorting on a table view of a managed object - debugger throws exception

2009-07-02 Thread Quincey Morris
On Jul 2, 2009, at 19:51, Steve Cronin wrote: SortDescriptor is, of course, an NSArray - which is also named 'code'. Huh? Does the matching name mean something about the MyEntity code property? Furthermore this all works peachy in a Release build on either Tiger or Leopard. Clicking on

Re: Determining OS at Runtime

2009-07-02 Thread Andrew Farmer
On 2 Jul 2009, at 16:29, Steve Christensen wrote: If you want to make sure that you don't include any old code in your executable when you decide to make 10.5 (for example) your base OS version, you could arrange your code like this: #if MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5

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

2009-07-02 Thread Jerry Krinock
On 2009 Jul 02, at 21:11, Michael Ash wrote: Is there a reason you can't just implement a new method in a category and not replace the existing one? It will be just as safe in your code, just as easy to use, I'd considered doing that and yes it could be done. But then it would have a

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