SimplePopupMenu problem

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

Questions about motif? Contact us

4 posts / 0 new
Last post
SimplePopupMenu problem

Submitted by Anonymous on Wed, 12/19/2001 - 13:23. Developers
Hi to everybody,
If I create,in the ButtonPress event, a SimplePopupMenu, it is correctly displayed every time the mouse-button is clicked.
Instead, if I move the creation of the SimplePopupMenu in the ButtonRelease event, the popup is created only once (upon the first button-release evt) and no more.
Have you any idea why the second case doesn`t work?
Thank you very much.

ICS_support

Well, I bet it is being created again -- but that may not be right, because you need create it only once and then simply repost it at the current mouse location. There isn`t a need to recreate it; you probably aren`t destroying it.

If there are other problems, they are from the menu system preference`s to have popups behave as popups and not as tear-off menus. That is, the expectation is that the menu is posted on a mouse-down, with the user making a selection on mouse-up.

How to open a file from x/Motif GUI

Submitted by Anonymous on Wed, 12/19/2001 - 17:04. Developers
Hi ,

Let me more clear about my requirement. I have a X/Motif application running on Unix ,
I want to open a log file on some action performed in the GUI ( like a menu option is selected or button is clicked..)

Do i have to use sys call to open this file from GUI?? If so, how can i execute the sys call in a motif program??
Can i do this with exec sys call ?? Is there any other way to do it??

Thanks for ur help,
vara

ICS_support

A sys call doesn`t help you if you mean system() or exec() or something that kicks off external programs. You really want fopen() and fprintf().