[ALOY-721] Alloy.resetClass() & $.resetClass()

GitHub Issuen/a
TypeNew Feature
Resolution Date2013-06-25T22:10:06.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 13
ComponentsRuntime, Styling
ReporterTony Lukasavage
AssigneeTony Lukasavage


We have addClass() and removeClass(), but it would nice to be able to completely reset the "classes" of a Titanium proxy object to a specific state. For this we should add resetClass(proxy, classes, opts) which would make the "classes" of the target proxy equal to the given classes argument.


  1. Tony Lukasavage 2013-06-25 PR: https://github.com/appcelerator/alloy/pull/164 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-721 Functional review can be verified by running the app and clicking the main (center) label multiple times. Each time you click the label it should reset to a new set of classes (indicated at the bottom of the app). Confirm on all platforms that the label reflects the current set of classes to verify. NOTE: Android does not support shadow, so shadow styles will not appear.
  2. Federico Casali 2013-07-22 Verified as working as expected. Environment: Titanium SDK 3.1.2.v20130718094558 Appcelerator Studio Alloy 1.2.0 LiveView 0.1.28 (from Beta stream) Android device 4.2.2 - iPhone 5 6.1.4 Closing.

JSON Source