[TIMOB-4216] window doesn't assign custom functions
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2011-05-25T07:37:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | ios |
Reporter | Simon Lipke |
Assignee | Reggie Seagraves |
Created | 2011-05-17T09:43:28.000+0000 |
Updated | 2017-03-31T17:27:23.000+0000 |
Description
After creating a new window and opening it, functions assigned to the window can't be accessed. Properties just work normal, this issue is since 1.7.0.RC1, 1.6.2 worked just fine.
Example:
var win = Titanium.UI.createWindow({
url: 'foo.js',
title: 'Foo',
customFunction: function() {
alert('Test');
},
customProperty: 'Property'
});
win.open();
var currentWindow = Titanium.UI.currentWindow;
Ti.API.info('currentWindow.customProperty = ' + currentWindow.customProperty);
Ti.API.info('currentWindow.customFunction = ' + currentWindow.customFunction);
Prints out the result on 1.7.0.RC1 and iOS Simulator 4.2:
[INFO] currentWindow.customProperty = Property
[INFO] currentWindow.customFunction = undefined
but should be (on 1.6.2 and iOS Simulator 4.2):
[INFO] currentWindow.customProperty = Property
[INFO] currentWindow.customFunction = function () {
alert('Test');
}
Seems to be fixed in latest builds, thx
Closing ticket as I am unable to reproduce the issue using the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80