Page 1 of 1

Digging around in the undergrowth

Posted: Wed Nov 15, 2023 5:44 pm
by richmond62
Erm . . . any idea where I have gone wrong:
-

Code: Select all

on mouseUp
   set the itemDelimiter to TAB 
   answer file "Choose a text .tsv spreadsheet file:" with (specialFolderPath("/Users/richmond/LiveCode/LiveCode Community 9.6.3.app/Contents/Tools/Toolset/resources/supporting_files/property_definitions/") ) with type "Text TSV|tsv|" 
   if it = empty then exit to top
   set the text of fld "fGUFF" to URL ("file:" & it)
end mouseUp
And I will apologise in advance for using LC 963 rather than a recension of OXT or OXT Lite; but I want to work with something 'virgin' for this.

This does NOT take to that folder, but to the most recent folder my IDE has been saving things to.

Re: Digging around in the undergrowth

Posted: Wed Nov 15, 2023 10:39 pm
by tperry2x
You have to remove the SpecialFolderPath

you can only use specialfolderpath("one_of_the_following")
"home": The current user's home folder
"desktop": The current user's desktop folder
"preferences": The current user's preferences folder
"documents": The current user's documents folder
"support": The current user's application-specific data folder
"system": The System Folder (usually /System)
"fonts": The folder that contains fonts
"temporary": The folder where temporary files can be placed
"engine": The folder containing the OpenXTalk engine and the executable files copied in the standalone application
"resources"

Something like:

Code: Select all

on mouseUp
   set the itemDelimiter to TAB
put specialFolderPath("home") into tMyHomeFolder
   answer file "Choose a text .tsv spreadsheet file:" with (tMyHomeFolder & "/LiveCode/LiveCode Community 9.6.3.app/Contents/Tools/Toolset/resources/supporting_files/property_definitions/" ) with type "Text TSV|tsv|" 
   if it = empty then exit to top
   set the text of fld "fGUFF" to URL ("file:" & it)
end mouseUp