On Nov 13, 2007, at 5:04 PM, Christiaan Hofman wrote:
>
> On 14 Nov 2007, at 1:54 AM, Adam R. Maxwell wrote:
>
>>
>> On Tuesday, November 13, 2007, at 04:09PM,
>> <[EMAIL PROTECTED]> wrote:
>>
>>> -- (void)fileView:(FileView *)aFileView willDisplayContextMenu:
>>> (NSMenu *)menu forIconAtIndex:(NSUInteger)anIndex {
>>> +// shouldn't this method return a menu rather than modifying one?
>>> +- (NSMenu *)fileView:(FileView *)aFileView contextMenu:(NSMenu *)
>>> menu forIconAtIndex:(NSUInteger)anIndex {
>>
>> I debated this with myself, but ended up thinking of it more as -
>> menuNeedsUpdate: than -menuForEvent: (I couldn't recall the method
>> signature so the name didn't reflect that). Either way works, but
>> I think returning and passing as a parameter is redundant; if
>> returning a menu and adding its contents to the original is easier,
>> that's fine with me.
>>
>
> Most views have a delegate methods that returns a menu.
Which ones? (just curious...I see fewer of them in the docs than I
thought)
> Also the
> delegate now has more choices, it can modify the menu or replace it.
> In this particular case it doesn't matter anymore as we also copy the
> menu.
Well, I'd rather have a straightforward API. The delegate can remove/
replace all items either way.
>> Not sure what menu stuff you wanted to include in FileView? The
>> Open With... menu would be nice to have in FileView directly, but I
>> didn't want to include stuff that's already in BD.
>
> I was thinking of the Open With menu, yea. But it needs more stuff
> than I thought, that's a pity.
Yeah, it ends up being a fair amount of code. A BibDesk-specific
FileView subclass to override the menu stuff should work.
> Is it actually necessary to keep it in a separate framework?
I'm not sure where it becomes truly necessary, but it's a large enough
collection of specialized code that I'd prefer to keep it in a
separate framework. That will tend to keep the API more limited, and
also make sure it's easily reusable (or disposable if we switch to
ImageKit). If it goes into BD, I could easily see it ballooning out
with specialized code and becoming impossible to extract.
--
adam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop