Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19034] Windows: Building to Emulator Should Allow Error Dialogs

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-06-17T20:14:35.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterDawson Toth
AssigneeKota Iguchi
Created2015-06-16T14:57:49.000+0000
Updated2015-06-23T00:08:06.000+0000

Description

Problem

When running the emulator, if errors are encountered, they should show the standard red screen of death to the user. Even if the underlying build type is release, we need to find a way to surface these errors to the developer in the traditional Titanium way.

Solution

Introduce (or tweak, if it's already there) a deploy type with values such as "development" or "production" like we do for other platforms. Then, use this value to decide whether or not we should show the error dialog, instead of the build type.

Example

var win = Ti.UI.createWindow();
win.add(Ti.UI.createLabel({ text: 'Please Wait...' }));
win.open();
setTimeout(function() {
    throw new Error('oh no!');
}, 2000);
ti build -p windows -C 8-1-1 -G 00000000-0000-1000-8000-000000000000

Comments

  1. Kota Iguchi 2015-06-17

    https://github.com/appcelerator/titanium_mobile_windows/pull/294
  2. Lokesh Choudhary 2015-06-23

    Verified the fix. Device & emulator both show error dialogs. Closing. Environment: Appc Studio: 4.1.0.201506211738 Ti SDK: 4.1.0.v20150622145911 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0-1 APPC CLI: 4.1.0-1 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows phone emulator : 8.1.1

JSON Source