Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Fileselect example passing directory variable to file does not work. #31

Closed
GoogleCodeExporter opened this issue Apr 20, 2016 · 6 comments

Comments

@GoogleCodeExporter
Copy link

In the Fileselect example on murga-linux.com/puppy, with one modification, I 
cannot pass the directory variable to file to get it to open in the selected 
directory.
I posted an example of my changes there.
The variables get their values, but are not used.
Why?

Original issue reported on code.google.com by johnmeye...@gmail.com on 2 Sep 2011 at 7:01

@GoogleCodeExporter
Copy link
Author

Hi 8-bit

This is your modified example:

http://www.murga-linux.com/puppy/viewtopic.php?p=559425#559425

Near the top you export two nonexistent variables that you haven't initialised:

export ent1 ent3

Then the you embed the nonexistent $ent3 within the XML which will result in an 
empty string:

<entry fs-folder="'$ent3'" fs-action="file"

The reason it originally worked with fs-folder="'$HOME'" is because HOME exists.

Regards,
Thunor

Original comment by thunor...@hotmail.com on 2 Sep 2011 at 10:31

@GoogleCodeExporter
Copy link
Author

When I exit the example when run from a terminal, ent3 and ent1 are shown as 
having values.  What I want to know is how to get the string value from 
folder-ent3 to be taken by the file part as the directory it is to look in for 
a file.

BTW, Not passing the string value is what made Pfind/Advanced not work.
So how does one declare the variable so it can be passed?

Original comment by johnmeye...@gmail.com on 2 Sep 2011 at 11:35

@GoogleCodeExporter
Copy link
Author

I'm having difficulties completely understandng what it is that you want to do 
but I'll have a guess:

You want to use the current contents of the entry widget -- in your example it 
is the widget whose variable property is "ent1" -- as input to the fileselect 
function i.e. if the entry widget's text is "/usr/share/pixmaps" then you'd 
like the fileselect function to initially open this folder?

If the above is correct then it's not going to happen. Why? Because the 
fileselect function does not and has never extracted data from widgets to use 
as input. The only way to make the fileselect function open a particular folder 
is to use the custom tag attribute fs-folder="path", and tag attributes can't 
be changed and are only applied once at start-up.

In the examples/miscellaneous folder is fileselect_deprecated. This is the old 
example and you can try it with your old copy of gtkdialog 0.7.20 to test if 
you want. As you'll find out, the fileselect function has always opened the 
current directory. Only now is it possible to use the custom tag attribute 
fs-folder="path" to specify a folder to open.

Original comment by thunor...@hotmail.com on 3 Sep 2011 at 10:53

@GoogleCodeExporter
Copy link
Author

Which application are you currently writing that's making use of the fileselect 
action? I'm interested in looking at some of your code from one of your 
applications.

Original comment by thunor...@hotmail.com on 3 Sep 2011 at 1:53

@GoogleCodeExporter
Copy link
Author

Ok, so you're only playing with the examples and you haven't written anything 
yet.

I'll close this then.

Original comment by thunor...@hotmail.com on 4 Sep 2011 at 10:53

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

Original comment by thunor...@hotmail.com on 6 Sep 2011 at 11:15

  • Added labels: 8-bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant