Re: Speaking of the Style Dialog...


Subject: Re: Speaking of the Style Dialog...
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Tue Feb 06 2001 - 20:27:31 CST


On Tue, 6 Feb 2001, John L. Clark wrote:

> On Wed, Feb 07, 2001 at 12:10:20PM +1100, Martin Sevior wrote:
> > Do:
> >
> > PD_Document * pDoc =
> > getFrame()->getCurrentView()->getLayout()->getDocument();
>
> Hmmm, I'm not entirely sure how to word this, so you'll have to forgive
> any points of unclarity. getFrame() is a method of EV_UnixToolbar, but
> not of EV_Toolbar, but UnixToolBar_StyleCombo (via EV_Toolbar_Control)
> has a EV_Toolbar* member. So how can I access this method in a platform
> independent way?
>

Whoops I guessed that EV_Toolbar would have Frame pointer. If all else
fails you can do

XAP_Frame * pFrame = getApp()->getCurrentFrame()

or if that fails do:

XAP_Frame *pFrame = XAP_App::getApp()->getCurrentFrame();

> I then attempted to gain access to this function by adding a declaration
> for it in EV_Toolbar (which is a clue that I'm doing something wrong,
> but anyway...), but then I get:
>
> ap_UnixToolbar_StyleCombo.cpp:78: no matching
> function for call to `AV_View::getLayout ()'
>

Sorry, cast AV_View to FV_View

FV_View * pView = (FV_View *) pFrame->getCurrentView();

> And AV_View doesn't actually have any reference to Document information,
> either (which, as far as I can tell, makes sense in the class
> hierarchy).
>
> So what am I missing, in the class scheme of things?
> >
> > Feel free to keep us posted and ask for help!
> >
>
> As you can see, I will be taking this advice. :)
>

Keep asking:-)

Martin



This archive was generated by hypermail 2b25 : Tue Feb 06 2001 - 20:27:46 CST