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

Android: Unable to modify key of an Object property

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: Release 6.0.0, Release 6.0.1
    • Fix Version/s: None
    • Component/s: Android
    • Environment:
    • Story Points:
      13
    • Sprint:
      2018 Sprint 12 SDK, 2018 Sprint 13 SDK, 2018 Sprint 14 SDK, 2018 Sprint 15 SDK, 2018 Sprint 16 SDK, 2016 Sprint 17 SDK, 2018 Sprint 18 SDK, 2018 Sprint 19 SDK, 2018 Sprint 20 SDK, 2018 Sprint 21, 2018 Sprint 22, 2018 Sprint 23, 2018 Sprint 24, 2018 Sprint 26, 2019 Sprint 1, 2019 Sprint 2, 2019 Sprint 3, 2019 Sprint 4, 2019 Sprint 5, 2019 Sprint 6

      Description

      • Properties which are writable Objects such as Point and Font cannot have their keys directly changed.

      TEST CASE

      var win = Ti.UI.createWindow({
              title: 'TIMOB-24406',
              backgroundColor: 'gray'
          }),
          iv = Ti.UI.createView({
              backgroundColor: 'red',
              width: '320',
              height: '480',
              center: {
                  x: (Ti.Platform.displayCaps.platformHeight / 2) + 'px',
                  y: (Ti.Platform.displayCaps.platformWidth / 2) + 'px'
              }
          });
       
      win.addEventListener('click', function(e) {
          iv.center.x = (Ti.Platform.displayCaps.platformHeight / 2) - e.x;
          iv.center.y = (Ti.Platform.displayCaps.platformWidth / 2) - e.y;
          //iv.center = {x: e.x, y: e.y}; // workaround
          Ti.API.info('center.x: ' + iv.center.x);
          Ti.API.info('center.y: ' + iv.center.y);
      });
       
      win.add(iv);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                Yellowcube Yellowcube
                Reviewer:
                Christopher Williams
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10493
                    Sync status:
                    PENDING
                    Last received:
                    Last sent:

                    Git Integration