my 'implementation' is actually nothing more than a function that runs your 
code :-)
meaning that it relies on an AOT dependency in the project for the java 
class, which i don't mind in a personal project like mine, but probably 
wouldn't cut for Quil

moreover my initial goal was for the function to actually return the file 
path, but as the underlying code runs asynchronously, and after a few 
failed attempts with while loops, futures, promises... i had to rely on the 
'global' atom instead as in your example
which again is not a big deal for me bacause i actually have a map to keep 
all the current events, and so i treat the file path as an 'event' of 
sort (file-input-selected, file-output-selected.. and so on, containing the 
file path as string) because i prefer 'polling' my map at each 'frame' 
instead of the event driven way of doing stuff

the reason why i prefer 'polling' to 'event driven' would be probably a bit 
convoluted to explain here, but it allows me to work in a truly modular 
way, where i can just write a new module for any change i want to make to 
the app, be it deleting, modifying or adding a new feature
call it 'additive' programming if you want
makes it easy to go back to previous versions, or to try new ideas, and 
generally keeps me sane while coding :-)

each module has the same structure of the whole app (each with its own 
:setup, :update, :draw, etc.) and gets 'compiled' (by a macro) to a plain 
middleware

and Quil middleware functionality is pure genius


On Monday, April 17, 2017 at 5:07:56 AM UTC+7, Nikita Beloglazov wrote:
>
> Glad to hear you worked it out. Feel free to contribute your 
> implementation of select-input/output/folder to Quil. 
>
> Nikita
>
> On Sun, Apr 16, 2017 at 2:52 AM Jay Porcasi <jaygp...@gmail.com 
> <javascript:>> wrote:
>
>> hello Nikita,
>> your example worked great!
>> and i was able to 'abstract' it into a select-input function that i can 
>> call to set the file-path
>> hopefully it will be straightforward to do the same for select-output and 
>> select-folder
>> by the way it would be great if something like that was available in quil 
>> by default
>> thank you a lot for your help,
>> Jay
>>
>>
>> On Thursday, April 13, 2017 at 8:20:21 PM UTC+7, Jay Porcasi wrote:
>>>
>>> thank you Nikita!
>>>
>>> i will try your example to understand it better
>>>
>>> a simple file chooser that returns the file path as string is all i need 
>>> actually, i don't get all the complication in Processing of passing a 
>>> callback function but i guess it must be there for a reason
>>>
>>> cheers,
>>> Jay
>>>
>>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Clojure" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/clojure/R61OvE4jYEc/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to