Mike,
This doesn't seem normal. I added a couple of lines to the
examples/matrix/matrix.c program to verify this, and indeed
the prev_text does have a non-NULL value.
My modified program is attached, could you check what
it does on your system ?
Danny
gdb matrix2
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-suse-linux"...
(gdb) break modify
Breakpoint 1 at 0x8048996: file ../../../SOURCES/examples/matrix/matrix2.c, line
106.
(gdb) r
Starting program: /home/danny/Hungry/Xbae/BUILD/examples/matrix/matrix2
Breakpoint 1, modify (w=0x8064578, client=0x0, call=0xbffff25c)
at ../../../SOURCES/examples/matrix/matrix2.c:106
106 XbaeMatrixModifyVerifyCallbackStruct * cbp =
(XbaeMatrixModifyVerifyCallbackStruct *)call;
(gdb) s
108 fprintf(stderr, "Yow\n");
(gdb) p *cbp
$1 = {reason = XbaeModifyVerifyReason, event = 0x0, row = 1, column = 3, verify
= 0xbffff30c,
prev_text = 0x401a6a39 ""}
(gdb) p *cbp->prev_text
$2 = 0 '\000'
(gdb) q
The program is running. Exit anyway? (y or n) y
Mike Accolla wrote :
> I developed a Motif application on a Data General
> Machine using the 4.6 version of Xbae. Everything was
> working fine. I was tasked to port the application
> over to a Sun-Ultra10 workstation running Solaris2.8.
>
> I recompiled the application. Ran it, and it core
> dumped in the XtVaCreateManagedWidget() for the
> XbaeMatrix. I assumed I would need to upgrade the
> Xbae library and include files, so I installed the
> 4.8.1 version of Xbae and recompiled my app. This
> time it came up correctly. However, I have a
> XbaeMatrixModifyVerifyCallback function that checks
> the prev_text value of the
> XbaeMatrixModifyVerifyCallbackStruct structure. It is
> always being passed in NULL. I tried all the other
> versions (4.8.2, 4.8.4, 4.9.1) all have the same
> problems.
>
> Is this a known problem?? Is it a problem at all??
> Should I be handling this differently??
--
Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
Home page : http://users.skynet.be/danny.backx
Projects: LessTif (http://www.lesstif.org)
Oleo (http://www.gnu.org/software/oleo/oleo.html)
/*
* Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore)
* All rights reserved
*
* Copyright � 2001 by the LessTif Developers
*
* Permission to use, copy, modify and distribute this material for
* any purpose and without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies, and that the name of Bellcore not be used in advertising
* or publicity pertaining to this material without the specific,
* prior written permission of an authorized representative of
* Bellcore.
*
* BELLCORE MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES, EX-
* PRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR ANY PARTICULAR PURPOSE, AND THE WARRANTY AGAINST IN-
* FRINGEMENT OF PATENTS OR OTHER INTELLECTUAL PROPERTY RIGHTS. THE
* SOFTWARE IS PROVIDED "AS IS", AND IN NO EVENT SHALL BELLCORE OR
* ANY OF ITS AFFILIATES BE LIABLE FOR ANY DAMAGES, INCLUDING ANY
* LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT-
* ING TO THE SOFTWARE.
*
* $Id: matrix.c,v 1.6 2001/03/30 09:51:50 dannybackx Exp $
*/
#include <stdio.h>
#ifdef HAVE_CONFIG_H
#include <XbaeConfig.h>
#endif
#include <stdlib.h>
#ifdef USE_EDITRES
#include <X11/Intrinsic.h>
#include <X11/Xmu/Editres.h>
#endif
#include <Xbae/Matrix.h>
static String fallback[] = {
"Matrix*mw.rowLabels: 1, 2, 3, 4, 5, 6",
"Matrix*mw.columns: 5",
"Matrix*mw.rows: 6",
"Matrix*mw.columnWidths: 8, 3, 10, 10, 10",
"Matrix*mw.allowColumnResize: True",
"Matrix*mw.cells: Orange, 12, Rough, Inches, Large\\n"
" Blue, 323, Smooth, Feet, Medium\\n"
" Yellow, 456, Bristly, Meters, Large\\n"
" Green, 1, Knobby, Miles, Small\\n"
" Pink, 33, Hairy, Quarts, Small\\n"
" Black, 7, Silky, Gallons, Small",
"Matrix*mw.cellBackgrounds: white, antiquewhite, white, white,
antiquewhite\\n"
" white, antiquewhite, white, white,
antiquewhite\\n"
" white, antiquewhite, white, white,
antiquewhite\\n"
" white, antiquewhite, white, white,
antiquewhite\\n"
" white, antiquewhite, white, white,
antiquewhite\\n"
" white, antiquewhite, white, white,
antiquewhite",
"Matrix*mw.colors: blue, black, blue, blue, black\\n"
" blue, black, blue, blue, black\\n"
" blue, black, blue, blue, black\\n"
" blue, black, blue, blue, black\\n"
" blue, black, blue, blue, black\\n"
" blue, black, blue, blue, black",
"Matrix*mw.columnLabels: Color, #, Texture, Measure, Size",
"Matrix*mw.columnLabelAlignments:alignment_beginning, alignment_center,"
" alignment_beginning, alignment_beginning,"
" alignment_beginning",
"Matrix*mw.columnAlignments: alignment_beginning, alignment_end,"
" alignment_beginning, alignment_beginning,"
" alignment_beginning",
"Matrix*labelFont: -*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*",
"Matrix*fontList: -*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*",
"Matrix*cellHighlightThickness: 2",
"Matrix*cellShadowThickness: 2",
"Matrix*cellMarginWidth: 0",
"Matrix*cellMarginHeight: 3",
"Matrix*gridType: grid_cell_shadow",
"Matrix*cellShadowType: shadow_in",
"Matrix*rowLabelColor: Red",
"Matrix*columnLabelColor: Blue",
"Matrix*mw.buttonLabels: True",
"Matrix*mw.allowColumnResize: True",
NULL
};
void
labelCB(Widget mw, XtPointer cd, XtPointer cb)
{
XbaeMatrixLabelActivateCallbackStruct *cbs =
( XbaeMatrixLabelActivateCallbackStruct * )cb;
if( cbs->row_label )
if( XbaeMatrixIsRowSelected( mw, cbs->row ) )
XbaeMatrixDeselectRow( mw, cbs->row );
else
XbaeMatrixSelectRow( mw, cbs->row );
else
if( XbaeMatrixIsColumnSelected( mw, cbs->column ) )
XbaeMatrixDeselectColumn( mw, cbs->column );
else
XbaeMatrixSelectColumn( mw, cbs->column );
}
void modify(Widget w, XtPointer client, XtPointer call)
{
XbaeMatrixModifyVerifyCallbackStruct * cbp =
(XbaeMatrixModifyVerifyCallbackStruct *)call;
fprintf(stderr, "Yow\n");
}
/*
* Simple example of loaded Matrix
*/
int
main(int argc, char *argv[])
{
Widget toplevel, mw;
XtAppContext app;
toplevel = XtVaAppInitialize(&app, "Matrix",
NULL, 0,
&argc, argv,
fallback,
NULL);
#ifdef USE_EDITRES
XtAddEventHandler( toplevel, (EventMask)0, True,
_XEditResCheckMessages, NULL);
#endif
mw = XtVaCreateManagedWidget("mw",
xbaeMatrixWidgetClass, toplevel,
NULL);
XtAddCallback( mw, XmNlabelActivateCallback, ( XtCallbackProc )labelCB,
NULL );
XtAddCallback(mw, XmNmodifyVerifyCallback, modify, NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
/*NOTREACHED*/
return 0;
}