Added ILFileBrowserSelectorWidget and ILFileBrowserListWidget

5 views
Skip to first unread message

Hernán Morales Durand

unread,
Feb 25, 2016, 2:22:54 AM2/25/16
to il...@googlegroups.com
Added two ILUIWidget subclasses:

ILFileBrowserSelectorWidget
ILFileBrowserListWidget

Which can be tested under ILFileSelectorApplication and ILFileBrowserApplication (they are based in the ILClassSearchApplication)

Changes uploaded to dev branch in http://www.smalltalkhub.com/#!/~hernan/Iliad
Feel free to make enhacements and fix bugs.

Cheers,

Hernán

benoit

unread,
Mar 9, 2016, 5:10:16 PM3/9/16
to il...@googlegroups.com
Hi Hernán,

seems nice. I definitely plan to use those. I am in the process of
adding import/export in JSON format to my project Clafouti
(http://smalltalkhub.com/#!/~BenoitAstruc/Clafouti).

I use NeoJSON to add this capacity to my data model classes. It took
me a while to undertand how to make it work with Bag and SDActiveRecord,
but at last it seems ok in Playground.

Now I am wondering how am I supposed to give the file to the user. It
isn't a static file so, generated on the fly when the user will click on
a link/button.
I browse examples a bit but didn't find anything usefull. Has anyone a
hint to where I should look ?

Thanks,
Benoit

Le 25/02/16 08:22, Hernán Morales Durand a écrit :
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to iliad+un...@googlegroups.com
> <mailto:iliad+un...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Hernán Morales Durand

unread,
Mar 9, 2016, 6:29:22 PM3/9/16
to il...@googlegroups.com
Hi Benoit,

I finally managed to split selector widgets in two classes (please load latest commit from STHub repository):

1) A simple single file selector (radio button) widget for one-level browsing: ILFileBrowserSelectorWidget
2) A simple multiple files selector (check boxes) widget for one-level browsing: ILFileBrowserMultipleSelectorWidget

Both file browser and selectors should be available under the examples path (attached screenshot):

http://localhost:9090/examples/filebrowser
http://localhost:9090/examples/fileselector
http://localhost:9090/examples/multiplefileselector

About usage, you just answer the widget in a method and build it in another the controller method:

>>myFileSelector

    ^ ILFileBrowserSelectorWidget new
        title: 'Select File';
        searchRoot: FileSystem workingDirectory;
        yourself

>>index

    ^ [ : e | e build: self myFileSelector ]

To retrieve selection made by user:

    e button
        text: 'Next';
        action: [ Transcript show: self fileSelector selection.
           self redirectToLocal: 'nextPage' ]

Let me know if does not work. I think a TreeWidget for files would be better but I didn't found yet how to do it.
Cheers,

Hernán


To unsubscribe from this group and stop receiving emails from it, send an email to iliad+un...@googlegroups.com.
_-_2016-03-09_20.11.08.png
Reply all
Reply to author
Forward
0 new messages