ChooseDir not starting in default directory (OpenInsight 64-bit)
At 26 DEC 2022 09:34:32PM Dave Sigafoos wrote:
i am revising some old code and not sure why choosedir is not starting in the defined directory. Checked the Help and this should work.
value = "Select a directory" : @fm : "d:\SimpleSearch\Resumes" dir = Utility( "CHOOSEDIR", @window, value) ctrls = @Window:".EF_RESUME_DIRECTORY" props = defProp$ Set_Property(ctrls,props,dir)Shouldn't this start in "d:\SimpleSearch\Resumes"? It starts at the USER folder.
thanks
Dsig
At 26 DEC 2022 09:55PM Dave Sigafoos wrote:
Another question on choosedir is … shouldn't it default to the 'OI' drive? Meaning if OI is running off of the D drive then I shouldn't have to put D: in the code but allow it to default to D … yes?? Not working either
thanks
DSig
At 26 DEC 2022 10:00PM Barry Stevens wrote:
i am revising some old code and not sure why choosedir is not starting in the defined directory. Checked the Help and this should work.
value = "Select a directory" : @fm : "d:\SimpleSearch\Resumes" dir = Utility( "CHOOSEDIR", @window, value) ctrls = @Window:".EF_RESUME_DIRECTORY" props = defProp$ Set_Property(ctrls,props,dir)Shouldn't this start in "d:\SimpleSearch\Resumes"? It starts at the USER folder.
thanks
Dsig
If you are 'revising', maybe try the new exc_methos - extra options also:
DirName = Exec_Method( "FILESYSTEM", | "CHOOSEDIR", | OwnerWindow, | ChooseDirOptions ) Parameters Name Required Description OwnerWindow No ID of the parent window for the dialog. This can be null, in which case the parent window is the desktop. ChooseDirOptions No Contains an @Fm-delimited dynamic array of options that control the behavior of the dialog. It has the following structure: <1> Title <2> Initial Directory <3> Hide new folder button <4> Show Files Returns The name and path of the selected folder. Remarks The ChooseDirOptions argument is composed of four fields which control the behavior of the dialog – each field is described fully below: Field Name Description <1> Title Text to display in the title area of the dialog just above the list of folders: <2> Initial Directory Specifies the initial directory to display when the dialog is created. <3> Hide New Folder If TRUE$ then the “Make New Folder” button is hidden. <4> Show Files If TRUE$ then files are displayed in the dialog as well as folders. The CHOOSEDIR method is basically a wrapper around the SHBrowserForFolder Windows API function, so it is worth examining at the documentation for this on the MSDN website to get a better idea of the capabilities of this method. Equated constants for use with the CHOOSEDIR method can be found in the PS_CHOOSEDIR_EQUATES insert record.
At 26 DEC 2022 10:01PM Barry Stevens wrote:
*exec_method
At 26 DEC 2022 10:04PM Dave Sigafoos wrote:
so the old UTILITY service is no longer supported … means changing a lot of code :thumbsdown:
thanks … i'll check it out
Dsig
At 26 DEC 2022 10:06PM Barry Stevens wrote:
so the old UTILITY service is no longer supported … means changing a lot of code :thumbsdown:
thanks … i'll check it out
Dsig
Yes it is supported
At 26 DEC 2022 10:08PM Dave Sigafoos wrote:
great!! I will look at the method you mention.
Thanks again
DSig
At 26 DEC 2022 10:09PM Barry Stevens wrote:
so the old UTILITY service is no longer supported … means changing a lot of code :thumbsdown:
thanks … i'll check it out
Dsig
Yes it is supported
At 28 DEC 2022 06:32AM Carl Pates wrote:
Hi Dave,
shouldn't it default to the 'OI' drive?It defaults to wherever Windows thinks it should default to. We do nothing more than pass along the information you specify. If you want to control this more closely then you need to recurse and test your directory path to see if it's accessible and pick the location where you want the dialog to land.
(As mentioned in the bug report I can't reproduce problem you are seeing).
Regards
At 28 DEC 2022 11:22AM Dave Sigafoos wrote:
Thanks for checking Carl ..
DSig
At 28 DEC 2022 05:27PM Barry Stevens wrote:
Thanks for checking Carl ..
DSig
use this to check if dir exists:
declare function RTI_OS_Directory // checks to see if the directory c:\revsoft\mydir exists directory = "c:\revsoft\mydir" exists = RTI_OS_Directory( "EXISTS", directory )