FROM : Stephen Deken
DATE : Wed Aug 30 18:32:24 2006
Hello all,
I've just found a rather strange bug that impacts NSSliders when an
invalid registered default is written to NSUserDefaults. Once the
invalid value is written, all NSSliders will no longer track the
mouse -- instead they will 'snap back' when the mouse leaves a region
loosely defined by the height of the control and the width of the
screen.
I have a simple project (too large to post here) that demonstrates
this problem, but the offending line is this:
[[NSUserDefaults standardUserDefaults] registerDefaults:
[NSDictionary dictionaryWithObjectsAndKeys: [NSColor blackColor],
@"dumb2", nil]];
Instead of [NSColor blackColor], I should have written [NSArchiver
archivedDataWithRootObject:[NSColor blackColor]] -- that resolves the
problem.
Has anyone else seen this behavior? Is there a rdar: bug on this?
Stephen Deken
stephen.<email_removed>
DATE : Wed Aug 30 18:32:24 2006
Hello all,
I've just found a rather strange bug that impacts NSSliders when an
invalid registered default is written to NSUserDefaults. Once the
invalid value is written, all NSSliders will no longer track the
mouse -- instead they will 'snap back' when the mouse leaves a region
loosely defined by the height of the control and the width of the
screen.
I have a simple project (too large to post here) that demonstrates
this problem, but the offending line is this:
[[NSUserDefaults standardUserDefaults] registerDefaults:
[NSDictionary dictionaryWithObjectsAndKeys: [NSColor blackColor],
@"dumb2", nil]];
Instead of [NSColor blackColor], I should have written [NSArchiver
archivedDataWithRootObject:[NSColor blackColor]] -- that resolves the
problem.
Has anyone else seen this behavior? Is there a rdar: bug on this?
Stephen Deken
stephen.<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Stephen Deken | Aug 30, 18:32 | |
| Michael Jurewitz | Aug 30, 19:33 |






Cocoa mail archive

