Re: uicontextmenu



Jeremy Smith wrote:


I'm curious, why do you want to execute a function when the user
clicks next to an open context menu?


In our lab the computers synchronize via network. There is one for
the data analysis running Matlab 7.1 with the instrumental control
toolbox for the network stuff. After each experimental cycle this
computer is triggerd by UDP packets to collect the data, do some
image processing and some fits and plots. The user can change the
analysis process with a gui - which is using uicontextmenus.

Now the problem. When I watched people using the program, I realized
that they where confused when a new analysis cycle was triggered via
network while they were changing parameters in the gui - also leading
to wrong results. What I needed to do was to postpone the execution
of a network event while the user is doing something in the gui.

I tried the 'Interruptible' property for the gui, but this does not
seem to work for network events. So I introduced a small
task-scheduler which is called periodically by a timer object. It
takes tasks from the gui and the network an has got a few semaphores
to control the execution.

This worked quite well and even speeded up the execution. But there
is one unsolved situation left:
1) the user opens an uicontextmenu - a semaphore is set to
stop the network trigger.
2) the user changes its mind (which happens surprisingly often ;-))
and clicks next to the menu to do something else.
3) the task-scheduler is waiting for the semaphore and nothing
happens. It would have been nice to have a callback when the menu is
closed to clear the semaphore.

Thanks for the 'WindowButtonDownFCN' idea. I will try it out on
monday but I fear that that it will be quite hard to distinguish the
different mouse clicks since the are a lot of buttons and a couple of
windows. Perhaps I can find a way to periodically check the
visibility of the contextmenu once it is open.

Thanks, Elmex
.



Relevant Pages

  • Re: Windows cannot find C: (doc) Make sure you typed the name cor
    ... default printer back to my brother network printer. ... Cannot be removed- message "The connected state of Office Add-ins ... uninstall the printer driver, and then install the latest version of ... from Outlook email - it opens a blank page in Word 2007 and you ...
    (microsoft.public.word.application.errors)
  • Re: Windows cannot find C: (doc) Make sure you typed the name cor
    ... default printer back to my brother network printer. ... Windows cannot print due to a problem with the current printer setup ... uninstall the printer driver, and then install the latest version of ... from Outlook email - it opens a blank page in Word 2007 and you ...
    (microsoft.public.word.application.errors)
  • RE: Hyperlink: Linking problem when link to file
    ... If it is a company network you could try mapping a drive such as T: ... I found this in adobe documentation ... Try puttting a link to an excel file in the same directory as see if it ... opens. ...
    (microsoft.public.excel.misc)
  • OT: Bespoke v COTS
    ... Oracle database. ... The network O/S is an unsupported version of Netware (5.0 ... they also have a network guy they call on from time to time ... Java based GUI, ...
    (comp.lang.java.programmer)
  • Re: Documents become read only
    ... Further to this after more thought: if a user saves a document to the network, EVEN IF it has a Read Only attribute set, it will not affect the current user because the document is still open. ... When i access the file on my network vis Windows Explorer the read-only ... When I then click on the file and it opens in Word, ... >>> users have been reporting that, as they work on a document, it ...
    (microsoft.public.word.application.errors)