Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Help {
- static var counter = 0;
- static function count(message as String) {
- System.println("count = " + counter + ": " + message);
- var ret = counter;
- counter++;
- return ret;
- }
- }
- // This class is never instantiated
- class TestClass {
- // This line is only called if TestClass is referenced elsewhere in the app!
- // (true whether optimization is enabled or not)
- static var staticMember = Help.count("TestClass initialized staticMember");
- var nonStaticMember = Help.count("TestClass initialized nonStaticMember");
- var uninitializedMemberVariable;
- static var staticMember2 = 5;
- function initialize() {
- uninitializedMemberVariable = Help.count("TestClass uninitializedMemberVariable @ initialize()");
- }
- }
- class TestDFView extends WatchUi.DataField {
- static var staticMember = Util.Help.count("TestView initialized staticMember");
- var nonStaticMember = Util.Help.count("TestView initialized nonStaticMember");
- var uninitializedMemberVariable;
- hidden var mValue as Numeric;
- function initialize() {
- DataField.initialize();
- uninitializedMemberVariable = Util.Help.count("TestView uninitializedMemberVariable @ initialize()");
- mValue = 0.0f;
- // System.println("TestClass.staticMember2 = " + TestClass.staticMember2);
- System.println(staticMember);
- }
- // Set your layout here. Anytime the size of obscurity of
- // the draw context is changed this will be called.
- function onLayout(dc as Dc) as Void {
- System.println("onLayout");
- //...
- }
- //...
- }
Advertisement
Add Comment
Please, Sign In to add comment