Mark Lundquist wrote:


Hi Sylvain,

On Oct 11, 2005, at 2:53 PM, Sylvain Wallez wrote:

In particular, the feature the O.P. asked about — the ability to address widgets as properties instead of by using lookupWidget() — is not available in "v1" IIRC... it's a v2 thing (and maybe v3, not sure).



It's available in v1 using form.getModel() which I personally strongly dislike as it provides a value-only view of the widget hierarchy and forbids all but accessing the values.


I agree. It seems like we've discussed this before. I remember us talking also about how the "model" terminology there is bad, because the term "model" should be reserved for "model" in the MVC sense (in the context of CForms, that's via the binding framework), instead of a nickname for the CForms-implementation-specific term "FormModel".


But v2 also has other, more essential features that v1 currently lacks.


Please elaborate on these features.


The one I can think of off the top of my head is the ability to set handlers as properties. So for instance, a function assigned to the onValidate property would typically (virtually always) be nested within the flowscript function that created the form, and as such it has visibility to other local variables declared directly within that outer function.


Rhino gives us some nice features to implement interfaces or extend classes in JavaScript [1] meaning you should normally not need anything special. However, while writing this I tested this in flowscript and, strangely enough it doesn't work in flowscript whereas it does from the command line. I'll investigate this further.

I seem to remember that there's at least one other v2-specific feature that I rely on... but I can't recall what it is, I've been using v2 only for so long now.


You'll have to use V1 if you want to use the nifty Ajax features :-)

Sylvain

[1] http://www.mozilla.org/rhino/ScriptingJava.html

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to