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

blob.getHeight() crashes app in iOS simulator and raise error on Android while .height succeeds

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      iOS 6.1 simulator and Android 4.0.3 simulator

      Description

      function labelHeight(sOutText, daFont, iWidth)
      {
      if (typeof sOutText === undefined || sOutText === null || sOutText == '')
      return 0;

      var daLabel = Ti.UI.createLabel(

      { font: daFont, color: 'black', backgroundColor:'transparent', layout: 'vertical', height: 'auto', width: iWidth + 'dp', text: sOutText, horizontalWrap: true, textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT, verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP }

      );
      var blob = daLabel.toImage();
      var size = daLabel.getSize();
      var iWidth = size.width;
      var iHeight = size.height;
      iHeight = blob.height; // <-- this succeeds
      iHeight = blob.getHeight(); // <-- this crashes

      return iHeight;
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dspells Henry David Spells III
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

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

                  Git Source Code