ricardoalcocer / actionbarextras

Titanium Android Native Module that exposes ActionBar features not exposed by the Titanium SDK
MIT License
148 stars 60 forks source link

setTitle({ font: { ... } }); Crashes app #63

Closed Brian-McBride closed 9 years ago

Brian-McBride commented 9 years ago
abx.setTitle({
    text: "Font Object",
    font: {
      fontSize: 26,
      fontFamily: 'roboto'
    }
  });

This results in this error:

[ERROR] TiExceptionHandler: (main) [436,436] ----- Titanium Javascript Runtime Error ----- [ERROR] TiExceptionHandler: (main) [1,437] - In alloy/controllers/index.js:1,69 [ERROR] TiExceptionHandler: (main) [0,437] - Message: Uncaught Error: java.util.HashMap cannot be cast to java.lang.String [ERROR] TiExceptionHandler: (main) [0,437] - Source: lobals.fontAgency.globesherpa,font:Alloy.Globals.fontAgencyName}),i.setTitle({ [DEBUG] Dialog: checkMirrorLinkEnabled returns : false [DEBUG] Dialog: showing allowed [ERROR] V8Exception: Exception occurred at alloy/controllers/index.js:1: Uncaught Error: java.util.HashMap cannot be cast to java.lang.String

This does work. It just doesn't allow for sizing:

abx.setTitle({
    text: "Font Object",
    font: 'roboto'
  });
manumaticx commented 9 years ago

@Anatidae-Project Thanks for the report!