Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24051

Windows: Add the ability to remove all Ti.App.Properties at once

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.1.0
    • Component/s: Windows
    • Labels:
    • Story Points:
      5
    • Sprint:
      2016 Sprint 23 SDK

      Description

      Description

      TIMOB-23572 implemented Ti.App.Properties.removeAllProperties() for iOS/Android, it should also be implemented for Windows too. Demo code below

      // Check the initial properties (should only be the iOS ones)
      Ti.API.warn(Ti.App.Properties.listProperties());
       
      // Add all possible property-types (bool, int, double, string, object & list)
      Ti.App.Properties.setBool("testBool", true)
      Ti.API.warn(Ti.App.Properties.getBool("testBool"));
       
      Ti.App.Properties.setInt("testInt", 1337)
      Ti.API.warn(Ti.App.Properties.getInt("testInt", 1337));
       
      Ti.App.Properties.setDouble("testDouble", 13.37);
      Ti.API.warn(Ti.App.Properties.getDouble("testDouble", 13.37));
       
      Ti.App.Properties.setString("testString", "john_doe")
      Ti.API.warn(Ti.App.Properties.getString("testString", "john_doe"));
       
      Ti.App.Properties.setObject("testObject", {appc: "rocks"})
      Ti.API.warn(Ti.App.Properties.getObject("testObject", {appc: "rocks"}));
       
      Ti.App.Properties.setList("testList", ["appc", "rocks"])
      Ti.API.warn(Ti.App.Properties.getList("testList", ["appc", "rocks"]));
       
      // Check the properties again. It should now include the keys of the custom properties
      Ti.API.warn(Ti.App.Properties.listProperties());
       
      // Remove all custom properties
      Ti.API.warn(Ti.App.Properties.removeAllProperties());
       
      // Check the properties a last time. The custom properties should not be included anymore
      Ti.API.warn(Ti.App.Properties.listProperties());
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                eharris Ewan Harris
                Reviewer:
                Gary Mathews
                Tester:
                Samir Mohammed
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code