I think it's an issue with the ffi, as the return value is pretty clearly
documented as a constant and not a bitfield.

On Thu, Apr 9, 2015, 11:37 John Benediktsson <mrj...@gmail.com> wrote:

> Doug Coleman noticed a similar return value in some of his testing, I'm
> not sure where it is coming from - any chance it is some kind of bitmask of
> response values?
>
> Hah, I don't use Windows much, and found some sample code that still
> worked (yay for backwards compatibility!), but would love to upgrade it to
> a newer API.
>
>
>
>
> On Thu, Apr 9, 2015 at 9:17 AM, Mark Green <m...@antelope.nildram.co.uk>
> wrote:
>
>> 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
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
> ------------------------------------------------------------
> ------------------
> 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
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
------------------------------------------------------------------------------
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
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to