hello, I'm not sure to see exactly what you are looking for, but it could look like something like that:
| wizard tmpPane1 tmpPane2 tmpPane3 |
wizard := WizardControl new. wizard renderer: MerlinMorphicWizardRenderer new. tmpPane1 := ( WizardFirstPane new row: ( RadioButtonsPart new inGroupboxNamed: 'Choose Option A'; options: { #'Option 1'. #'Option 2' }; defaultValue: nil; callback: [:value :tmpPart | (value = #'Option 2') ifTrue: [ wizard selectBranch: 2. ] ifFalse: [ wizard selectBranch: 1. ] ]; yourself ) associatedTo: #optionA ).
tmpPane2 :=( WizardLastPane new row: ( ListPart new initialList: { 1 . 2 . 3 . 4 }; yourself ) associatedTo: #optionB ).
tmpPane3 := ( WizardLastPane new row: ( RadioButtonsPart new inGroupboxNamed: 'Choose Option B'; options: { #'Option 3'. #'Option 4' }; defaultValue: nil; yourself ) associatedTo: #optionB ).
wizard addPane: tmpPane1. wizard addPane: tmpPane2 . wizard addBranch. wizard selectBranch: 2. wizard addPane: tmpPane1. wizard addPane: tmpPane3 . wizard selectBranch: 1. wizard open.
You can also look at the class MerlinExamples, there is several examples in the class side.
2012/4/10 Hernán Morales Durand hernan.morales@gmail.com
Hi all, I'm using Merlin and need some help, for example in the following script I want to associate the next button with the 'Option 2' to the ListPart (in a second pane) and the next button with the 'Option 1' to the radio button pane group (options 3 and 4, in another second pane). Should I use branches? and callbacks? May anyone show an example how to do it?
| wizard |
wizard := WizardControl new. wizard renderer: MerlinMorphicWizardRenderer new. wizard addPane: ( WizardFirstPane new row: ( RadioButtonsPart new inGroupboxNamed: 'Choose Option A'; options: { #'Option 1'. #'Option 2' }; defaultValue: nil; yourself ) associatedTo: #optionSelected ); addPane: ( WizardMiddlePane new row: ( ListPart new initialList: { 1 . 2 . 3 . 4 }; yourself ) ); addPane: ( WizardFirstPane new row: ( RadioButtonsPart new inGroupboxNamed: 'Choose Option B'; options: { #'Option 3'. #'Option 4' }; defaultValue: nil; yourself ) associatedTo: #optionSelected ). wizard open.
Cheers,
Hernán
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev