[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Nov 11 14:49:02 1997 
Subject:Re: Converting Openlook to Motif 
From:Iain McKay 
Volume-ID:971111.01 

Thanks to everyone who has replied to my original post. I've
been experimenting with Motif in POP11 and seem to have come
to a problem I just cannot work out. Here it is. 

I'm trying to create a menubar. When I try this:

define CreateMenuBar(parent) -> menu_bar;
	lvars parent, menu_bar, cascade, menu_pane, button, ac =1;

	XmCreateMenuBar(parent, 'menu_bar',
	XptVaArgList ([{orientation ^XmHORIZONTAL}]), ac) -> menu_bar;

	XtManageChild(menu_bar);

enddefine;


I get this error message: 

	STACK EMPTY (missing argument? Missing result?)

and when I try this:

define CreateMenuBar(parent) -> menu_bar;
	lvars parent, menu_bar, cascade, menu_pane, button, ac =1;

	XmCreateMenuBar(parent, 'menu_bar',
	[{orientation ^XmHORIZONTAL}], ac) -> menu_bar;

	XtManageChild(menu_bar);

enddefine;

I get this error message: 

	INVALID DATATYPE FOR EXTERNAL WIDGET PROCEDURE
	involving [{orientation 2}]

When is do this

define CreateMenuBar(parent) -> menu_bar;
	lvars parent, menu_bar, cascade, menu_pane, button, ac =1;

XtVaCreateManagedWidget('awDesMenus', RowColumnWidget, parent,
    XptVaArgList ([{orientation ^XmHORIZONTAL}])) -> menu_bar;

	XtManageChild(menu_bar);

enddefine;

It loads fine (but I have similar problems latter with XmCreatePulldownMenu

The problem seems to be defining the arglist for commands like XmCreatePulldownMenu
and so on. 

Now, I've had a look through the various pop11 demos and teach, ref, etc files
as well as the X Window Motif manuals, but I cannot see where I am going wrong 
at all. Do I have to load a specific file in (via "uses")? Or is it something 
else? I've been trying to work this out for a few days now, so any help would
be very gratefully received.

-- 

              Iain McKay : <iainm@cad.strath.ac.uk> 
                           ------
*****************************************************************
*****       And you, are you so forgetful of your past,     *****
***    is there no echo in your soul of your poets' songs,    ***
**           your dreamers' dreams, your rebels' calls?"       **
*                          ~ Emma Goldman                       *
*****************************************************************