Titanium JIRA Archive
Alloy (ALOY)

[ALOY-183] Change getUIRoot() to getView()

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2012-08-16T08:42:31.000+0000
Affected Version/s2012 Sprint 17
Fix Version/s2012 Sprint 17, Release 3.0.0
ComponentsRuntime, XML
Labelsn/a
ReporterTony Lukasavage
AssigneeUnknown
Created2012-08-15T14:51:08.000+0000
Updated2018-03-07T22:26:03.000+0000

Description

To simplify the naming of functions, let's make the following changes: * getView(id) --> stays the same, returns underlying view by id * getUIRoot() --> getView() (no parameters) * getUIRoots() --> getViews()

Comments

  1. Russell McMahon 2012-08-15

    Arthur says the getView(), getViews(), getView(id) seem clear and gives the go ahead
  2. Tony Lukasavage 2012-08-15

    Feedback FTW
  3. Tony Lukasavage 2012-08-16

    In retrospect, getUIRoot() and getUIRoots() should stay as they represent an array of all top-level views, which is different from getView(), which has access to all views, not just top-level. The interface for these interactions should be like this: * *getView(id)* - Return any view contained in the controller by id. If no id is given, return the first top-level view (just like getUIRoot). * *getUIRoot* - Return the first top-level view. * *getUIRoots* - Return an array of all top-level views
  4. Tony Lukasavage 2012-08-16

    Final interface: * *getView(id)* - Return any view contained in the controller by id. If no id is given, return the first top-level view. * *getViews()* - Return an object containing all views from the view hierarchy, keyed by their id. * *getTopLevelViews()* - Return an array of all top-level views

JSON Source