I have the following coding:
on key label ctrl+A do popup1
on key label ctrl+B do popup2
popup1 has the following coding:
define popup pop1
define bar 1 of pop1 prompt 'first'
define bar 2 of pop1 prompt 'second'
define bar 3 of pop1 prompt 'third'
on selection popup pop1 wait wind program()
activate popup pop1
deactivate popup pop1
release popups pop1
popup2 has the following coding:
define bar 1 of pop2 prompt 'fourth'
define bar 2 of pop2 prompt 'fifth'
define bar 3 of pop2 prompt 'sixth'
on selection popup pop2 wait wind program()
activate popup pop2
deactivate popup pop2
release popups pop2
After I hit ctrl+A, the popup pop1 shows up. Then, I hit ctrl+B, the popup pop2 shows up. The problem is that the popup pop1 is still on the screen. If I just simply hide pop1 in the beginning of popup2, hitting ctrl+A again will error out since the pop1 is already defined. If I deactivate pop1 in the beginning of popup2, the program flow goes back to popup1.
One solution that I can think of is to keyboard ctrl+B at the end of popup1. I also need to revise the popup2 coding to:
if popup pop1 has been defined (on the screen) (how can I code this?)
deactivate popup pop1
endif
define bar 1 of pop2 prompt 'fourth'
define bar 2 of pop2 prompt 'fifth'
define bar 3 of pop2 prompt 'sixth'
on selection popup pop2 wait wind program()
activate popup pop2
deactivate popup pop2
release popups pop2
I know that I can use popup('pop1') to check whether it is defined. However if I have more popups, I cannot specify the specific popup name and popup() will return empty since pop1 is not activated after I hit ctrl+B.
Thank you for any help.
on key label ctrl+A do popup1
on key label ctrl+B do popup2
popup1 has the following coding:
define popup pop1
define bar 1 of pop1 prompt 'first'
define bar 2 of pop1 prompt 'second'
define bar 3 of pop1 prompt 'third'
on selection popup pop1 wait wind program()
activate popup pop1
deactivate popup pop1
release popups pop1
popup2 has the following coding:
define bar 1 of pop2 prompt 'fourth'
define bar 2 of pop2 prompt 'fifth'
define bar 3 of pop2 prompt 'sixth'
on selection popup pop2 wait wind program()
activate popup pop2
deactivate popup pop2
release popups pop2
After I hit ctrl+A, the popup pop1 shows up. Then, I hit ctrl+B, the popup pop2 shows up. The problem is that the popup pop1 is still on the screen. If I just simply hide pop1 in the beginning of popup2, hitting ctrl+A again will error out since the pop1 is already defined. If I deactivate pop1 in the beginning of popup2, the program flow goes back to popup1.
One solution that I can think of is to keyboard ctrl+B at the end of popup1. I also need to revise the popup2 coding to:
if popup pop1 has been defined (on the screen) (how can I code this?)
deactivate popup pop1
endif
define bar 1 of pop2 prompt 'fourth'
define bar 2 of pop2 prompt 'fifth'
define bar 3 of pop2 prompt 'sixth'
on selection popup pop2 wait wind program()
activate popup pop2
deactivate popup pop2
release popups pop2
I know that I can use popup('pop1') to check whether it is defined. However if I have more popups, I cannot specify the specific popup name and popup() will return empty since pop1 is not activated after I hit ctrl+B.
Thank you for any help.