Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Cannot find callback list in XtAddCallback

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> Cannot find callback list in XtAddCallback Page: [1]
Login
Message << Older Topic   Newer Topic >>
Cannot find callback list in XtAddCallback - May 31, '06, 11:28:13 AM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
Now I am getting "Warning Cannot find callback list in XtAddCallback" and the program locking up on me.
Post #: 1
RE: Cannot find callback list in XtAddCallback - May 31, '06, 1:35:27 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
Check that the widget is specified correctly and/or that the callback_name is valid.
Either the callback_name is correct, but the wrong widget is specified, or the
right widget is specified but the callback_name doesn't exist. It's more likely
the latter.

(in reply to cerenaksu)
Post #: 2
RE: Cannot find callback list in XtAddCallback - May 31, '06, 3:04:18 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
This program has been compiled and run with X11R5 package, under the latest interix before MS bought them. Only thing I did is recompiled it with new X11R6 under SFU.
I have been browsing the web for this warning, I found a lot of them. So many people had the same problem from different platforms.

This issue is not that I made a mistake in my program (which I didn't write and is still running if don't recompile it), it is that another issue with old and newer version of Motif incompatibility.

(in reply to Rodney)
Post #: 3
RE: Cannot find callback list in XtAddCallback - May 31, '06, 5:24:13 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
quote:

Warning Cannot find callback list in XtAddCallback


I went through looking for XtAddCallback () function call and listed all the callback functions it was calling. They are all in the directory I am working in. There is only one function was not in my directory is: XmProcessTraversal(). Is there any issue with this function and it's been called in XtAddCallback().

(in reply to cerenaksu)
Post #: 4
RE: Cannot find callback list in XtAddCallback - Jun. 1, '06, 7:16:59 AM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
It's not the function name that's the issue. It's the callback name.
From the man page:
void XtAddCallback(w, callback_name, callback, client_data)
      Widget w;
      String callback_name;
      XtCallbackProc callback;
      XtPointer client_data;

So it's the second arg -- the list being appended to -- that needs to be verified.

(in reply to cerenaksu)
Post #: 5
RE: Cannot find callback list in XtAddCallback - Jun. 1, '06, 11:11:52 AM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
Thanks for the new direction.

Here is what I found:
The second arguments in XtAddCallback ( ) are:

XmNactivateCallback
XmNlosingFocusCallback
XmNmodifyVerifyCallback
XmNvalueChangedCallback
XmNdefaultActionCallback
XmNmultipleSelectionCallback
XmNbrowseSelectionCallback
XmNexposeCallback
XmNresizeCallback
XmNdestroyCallback

The program makes 1068 calls to XtAddCallback ( ) function.
This must be the list we are having trouble to find. My argument is that how come, older version of the program has no problem with it and I am having this when I compile it now?

(in reply to Rodney)
Post #: 6
RE: Cannot find callback list in XtAddCallback - Jun. 1, '06, 12:23:02 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
>My argument is that how come, older version of the program has no problem with it and I am having this when I compile it now?

One of the names may have changed.

(in reply to cerenaksu)
Post #: 7
RE: Cannot find callback list in XtAddCallback - Jun. 1, '06, 12:35:18 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
Thanks Rodney. Still, the answer doesn't solve this problem.
How can I found out which name is changes. The list of the names are Motif names. There has to be some documentaion somewhere about what is changes what is kept.

(in reply to Rodney)
Post #: 8
RE: Cannot find callback list in XtAddCallback - Jun. 1, '06, 2:02:10 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
... or a correct name may be getting used with a widget that doesn't have this list.

Each man page has a list of valid callback names. For example XmCascadeButton's man page.
It's difficult for me to say "thus" and there's the problem. There's context with it as
well. I don't know of a page mapping Motif 1 to Motif 2 callbacks.

I don't use Motif on a day-to-day basis, so anyone else who want to add a few cents then please do.

You can try setting some breakpoints at functions in the code to give you a stack that you can
then walk up when the error message appears to get the Callback name and where in your code it is started from.

(I'm away for a couple of days and won't be able to answer for a while).

(in reply to cerenaksu)
Post #: 9
RE: Cannot find callback list in XtAddCallback - Jun. 1, '06, 4:26:32 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
Have fun.

I just check the man page for XtAddCallback () again, there is not a list of valid callback names. I ordered some books. Hoping they might help but the latest books for X11R5 not for X11R6. I don't know how much the books for older version will help me.

