On 27-5-2011 12:11, Tommaso Cucinotta wrote:
> Il 27/05/2011 10:17, Vincent van Ravesteijn ha scritto:
>> I don't like this. In all dialogs, calling buffer() will give you the
>> currentBufferView(). It is confusing if it is suddenly different here.
> 
> because in each & every usage of the buffer() method in this
> dialog, I needed a different buffer (the document one, not the
> current one). So I thought the most immediate change was
> an override of the buffer() method, as opposed to introducing
> a new method.

Well, it's not about what works, but it is about that other people
never know what buffer() actually means if it is something different
for each dialog.

What is wrong with introducing a new method. It's exactly the same
amount of code (except for renaming all buffer() occurences).

>> If this is an exception, then you might better want to get the document
>> buffer explicitly. What makes GuiCitation an exception?
> 
> Explained above: we don't care about citations inserted into the Find WA
> (the user is not supposed to insert citations there, but he can if he really
> wants, if he wants to search for a bibliographic entry itself :-) )
>> Why does GuiRef not have to refer to the documentBuffer as well.
> 
> because in GuiRef that's implicit: we don't use buffer(), but there's a combo
> box with the currently open documents, and the user can choose the buffer
> from there, then it's retrieved by name via theBufferList().get(...);
> The same combo might (should ?) be ported to the GuiCitation as well.

I don't think that that is necessary. People won't often refer to a citation
in another dialog.

Vincent

Reply via email to