Hi all,
I am looking at Merlin to build an import wizard for AspectMaps (current solution works but could be improved). Merlin looks cool but I have trouble understanding how everything works, and what is possible, from the examples. Please forgive me if the question below is an obvious thing / FAQ. The setup is as follows: From a first pane I get a filename, I need to parse that file to extract a list of N items. In the second pane I want the list of N items, each as a checkbox, ie N checkboxes. Then the next panes are 'generated' for each selected checkbox. These panes repeat the item, ask for a filename and a selection from radio button. Then a pane that is optional, depending on the radio button state of all the previous panes (+ internal state of the app). At the end an 'you have successfully imported blah' pane would be cool but is not required (I can use a dialog box for that). Now I have the first pane up and running, but the second panes and beyond I have no idea on how to do this. I dont find in the examples how to dynamically build a group of radio buttons, nor to dynamically build agroup of panes / select which is the next pane to show. Can anybody help me out here? Thanks in advance! -- Johan Fabry [hidden email] - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Johan,
Vanessa, a student from the DCC, added some unit tests for Merlin. Have you checked them? Cheers, Alexandre On 20 Dec 2010, at 17:12, Johan Fabry wrote: > Hi all, > > I am looking at Merlin to build an import wizard for AspectMaps (current solution works but could be improved). Merlin looks cool but I have trouble understanding how everything works, and what is possible, from the examples. Please forgive me if the question below is an obvious thing / FAQ. > > The setup is as follows: From a first pane I get a filename, I need to parse that file to extract a list of N items. In the second pane I want the list of N items, each as a checkbox, ie N checkboxes. Then the next panes are 'generated' for each selected checkbox. These panes repeat the item, ask for a filename and a selection from radio button. Then a pane that is optional, depending on the radio button state of all the previous panes (+ internal state of the app). At the end an 'you have successfully imported blah' pane would be cool but is not required (I can use a dialog box for that). > > Now I have the first pane up and running, but the second panes and beyond I have no idea on how to do this. I dont find in the examples how to dynamically build a group of radio buttons, nor to dynamically build agroup of panes / select which is the next pane to show. Can anybody help me out here? > > Thanks in advance! > -- > Johan Fabry > [hidden email] - http://dcc.uchile.cl/~jfabry > PLEIAD Lab - Computer Science Department (DCC) - University of Chile > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hello johan,
Maybe this part of merlin (change dynamically a wizard) looks a bit 'hacky', but this is how I would do: => send a callback on the part used to retreive the filename (as parameter of this callback, you will have the selected fileName 'calback: [:filename | ... ]').
=> Inside this callback you should then be able to make the computation you want about the filename and create a new pane (with the wanted checkBoxes), and add it to the wizard (addPane:). => I guess you can do the same in the second pane: Having a callback for each checkbox, so that if the user select one, a new pane is created and added.
Does it answer to your question ? 2010/12/20 Alexandre Bergel <[hidden email]> Hi Johan, _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
I just added a small example (modifyingWizardStructureInCallbacks) than can fit with what you are looking for. You will see it in the merlin-examples category by loading the last version of Merlin.
By the way, merlin does not yet provide a complete API that cover all possible things to do in a wizard (I think for now it just cover all I needed :)). But I would be happy to add some new things to do in my task list if there is something you would like to have, something to improve
2010/12/21 Cyrille Delaunay <[hidden email]> Hello johan, _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by cdelaunay
Hi Cyrille,
thanks for explaining this, and for the extra example. I see how I can do this now. I have been trying the callback with a ChooseFilePart, but nothing happens, so I guess this is a bug. Could you take a look at that at some point? Thanks in advance! On 21 Dec 2010, at 05:39, Cyrille Delaunay wrote: > Hello johan, > > Maybe this part of merlin (change dynamically a wizard) looks a bit 'hacky', but this is how I would do: > => send a callback on the part used to retreive the filename (as parameter of this callback, you will have the selected fileName 'calback: [:filename | ... ]'). > => Inside this callback you should then be able to make the computation you want about the filename and create a new pane (with the wanted checkBoxes), and add it to the wizard (addPane:). > => I guess you can do the same in the second pane: Having a callback for each checkbox, so that if the user select one, a new pane is created and added. > > Does it answer to your question ? > -- Johan Fabry [hidden email] - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |