Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19938] Using Ti.UI.iPhone.AlertDialogStyle.* triggers multiple debug lines

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-11-12T20:52:25.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFokke Zandbergen
AssigneeHans Knöchel
Created2015-11-12T13:06:20.000+0000
Updated2017-03-31T22:31:41.000+0000

Description

Run the following sample with trace-level logging:
var win = Ti.UI.createWindow({
	backgroundColor: 'white'
});

win.addEventListener('click', function(e) {
	Ti.UI.createAlertDialog({
		title: 'Title',
		message: 'Message',

		// comment the following line and debug lines dissapear
		style: Ti.UI.iPhone.AlertDialogStyle.PLAIN_TEXT_INPUT
	}).show();
});

win.open();
You will see the following debug lines when you click on the window:
[TRACE] [theme] the behavior of the UICollectionViewFlowLayout is not defined because:
[TRACE] [theme] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[TRACE] [theme] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x7f94836440a0>, and it is attached to <UICollectionView: 0x7f9483845800; frame = (0 120.667; 270 44); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7f9483644940>; layer = <CALayer: 0x7f94836343e0>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x7f94836440a0>.
[DEBUG] 2015-11-12 13:58:33.952 theme[35204:8973690] the behavior of the UICollectionViewFlowLayout is not defined because:
[DEBUG] 2015-11-12 13:58:33.953 theme[35204:8973690] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[DEBUG] 2015-11-12 13:58:33.953 theme[35204:8973690] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x7f94836440a0>, and it is attached to <UICollectionView: 0x7f9483845800; frame = (0 120.667; 270 44); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7f9483644940>; layer = <CALayer: 0x7f94836343e0>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x7f94836440a0>.
[DEBUG] 2015-11-12 13:58:33.953 theme[35204:8973690] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
[TRACE] [theme] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
Comment/Remove the style line and they disappear. *NOTE:* As you see for some reason the same lines are printed both at trace and debug level.

Comments

  1. Hans Knöchel 2015-11-12

    Why are there UICollectionView logs? We don't even have any API for that in Titanium SDK core.
  2. Fokke Zandbergen 2015-11-12

    interesting isn't it? ;)
  3. Hans Knöchel 2015-11-12

    Don't get it on latest master. BUT: I get the warning 3D Touch is not supported on this device.which results as a bug of TIMOB-19667. Will investigate there and check with 5.1.0.RC again.
  4. Hans Knöchel 2015-11-12

    Cannot reproduce on a fresh project. Tested both latest master and 5_1_X branch.
  5. Fokke Zandbergen 2015-11-13

    I can still reproduce this with the latest 5_1_X (5.1.0.v20151113005238) and simply creating (ti create -t app -p ios -n dialog --id test.dialog -d . an app, copy pasting above code and build to iOS 9 Simulator (Xcode Version 7.1 (7B91b)).
  6. Lee Morris 2017-03-31

    Unable to reproduce this issue, tested with 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 Please file a new ticket if this problem still persists.

JSON Source