Anyone know what happened to autofocus on magritte
descriptions?
With this gone, how are you currently putting the cursor in the
first field when an edit form appears?
I removed it.
The problem was basically because there is no good place to put this
property and the following problems:
- you could have multiple descriptions within the same form where
auto-focus was set to true, especially when composing descriptions at
runtime from several different sources.
- #autofocus: did not work with some more complex form-elements like
one-to-one, one-to-many, multiple-selection, ...
- when changing from WAHtmlRenderer to WACanvasRenderer there was no
replacement for the method #autofocus:, however this could be easily
added again.
- I felt that is unnecessary to have #autofocus: in the description
itself, if you really need to automatically focus an element you
probably do a sophisticated manual rendering anyway.
- proper separation of view and meta-model, something Stéphane
Ducasse and I just recently discussed: a problem in the current
version of Magritte is that I mix meta-stuff and Seaside/Morphic
configuration, such as #componentClass:, #attributes, #morphicClass,
#autofocus: ... this should be the responsibility of a different
object, not the description itself. It leads to some hard to tackle
problems with extension-methods, if you want to use descriptions with/
without different view-implementations, however it is not easy to
solve. Maybe something for Magritte 1.1 ;-)
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch