ListPrevItem, ListNextItem do not work for XmList

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

4 posts / 0 new
Last post
ListPrevItem, ListNextItem do not work for XmList

 

ListPrevItem, ListNextItem do not work for

XmList
Submitted by CrystalCowboy on Tue, 06/15/2010 - 19:17.

Fedora 13, 2.6.33.5-112.fc13.x86_64
openmotif-devel-2.3.3-1.fc13.x86_64
openmotif-2.3.3-1.fc13.x86_64

XmList fc_list;

XtCallActionProc(fc_list, "ListNextItem",NULL,NULL,0);
and
XtCallActionProc(fc_list, "ListNextItem",NULL,NULL,0);

Compiles without complaint, but does not work and causes a core dump. Some other action routines work, such as ListEndData().

These seem to work in Lesstif.

 

Tue, 06/15/2010 - 23:02#1

Tue, 06/15/2010 - 23:02#1

fredk

You must pass a pointer to a

You must pass a pointer to a valid event as the third argument, since List's ListNextEvent() method dereferences it. You pass NULL, and hence the crash.

Lesstif is not Motif; if it works under Lesstif it means that Lesstif's method does not dereference the event parameter.
--
Fred K.

 

Wed, 06/16/2010 - 18:51#2

Wed, 06/16/2010 - 18:51#2

CrystalCowboy

From the manual: "If the

From the manual: "If the named action routine cannot be found, XtCallActionProc generates a warning message and returns."

That doesn't sound quite the same as "If the named action routine cannot be found, XtCallActionProc will blow up your application and dump core."

 

 

 

Fri, 06/18/2010 - 14:19#3

fredk

No warning message was

No warning message was generated because the action routine WAS found. Your app crashed because during the execution of the action routine it tried to use the event passed to it, but you passed NULL. You need to pass it a pointer to a valid event instance.