[aida] "Dynamic" Domain Objects
Rob Rothwell
r.j.rothwell at gmail.com
Fri May 23 01:31:07 CEST 2008
On Thu, May 22, 2008 at 7:20 PM, Nicolas Petton <petton.nicolas at gmail.com>
wrote:
> Hi Rob,
>
> Another solution, better IMHO, would be to use dynamic variables. Let me
> explain a bit: If you store your custom variables in a dictionary, then
> in Aida you can simply add an entry for each variable.
>
> AObject>>dynamicVariables
> dynamicVariables isNil ifTrue: [self initDynamicVariables].
> ^dynamicVariables
>
> AObject>>initDynamicVariables
> dynamicVariables := Dictionary new
>
> To add a custom variable:
>
> AObject>>addDynamicVariable: aString value: anObject
> self dynamicVariables at: aString put: [anObject]
This part I can actually do myself, and in Aida, I even understand...
AObjectApp>>viewMain
> ....
> self observee dynamicVariables do: [:each |
> e addtext: each key, ': ', each value; addBreak].
> ....
But how do I bind one of these dynamicVariables to a
WebInputField/WebCheckBox/etc...?
AObjectApp>>viewMain
| field |
.....
self observee dynamicVariables do: [:each |
field := WebInputField new aspect: ??? for: self observee
dynamicVariables size: 50.
e add: field. e addBreak].
I think I am missing something fundamental again...I mean, I do not know the
"aspect" until the user creates it...
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aidaweb.si/pipermail/aida/attachments/20080522/204426b3/attachment.htm
More information about the Aida
mailing list