Adding a View to a Presenter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding a View to a Presenter

Eric Taylor
Hello Forum,

After much exploration of the issue of Views and Presenters, we feel
like we've pretty much got the idea.  Today, we crafted the classes that
support our ActiveX control (at a higher level), subclassing off the
Dolphin framework where possible and appropriate, and now we have a
practical question.

We subclassed View to create XtremeCommandBarsView.  Instead of adding
the view instance to a presenter, we added the view instance to
XtremeCommandBarsView, in the same manner as OA has done with
<PushButton>s and <LinkButton>s.  The instance is simple called "Default
view" at this point.  This view instance contains the actual
AXControlSite that points to the XtremeCommandBars ActiveX control.  We
tested this arrangement, and everything was fine.  Using a centered
BorderLayout, the control fills the view, and does, indeed, show a
dockable and floatable command bar a la MS Office.  We saved down the
view.  Then we created an XtremeCommandBarsPresenter, but we're not sure
if we're adding the XtremeCommandBarsView correctly: We mutated the
ContainerView into XtremeCommandBarsView (since we can't figure out a
more direct way of adding the View), and then tested the arrangement.
This time, however, nothing shows, as if the XtremeCommandBarsView
weren't there.  We just get a whitewashed window.

Are we doing something wrong?  


Cheers,

Eric


Reply | Threaded
Open this post in threaded view
|

Re: Adding a View to a Presenter

Ian Bartholomew-21
Eric,

> Are we doing something wrong?

I'm not sure about the main part of the question, I avoid ActiveX as much as
possible, but for the comment about adding Views...

There's a class side method in Presenter that allows you to add a View to a
Presenter ...

APresenterClass addView: AViewClass asResource: ResourceName

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.