(in reply to Rodney)
Post #: 10
RE: Cannot find callback list in XtAddCallback - Jun. 5, '06, 11:41:47 AM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
No, no -- I didn't write about the XtAddCallback manual page.
The XtAddCallback page isn't going to have a list because it's a widget indep API.
The list of callback names is widget specific.
So you need to refer to each widget manual page for a callback list for that widget.
XmCascadeButton's man page is an example.

Motif 2 does make X11R6 a base requirement. I'm surprised there hasn't been a book
released on it that you can find.

(in reply to cerenaksu)
Post #: 11
RE: Cannot find callback list in XtAddCallback - Jun. 6, '06, 10:53:40 AM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
I think I found one book which would tell me the differences between X11R5 and R6. Rest of the books I have for X11R5. The name of the books is "Programmer's Suplement for Release 6". I ordered it but haven't got the book yet.

(in reply to Rodney)
Post #: 12
RE: Cannot find callback list in XtAddCallback - Jun. 6, '06, 7:04:24 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
I found this answer to the question I have been trying to find answer by Ken Lee

"What does this mean: Warning: Cannot find callback list in XtAddCallback?

Answer: It means that you gave an invalid callback name to XtAddCallback, e.g., using XmNactivateCallback when the widget does not have a callback with that name.

on the web address: http://www.faqs.org/faqs/motif-faq/part9/section-47.html"
Now if this is the correct answer, how come this program runs perfectly with older Motif (X11R5)and Interix? Is there somewhere Motif thinkers changed the list of callbacks for the Widgets in X11R6?

I am digging through the 2000 page program (I am not kidding) and checking each widget and their callback list.

(in reply to cerenaksu)
Post #: 13
RE: Cannot find callback list in XtAddCallback - Jun. 6, '06, 9:55:39 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
That's what I said back about a week ago.
Quote:
> Either the callback_name is correct, but the wrong widget is specified, or the
> right widget is specified but the callback_name doesn't exist. It's more likely
> the latter.

You write:
> I am digging through the 2000 page program (I am not kidding) and checking each widget and their callback list.

You can automate this with scripts to reduce the duplicates you have to check.
It'll save you time.

(in reply to cerenaksu)
Post #: 14
RE: Cannot find callback list in XtAddCallback - Jun. 7, '06, 4:52:13 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
The reason I put that answer is not that you didn't give me the rephrased version of the same answer, it was because so many people having the same warning. Web is full of them.
My question was how come the older version working without this warning not the new version. The program is the same for both versions. How ever one is compiled with X11R5 and other with X11R6, and I believe the program was written with the Motif 2.1 version, now I have 2.2.2. The books I have mostly for 2.1.
When I figure out I will post it. If anybody knows anything about the differences i am not aware of please let me know.
Thanks

(in reply to Rodney)
Post #: 15
RE: Cannot find callback list in XtAddCallback - Jun. 8, '06, 1:51:30 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
The widgets in my program are: TextFieldWidget, PushButtonWidget, ToggleButtonGadget, ListWidget. These widgets defined in the following classes and their callback list.

xmScaleWidgetClass: 1-XmNdragCallback,
2-XmNvalueChangedCallback

xmTextFieldWidgetClass: 1-XmNactivateCallback
2-XmNloosingFocusCallback
3-XmNmodifyVerifyCallback
4-XmNvalueChangedCallback

xmPushButtonWidgetClass: 1-XmNactivateCallback

xmToggleButtonGadgetClass: 1-XmNvalueChangedCallback

xmListWidgetClass :1-XmNBrowseSelectionCallback
2-XmNdefaultActionCallback
3-XmMultipleSelectionCallback

xmScaleWidgetClass: 1-XmNdragCallback
2-XmNvalueChangedCallback

All the widgets have appropriate callbacks associated with them.

Now back to my problem: Why am I having the error: “Cannot find callback list in XtAddCallback”. This proves that there is something not right with X11R6, not with the program.

> Either the callback_name is correct, but the wrong widget is specified, or the
> right widget is specified but the callback_name doesn't exist. It's more likely
> the latter.

Either one of these is not true. all the widgets is specifies with the right callbacks.

(in reply to cerenaksu)
Post #: 16
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> Cannot find callback list in XtAddCallback Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.094