Hi,
I am trying to create a Recall button, but I am having trouble getting it to work on a List Box. I read the excellent example 46984 - How to create a Recall button on a custom window, and I am still having trouble. I am using JMP12, but I hope the solution will work down to JMP10. Any ideas?
// Example
Names Default To Here( 1 );
New Window( "Example",
<<Modal,
lb = List Box( {"Yes", "No", "Maybe"}, Max Selected( 1 ) ),
Text Box( "" ),
Button Box( "OK",
::recall = [=> ];
::recall << Insert( "lb", lb << Get Selected );
lbVal = lb << Get Selected;
Print( ::recall );
Print( lbVal );
),
Button Box( "Reset",
::recall = [=> ];
::recall << Insert( "lb", lb << Get Selected );
lb << Clear Selection;
Print( ::recall );
Print( lbVal );
),
Button Box( "Recall",
lb << Clear Selection;
lb << Set Selected( ::recall["lb"] ); // This is not working. Why?
// lb << Set Selected( 2 ); // This will work, but I do not want to use a number
// because the names and / or order of the List Box options may change.
Print( ::recall );
Print( lbVal );
),
Button Box( "Cancel",
Print( ::recall );
Print( lbVal );
)
);