Popup code execution question

Hi,

Working on interface to more easily create box plots and marker waves.

I create a listbox with the unique items in a wave and then highlight the row and can select the marker that will go with it. So far so good.  Now the confusing part, if I select a row and set a marker to it and then navigate to another row and want to select the same marker, I click on the popup and go to the same marker and upon releasing mouse button nothing happens.  It appears as the code does not execute if I pick the same item. I need to select a different entry from the pop up and then go back to select my original choice. I am using code event 2 in the pop up. Does the code not run if the same selection is made and if so is there something I can do to force the execution?

Andy

I don't know the answer, but I know that want this even with its limitations. :-)

Hi,

I am working on this a general purpose procedure and will post it when I clean it up a bit more.  My motivation is that some of my workflow goes between IP and JMP (product from SAS), but i despise (and by despise - I mean really, really hate) programming in JMP. So I would like to cut it out of the workflow. Additionally I have been pretty successful in getting clients hooked on IP, but JMP while really nice is also really expensive ($1700/user/year) and most my client do not need 90% of what it does.If I can provide them with some easy interfaces, I can increase adoption and make my clients more successful.

Andy

Without seeing the code it's difficult to tell what is going on, but how about slapping a 'print s.eventCode' at the beginning and see what you get? If you still get 2 then you know the problem hangs with the code that follows. I cannot imagine that the procedure does not fire just by selecting the same item again.

Take a look at the ColorWaveEditor.ipf file in WaveMetrics Procedures/Waves and see how that works.

See the CWE_EditorListProc function.

Hi,

 

Some more troubleshooting.

I have two Mac computers one running Mojave and the other with Catalina and both have IP8.05B01 and IP9 Beta (Build 36830)

Here is the minimal code:

Function PopMenuProc(pa) : PopupMenuControl
    STRUCT WMPopupAction &pa

    switch( pa.eventCode )
        case 2: // mouse up
            Variable popNum = pa.popNum
            String popStr = pa.popStr
            print pa.eventcode, popnum
            break
        case -1: // control being killed
            break
    endswitch

    return 0
End

Window Panel0() : Panel
    PauseUpdate; Silent 1       // building window...
    NewPanel /W=(737,349,1037,549)
    PopupMenu popup0,pos={21.00,27.00},size={78.00,20.00},proc=PopMenuProc
    PopupMenu popup0,title="test",fSize=14,mode=46,value= #"\"*MARKERPOP*\""
EndMacro

Results on Both Catalina and Mojave.

In IP8 if I make a selection on a marker the first time, the popup menu reflects that selection and the event code and marker id gets printed to history.  If I then go back to control and select the same item, the dialog box does NOT dismiss. I need to make another selection which prints to history or click outside of box to dismiss.

In IP9 If repeat the process, the dialog box does dismiss, but the event code and corresponding marker id are NOT printed to history.

If I make a simple popup menu with yes/no as is default, all works as intended.  Perhaps there is a bug (unintended feature) in the marker dialog box code.

Take a look at the ColorWaveEditor.ipf file in WaveMetrics Procedures/Waves and see how that works.

See the CWE_EditorListProc function.

I tried this and from the editor I can click on the left column and select the color table as expected. The Right-click on the right column does not bring up the context menu options.

Andy 

It looks like contextual menu click in Igor 9 needs a fix.

The panel is intercepting the contextual click.

Should be able to fix this tomorrow.

There are two problems here: the original one pertains to the PopupMenu control and the markers popup.

The markers popup not reporting the selection of the current value is a bug in Igor 8 and 9.

The next nightly builds of Igor 8 and 9 will have this corrected.

The second problem pertains to contextual menus and the ColorWaveEditor.ipf file; contextual menu clicks in the color list weren't working in Igor 9, a change from Igor 8.

This second problem in Igor 9 is understood but not yet corrected. Stay tuned.

The problem with the listbox mentioned at the top should be cleared up in the next nightly build of Igor 9. Get build number 36853 or later.

Oh, and this fix fixes the problem noted with the Color Wave Editor list as well.