PDA

View Full Version : "Value" config options for relevant widgets



MrKurt
25 Apr 2007, 12:45 PM
I've run into a couple of places today that require me to grab a reference to a particular object in order to set the value. I'd like to be able to pass a value through to pretty much anything where it would make sense. Oddly enough, the ComboBox takes a value parameter, even though it's not listed in the config options.

Current annoyances:

* TextField
* TextArea
* DatePicker

On the textfield, I was able to set a value in the autoCreate config. I could probably use the html option on the TextArea's autoCreate to do the same thing, but that would require me escaping it myself, and I'm pretty lazy. :)

Also, on the form fields, it would nice to be able to pass an element that's used for "applyTo" rather than having to call that myself.

jack.slocum
26 Apr 2007, 2:48 AM
"value" is a config on all those objects except DatePicker. I have added it to DatePicker as well now. For some reason the doc parser didn't pick up the docs on it. There appears to be a lot of missing documentation probably related to config parsing changes I made. I plan on fixing it before the next release.

applyTo currently needs to be called manually. I have a solution for both applyTo/renderTo but it will take a major refactor throughout the code so it's on the "scary items" list.

MrKurt
26 Apr 2007, 5:58 AM
Whoops, I could have sworn I tried it on those other fields. I think it may have been before I figured out that I should call applyTo. :)