ChooseFile issue (AREV64)
At 28 MAR 2024 12:16:19PM John Bowen wrote:
I have a stored procedure that calls Choosefile to allow the end user to select a file using the Windows Open dialogue box. We call the SP from windows in Arev32/Arev64.
In OI 9.4, after a file was selected using the SP, control was returned to the Arev32 window. The end user could continue interacting with the Arev window.
In OI 10.2, after a file is select using the SP, control is not returned to the Arev64 window. The end user needs to use the mouse to click anywhere outside of Arev64, and then click back to Arev64 to continue interacting with the Arev window.
Is there something that I need to do differently in OI 10.2 to get the control to return the Arev64?
OI 9.4 call
Filename = Utility("CHOOSEFILE", @window, CFOpt)OI 10.2 call
Filename = Exec_Method("FILESYSTEM","CHOOSEFILE",@Window,CFOpt)
At 28 MAR 2024 04:02PM Barry Stevens wrote:
I have a stored procedure that calls Choosefile to allow the end user to select a file using the Windows Open dialogue box. We call the SP from windows in Arev32/Arev64.
In OI 9.4, after a file was selected using the SP, control was returned to the Arev32 window. The end user could continue interacting with the Arev window.
In OI 10.2, after a file is select using the SP, control is not returned to the Arev64 window. The end user needs to use the mouse to click anywhere outside of Arev64, and then click back to Arev64 to continue interacting with the Arev window.
Is there something that I need to do differently in OI 10.2 to get the control to return the Arev64?
OI 9.4 call
Filename = Utility("CHOOSEFILE", @window, CFOpt)OI 10.2 call
Filename = Exec_Method("FILESYSTEM","CHOOSEFILE",@Window,CFOpt)</QUOTE>What happens when you do:
Filename = Utility("CHOOSEFILE", @window, CFOpt)
in OI10.2
=== At 29 MAR 2024 11:13AM John Bowen wrote: ===
I originally was using the Utility() call in OI 10.2. Since that was deprecated in OI 10, I tried using the new method of calling Choosefile. Both ways have the same issue.
=== At 29 MAR 2024 07:25PM Richard Bright wrote: ===
Hi John
I looked at my code snipits in OI10.x and typically they ensure focus is set to the target control.
Here is a (rather legacy code example). This is 'CHOOSEDIR' but the 'CHOSEFILE' should act similar.
fbstruct = 'Upgrade Location'
fbstruct<2> = "UPGRADE";* Default location
Location = Utility('CHOOSEDIR',WinName,fbstruct)
If Location thenVoid = Set_Property('SYSTEM','FOCUS',WinName:'.LOCATION')Void = Set_Property(WinName:'.LOCATION','TEXT',Location)End Elsestat = Set_Property(WinName:'.STATUS_LINE','TEXT','No filename was specified.')EndI'm not quite sure how this should be set to work in the AREV64 context but…
Richard
=== At 30 MAR 2024 10:01AM John Bowen wrote: ===
Thanks, Richard.
I'll see what I can do with setting the Focus.
=== At 01 APR 2024 11:59AM John Bowen wrote: ===
Richard,
Thanks for the suggestion. Setting the focus worked. I had to get the current Focus before calling the ChooseFiled.
currentfocus = Get_Property("SYSTEM","FOCUS")
Filename = Exec_Method("FILESYSTEM","CHOOSEFILE",@Window,CFOpt)
tmp = Set_Property("SYSTEM","FOCUS",currentfocus)
=== At 01 APR 2024 03:24PM Richard Bright wrote: ===
Great.
Glad that you have things working, else I would have been another April fool.
Richard