Hi Cyrille,
Thanks for your help. This goes indeed in the right direction, however I have the impression I am now bumping into a bug.
Consider the following code: -=-=-= -=-=-= -=-=-= -=-=-= -=-=-= | wizardControl wizardPane1 wizardPane2 itemsSelectorsPart listPart aRenderer | aRenderer := MerlinMorphicWizardRenderer new . wizardControl := WizardControl new. wizardControl renderer: aRenderer. wizardPane1 := WizardFirstPane new. wizardPane2 := WizardLastPane new. itemsSelectorsPart := MultiSelectionItemSelectorPart new initialList: #(item1 item2 item3 item4); yourself. listPart := MultiSelectionItemSelectorPart new initialList: [:requiredInputs | (requiredInputs at: #selectedItems) ]; yourself. wizardPane1 row: itemsSelectorsPart associatedTo: #selectedItems. wizardPane2 row: listPart requiring: {#selectedItems}. wizardControl addPane: wizardPane1; addPane: wizardPane2. wizardControl open. -=-=-= -=-=-= -=-=-= -=-=-= -=-=-=
This throws an error. Shall I open an issue?
Cheers, Alexandre
On 17 Oct 2011, at 14:45, Cyrille Delaunay wrote:
Hello alex,
2011/10/17 Alexandre Bergel alexandre.bergel@me.com Hi!
I am building a wizard and I am stopped on something that looks trivial. Consider the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | control firstPane lastPane part1 dropListPart part2 | control := WizardControl new. firstPane := WizardFirstPane new. lastPane := WizardLastPane new.
control addPane: firstPane; addPane: lastPane. "First pane: picking the configuration we are interested in" part1 := TextPart new inGroupboxNamed: 'Select the configuration you want to load versions from'. firstPane addPart: part1 associatedTo: #selectedConfiguration. dropListPart := DropListPart new inGroupboxNamed: 'Configurations'; list: self listOfConfigurations; useLatePopulateContents: false; yourself. firstPane row: dropListPart associatedTo: #selectedConfiguration2. "Second pane" part2 := MultiSelectionItemSelectorPart new initialList: ([:input | {input at: #selectedConfiguration2}]). lastPane addPart: part2 associatedTo: #selectedVersions.
I think that here you should specify something like:
lastPane addPart: part2 associatedTo: #selectedVersions requiring: #selectedConfiguration2.
Like that the input of the MultiSelectionItemSelectorPart get populated with output of the dropListPart. That means that the line:
part2 := MultiSelectionItemSelectorPart new initialList: ([:input | {input at: #selectedConfiguration2}]).
will work corectly. Does it answer to your question?
"Open the controler" control open. ^ control
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The problem is that I do not know how to initialize the MultiSelectionItemSelectorPart in the second pane since I need the result of what I selected in part1. I tried to inspire myself from the merlin example #itemsSelectorPartUsing: , but without success.
So, how part2 can refer to the result selected in part1 ?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.