How to make NSImageCell draw an NSImage template in white?

2011-09-07 Thread Gabriele de Simone
I'm trying to mimic the following automatic behavior of NSTableView/NSOutlineView: When drawing NSImageCells that use a "template" NSImage (either because the image name ends with "Template" or because -[NSImage setTemplate:YES] was called), the table view automatically renders the image in whi

NSPasteboardItem kPasteboardTypeFileURLPromise

2011-08-12 Thread Gabriele de Simone
Hi everyone, I am trying to implement "promise" type file drags from my app to the Finder using the new, 10.6-and-later NSPasteboardItem APIs. I found almost no information about it, and it didn't seem to make sense. It starts in the outlineView:writeItems:toPasteboard: method of my NSOutlineV

No more .ibplugins in Xcode 4, so now what...?

2011-05-13 Thread Gabriele de Simone
> No more .ibplugins in Xcode 4, so now what...? I've faced the same problem, and found no elegant solution. Removing dependencies on external plug-ins from a large IB file is tedious and error-prone. Maybe it's unreasonable to think that Xcode will support plug-ins again, but I'm still hopeful

Re: [NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?

2009-08-10 Thread Gabriele de Simone
The KVC infrastructure did not always generate value-changed notifications for setValue:forUndefinedKey: overrides. The setValue:forUndefinedKey: override should have nothing to do with it. It's the setValue:forKey: call -- the one which provokes the call to setValue:forUndefinedKey: --

Re: [NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?

2009-08-08 Thread Gabriele de Simone
On Aug 8, 2009, at 2:37 PM, Keary Suska wrote: It used to be that if you overrode -[NSObject setValue:forUndefinedKey:] your own subclass was responsible for calling -[NSObject will/didChangeValueForKey: so that bindings and observers would work as expected. That was fine, since it allowed one

[NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?

2009-08-07 Thread Gabriele de Simone
It used to be that if you overrode -[NSObject setValue:forUndefinedKey:] your own subclass was responsible for calling -[NSObject will/didChangeValueForKey: so that bindings and observers would work as expected. That was fine, since it allowed one to provide different implementations depe