S
Sam (Deleted User)
Guest
I'm going to write a multiselect version of get_open_filename and get_open_filename_ext that works on Windows natively, Mac with AppleScript, and Linux with Zenity. I was wondering before I get started what everyone's thoughts are on how I should do it...
let's say i select multiple files.. They are all located in the folder "/home/owner/GameAssets/". The first file is called "File1.png", the second is "File2.png", and so on...
The standard way of doing delimiters is usually by using a null terminator character, which is "\0".
Would everyone prefer me to do it that way, or a new line character? i.e. "\n" or "\r"...
if i did a new line, the string returned for example would look like this:
"/home/owner/GameAssets/File1.png
/home/owner/GameAssets/File2.png
/home/owner/GameAssets/File3.png"
The above method is easier to parse for newer users, but is not the usual standard, and it requires a much bigger buffer size.
however, if done with a null terminator, it would look more like this:
"/home/owner/GameAssets/\0File1.png\0File2.png\0File3.png\0\0"
So what does everyone think I should do? Or do you have an alternative suggestion of your own that is worth me doing instead of these two examples?
Thanks.
Samuel
let's say i select multiple files.. They are all located in the folder "/home/owner/GameAssets/". The first file is called "File1.png", the second is "File2.png", and so on...
The standard way of doing delimiters is usually by using a null terminator character, which is "\0".
Would everyone prefer me to do it that way, or a new line character? i.e. "\n" or "\r"...
if i did a new line, the string returned for example would look like this:
"/home/owner/GameAssets/File1.png
/home/owner/GameAssets/File2.png
/home/owner/GameAssets/File3.png"
The above method is easier to parse for newer users, but is not the usual standard, and it requires a much bigger buffer size.
however, if done with a null terminator, it would look more like this:
"/home/owner/GameAssets/\0File1.png\0File2.png\0File3.png\0\0"
So what does everyone think I should do? Or do you have an alternative suggestion of your own that is worth me doing instead of these two examples?
Thanks.
Samuel
Last edited by a moderator: