Hi Quentin

On Wed, 13 Apr 2011 19:26 +0200, "Quentin Mathé" <[email protected]>
wrote:
> > I've got an application controlled by a NSDocumentController.
> 
> You mean ETDocumentController, right?… given that NSDocument-architecture
> is not compatible with EtoileUI.

Yes of course (as per usual, shouldn't draft emails when I'm tired).
I've been using the MarkupEditor example to learn how to use
ETItemTemplate and ETController properly.

> 
> [[ETTool activeTool] keyItem] should return what you want. See also
> -[ETTool mainItem] that corresponds to the main window (-keyItem
> corresponds to the key window).

These methods seem to do exactly what I want. I'll give them a try
tonight.
 
> What do you mean by the active tool doesn't seem to be connected to a
> responder?

[ETTool mainItem]._next_responder seemed to be nil when I was inspecting
it in a debugger; this isn't what I was expecting, but its possible
because the @selector(add:) handler is called from a menu item.
 
> > Would anyone have an idea how to go about this, or be able to suggest an 
> > alternative approach?
> 
> If you use ETDocumentController, you can send -activeItem to it to get
> the frontmost item that corresponds to the current document. That would
> be the recommended way.

Thats what I've wanted to do, but I don't know how to get to the
document controller instance from the ETItemTemplate. Would [ETApp
delegate] return what I want?

Thanks
Chris

-- 
  Christopher Armstrong
  carmstrong ^^AT^ fastmail dOT com /Dot/ au


_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev

Reply via email to