#268 closed enhancement (fixed)
improvements to getWidget methods in widget manager
Reported by: | dylan | Owned by: | sjmiles |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Some useful additions to the getWidget methods:
getWidgetsByFilter: add a second param that is a boolean, when set to true, it would just return the first widget that matches the unaryFunc (helps performance when you just want the first widget)... perhaps we also want a way to specify searching in reverse order of the widget list when using this.
getWidgetsByPropertyValue: a method with params propertyName, propertyValue, and a boolean... sort of like getting an element by css class, and the boolean would determine whether to return all or just one.
getWidgetByPrimitive
getWidgetByEvent
Change History (4)
comment:1 Changed 15 years ago by
Milestone: | 0.3release → 0.4 |
---|---|
Owner: | changed from anonymous to sjmiles |
comment:2 Changed 14 years ago by
I'm not convinced the other suggsted methods are useful enough to warrant inclusion. Would request some discussion on devs list before undertaking.
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'm closing this for now. Please re-open if there is consensus that additional search methods should be included in the lib.
I enhanced getWidgetsByFilter as requested: if second param is true, the function either returns the first widget reference it finds or NULL. Otherwise it returns an array as before.
The other enhancements I'm punting to 0.4 (unless rebuked by Dylan).