Damien Cassou wrote:
> Rob Vens a écrit :
>
>> self widgetAt: #classTypeList
>> this returns the widget. If you want the wrapper, for example to
>> enable or disable the widget, you need to send:
>> self wrapperAt: #classTypeList
>
> In fact, it would have been too easy. My widget is not directly here. It
> is in a TabControlComposite.
>
> Here are the components I can access from the ClassCreationDialog:
>
> IdentityDictionary (#okButton->a SpecWrapper on: a BoundedWrapper on: a
> WinXPActionButtonView #cancelButton->a SpecWrapper on: a BoundedWrapper
> on: a WinXPActionButtonView #tabControl->a SpecWrapper on: a
> BoundedWrapper on: a TabControlComposite )
I presume that you added #classTypeList to windowSpec other than #windowSpec
(to one of #advancedSpec, #detailsSpec, ...). In that case, you should find your
widget in namedComponenets of lastSubBuilder instance variable of ClassCreationDialog:
ClassCreationDialog>>someMethod
"You can send this *after* build phase (in #postBuildWith: or later).
| wrapper |
wrapper := lastSubBuilder componentAt: #classTypeList.
wrapper ifNotNil: [wrapper widget doSomething].
The test is useful when the selected tab does not contain #classTypeList.
Hope this helps,
Ladislav Lenart