[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Motif

Posted on 1997-05-22
1
Medium Priority
?
268 Views
Last Modified: 2013-12-26
This should be an easy one, I am using rapidapp for the SGI to create an GUI.  Anyhow what I need to know is how to get the state of a checkbox?  I tried

Boolean bool;
bool=XmNset(_head);

where _head is the name of the checkbox (widget?)

and get the following error

error(3201): expression must have (pointer-to-)

Thanks
0
Comment
Question by:micah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
vpl earned 80 total points
ID: 1293057
micah,

Try this:

===================================
Boolean bool;          
Arg al[1];
int ac=0;

XtSetArg(al[ac],XmNset,&bool); ac++;
XtGetValues(_head,al,ac);
====================================

XtGetValues obtains resource values from a widget.
The first argument is the widget from which to get
values, the second argument is an array of resource-
value pairs, and the third argument is the number
of elements in this array. In the case of XtGetValues,
each resource-value pair consists of a resource name
and the address of a variable in which to place the
value of this resource. When the function returns,
the values of all of the named resources should have
been copied into the appropriate variables whose
addresses were provided.

The call to XtSetArg fills one element of the Arg
array with such a resource-value pair. The first
argument is an element of the Arg array, the second
argument is the resource name, and the third argument
is the address of a variable in which to hold the
value of the named resource.

So, in your particular case, we create an Arg array
with one resource-value pair: XmNset and &bool. We
then call XtGetValues for the widget _head with this
Arg array. This causes the value of _head's XmNset
resource to be placed in bool.

vpl
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question