Problem Description
Can't set the
androidView
property of Ti.UI.AlertDialog after creation.
setAndroidView is a documented method.
http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.AlertDialog-method-setAndroidView
Steps to reproduce
1. Create a simple project.
2.. Paste the testcase into app.js:
var ad = Ti.UI.createAlertDialog();
var av = Ti.UI.createView();
ad.setAndroidView(av);
3.Run on Android
Expected Result
The app should work.
Actual Result
throws Titanium Javascript Runtime Error:
{color:red}
Message: Uncaught TypeError: Object #
has no method 'setAndroidView'
{color}
Issue reproduces Titanium SDK version 3.4.0 master, 3.3.0.GA, 3.2.3.GA Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Nexus 5, Android version : 4.4.4
setAndroidView gets generated by the documentation even though it doesn't exist. The androidView can still be set :
So removing setAndroidView from the documentation rather than implement the setter is probably the best option. PR : https://github.com/appcelerator/titanium_mobile/pull/6154
Closing ticket as fixed.