|b removeBlock|
b := UIBuilder new.
removeBlock :=
[:key|
|composite|
composite := b composite.
(composite components detect: [:ea| ea spec model = key] ifNone: [nil])
ifNotNil: [:aComponentToRemove| composite removeComponent:
aComponentToRemove]].
b
actionAt: #cButton1 put: [Transcript show: 'Button 1 was clicked'; cr];
actionAt: #cRemoveButton1 put: [removeBlock value: #cButton1];
actionAt: #cAddButton1 put: [b add: (ActionButtonSpec model: #cButton1
label: 'Button 1' layout: (10@50 extent: 100@30))];
add: (WindowSpec label: (#WindowSays << #examples >> 'Window Says'));
add: (LabelSpec label: 'Howdy' layout: 10@10);
add: (ActionButtonSpec model: #cRemoveButton1 label: 'Remove Button 1'
layout: (10@100 extent: 100@30));
add: (ActionButtonSpec model: #cAddButton1 label: 'Add Button 1' layout:
(10@150 extent: 100@30)).
b openIn: ((400@400) extent: (200@200)).
----- Original Message -----
From: "akevalion" <
[hidden email]>
To: <
[hidden email]>
Sent: Friday, March 22, 2013 2:30 PM
Subject: Re: [vwnc] Visualworks add widget programmatically
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc