PDA

View Full Version : Documentation missing some argument descriptions?



SteveEisner
2 Feb 2007, 4:50 PM
I think YUI-EXT's doc system is pretty amazing. That said, the one big problem I've been having has been that when I go to call some common functions, the name of the argument isn't enough to explain what I should pass in.

There are three examples that I can think of:
1) An event name argument such as el.on(). It would be nice to know what the valid events are. Of course, a complex object like BorderLayout does indicate the events, but not the simpler (non-YUIEXT) elements.

2) A config block argument such as new BorderLayout(). There are a lot of options available, but the documentation doesn't list any of them. As far as I know the only way to find these is to locate the correct blog entry?

3) For most function arguments, it doesn't tell you how it will call that function, ie. what arguments it will pass. A good example, though, is CompositeElements.each() which does show the arguments.

The functional reference may not be the best place for this information. Perhaps there should be an Events, Configuration Blocks, etc. section in the documentation. Along these lines, I think it would be helpful to have a one-pager startup doc that explains the most basic parts of YUI-EXT:
1) registering events
2) when common functions pass an Element and when it's a DOM obj
3) when you have to pass "true" to calls like getEls()
4) etc.
Sample code is great but doesn't always explain why you chose to write it the way it is...

Anyway, if I get a chance, I'll try to contribute a starter doc myself (but wouldn't expect it to be that great, given that I almost always get the basics wrong...)

Thanks again for an excellent library!
Steve

tryanDLS
3 Feb 2007, 10:30 AM
The doc for the .40 version has more of this info in it. The config options are called out separately in the doc on a number of the classes. It's not complete yet, but you can look at it here:
http://www.yui-ext.com/playplen/yui-ext.0.40/docs

Also, we have begun adding some doc to the wiki here
http://www.yui-ext.com/manual

jack.slocum
4 Feb 2007, 3:08 PM
1. These are defined by the W3C spec. It makes sense to copy it (if possible) into the manual when a page is created for DOM events.

2. A lot of config options have been documented in the alpha docs. I am working on getting them all there. :)

3. If it passes anything it is generally documented. If you can point me to a few examples of otherwise I will correct those. Thanks!

fecund
1 Mar 2007, 10:44 AM
Just a bump, I'd also like BorderLayout config options in the docs! I'm using Alpha 2. In general the yui docs are a great source of inspiration. Who wants to build us a cheat sheet for Ext like theirs (http://developer.yahoo.com/yui/docs/assets/cheatsheets.zip) like theirs?

http://developer.yahoo.com/yui/docs/assets/cheatsheets.zip

ps. the "url" bbcode seems to be broken, at least in the preview.

NoDice
3 Apr 2007, 5:42 AM
I agree with fecund, a list of all config options for BorderLayout would be very helpful. The layout seems like the most logical place to start any new app and while it is very easy to get up and running, it takes quite some time to track down all the minor options.