Home > Archive > Smalltalk > February 2006 > [VW 7.4] Extending Widgets
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[VW 7.4] Extending Widgets
|
|
| Charlie Adams 2006-02-16, 7:03 pm |
| I make some changes to existing widgets. Some changes are simple, added
attributes. Some are wholesale behavioral changes. For the former, I
typically override the existing widget code. For the latter, I subclass and
create my own widget.
Two questions:
1. Does VW 7.4 allow for adding a single attribute to a widget without
overriding? By this I mean, if I want to add an attribute to Combo Box, I
currently change UILookPolicy>>comboBox:into:, ComboBoxSpec
class>>basicEditSpec and perhaps one or two other items.
2. Will this be easier to do in Pollock?
I realize that if I were to build a CustomComboBox and all the attendant
classes then I would not be overriding anything. Perhaps I've been lazy. By
the same token, I wonder if maybe I've missed something.
Charlie Adams
| |
| Samuel S. Shuster 2006-02-17, 7:00 pm |
| Charlie,
>Two questions:
>
>1. Does VW 7.4 allow for adding a single attribute to a widget without
>overriding? By this I mean, if I want to add an attribute to Combo Box, I
>currently change UILookPolicy>>comboBox:into:, ComboBoxSpec
>class>>basicEditSpec and perhaps one or two other items.
No, it (Wrapper) doesn't allow for that.
>2. Will this be easier to do in Pollock?
Yes. You can create your own Agent or Artist (by either making your own, or
subclassing from existing ones) and add all the behavior you want, and then
supplying that Artist/Agent at runtime.
And So It Goes
Sames
________________________________________
______________________________
Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?
|
|
|
|
|