Don't add a method to do the layout or don't name it #layout?
dont name it layout.
The tutorial doesn't say what to name the method, just that it can be
named anything using the pragma.
I have two questions about the Spec side of the house:
1. The title/costWidget whenTextChanged: stuff. With Polymorph, I
can just say, here's an object, here's the getter/setter, deal
with it. Does Spec have anything like this, or do you have to do
this manual data shuffling? Is there an example I can learn from?
If you just want to show an edit dialog, I would separate the
Acitivty-Model (two textfields) from your domain model "Activity".
Then you don't need this "whenTextChanged". This is only needed if
other elements from the model
depend on the textfield content.
Now you can use spec to only show a dialog and after closing this
dialog you can retrieve the values with
activitiy title: theDialogModel titleWidget text
activity cost: theDialogModel costWidget text
....
OK, but two questions:
1. How do I know when the dialog is finished?
2. That's going to be a lot of manual copying compared to the
Polymorph version. Is that just life or are there "pluggable" widgets
that will talk to my model directly?
2. This layout is a bit on the ugly side. I looked at the
examples and saw usage of the expert layout with asking how tall
a line is. Is that the best that can be done, or is there
something more like Polymorph's label layout that can be used
instead?
you can define the hight of the rows based on the inputfield default
height (based on the current theme) (ComposableModel class
>>#defaultInputHeight
Take a look at Komitters CredentialEditor
Thanks!
Thanks for your time and patience!
—
Daniel Lyons
—
Daniel Lyons