Skip to content

Release 1.7.8

Compare
Choose a tag to compare
@bhatfield bhatfield released this 15 Sep 22:26
· 970 commits to master since this release

Alloy 1.7.8 is a minor release that includes new features and multiple bug fixes. Alloy 1.7.8 is shipped with Appcelerator Core Package v5.0.0.

See the Full list of Issues that were addressed in Release 1.7.8.

New Features

Track Event Listeners on a View-Controller

Alloy now tracks all Titanium event listeners set in XML, for example, <Button onClick="myFn">. Use the following APIs to manipulate the tracked event listeners:

Use a Test Application to Create a New Alloy Project

Add the --testapp <PATH_TO_TESTAPP> option to the alloy new command to create a new project based off an Alloy test application.

Pass the option the relative path to the test application after the alloy/test/apps path.

For example, if you want to use the picker test application, run alloy new --testapp ui/picker from a skeleton Titanium project.

Copy, Move or Delete View-Controllers

Add CLI commands to copy, move or delete view-controllers from the project, which includes the controller, XML and TSS files.

  • alloy copy <controller_name> <copy_name>: Copy a view-controller
  • alloy move <controller_name> <new_name>: Rename a view-controller
  • alloy delete <controller_name>: Delete a view-controller
Themes Enhancement

Themes now support i18n, lib and platform folders for theme-specific localized assets, CommonJS modules and platform-specific assets, respectively.

TSS and XML Markup Enhancements
  • Support setting XML attributes to Alloy.CFG and Alloy.Globals values.
  • Support the module attribute in the Alloy element to set a default module attribute for all elements in the XML view.
  • Support <CommandBar/> as a child tag of the <Window> object to add a command bar to a Window. Add an <Items/> tag as a child of the CommandBar element, then add <AppBarButton/>, <AppBarToggleButton/> and <AppBarSeparator/> tags as children of the Items element to add buttons to the command bar. Only supports the Windows platform.
  • Support <AttributedString/> tag as a child of the Label, TextArea and TextField elements to set the attributeString property, and the <AttributedHintText/> tag as a child of the TextField element to set the attributedHintText property.
  • SearchView element is now implicitly assigned to the Ti.UI.Android namespace, that is, <SearchView/> is the same as <SearchView ns="Ti.UI.Android"/>.
  • Support in custom queries to use local functions defined in the controller and arguments passed to the Alloy.createController() method. To reference arguments passed to the controller, use the $.args variable. Previously, you could only reference properties and functions in the Alloy.Globals namespace. For details, see Custom Query Styles.
Widget Enhancements

Widgets now support the i18n directory for localized assets.

API Changes

New APIs
API Type Note
Alloy.Controller.addListener method Add a tracked event listener to a view proxy object.
Alloy.Controller.getListener method Retrieve tracked event listeners.
Alloy.Controller.removeListener method Remove tracked event listeners.