Hi,
Thanks very much for the helpful answer. I have used the function
definition from your file, and I can now get the file picker to appear, but
there is a problem when it exits:
: main ( -- )
f f gtk_init
"Hello" s>gs f GTK_FILE_CHOOSER_ACTION_OPEN "Cancel" s>gs
GTK_RESPONSE_CANCEL int <ref> "Open" s>gs GTK_RESPONSE_ACCEPT int <ref> f
gtk_file_chooser_dialog_new dup gtk_dialog_run GTK_RESPONSE_ACCEPT =
[ dup gtk_widget_destroy gtk_file_chooser_get_filename
alien>native-string ]
[ gtk_widget_destroy f ] if . ;
The problem is that the value returned from gtk_dialog_run is never
GTK_RESPONSE_ACCEPT nor GTK_RESPONSE_CANCEL, instead it appears to be a
pointer value, but I cannot dereference it with "int deref" because it is
not wrapped in an alien type. Looking at your code in the file-picker
package, you did not seem to have this problem, so I wonder if this is an
oddity of Windows GTK?
(By the way, I noticed that the Windows multiplatform file-picker uses the
file picker from Windows 3.1! It might be nice to use one of the newer ones
:) )
Mark
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk