On 24/12/2009, at 2:58 PM, Jerry Krinock wrote: > I just spent many hours tracking down a problem that turned out to be that a > column width had been written to my app's user defaults as Not a Number > (nan). The only line of code that writes this pref assigns it directly from > -[NSTableColumn width]. I don't see any indication in the documentation that > this method can return nan. Has anyone ever seen -[NSTableColumn width] > return nan?
I couldn't swear to it, but it could have happened because the width ended up at zero, then something else performed a div-by-zero using that width, and inserted an inf or NaN. I've definitely seen some funny effects if resizing allows certain views, tables among them, to end up with zero widths - re-enlarging rarely works afterwords because in going to zero information about proportions, etc was lost. It's worth checking that no column can go to zero when a window is sized very small - set minimum limits on the window and views as needed to ensure it can't happen. --Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com