Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15543] iOS: Views: The visible property of a view is undefined by default

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2016-11-02T12:23:24.000+0000
Affected Version/sRelease 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.2.0
ReporterPriya Agarwal
AssigneeEric Merriman
Created2013-10-21T11:38:44.000+0000
Updated2017-03-22T22:18:41.000+0000

Description

The default value of a view added to a window is "undefined". This is not a regression. Steps to reproduce: 1. Create an application with code below and launch the application 2. Click on Show/Hide button Actual: An alert with value "undefined" is shown which is the value of visible property of view. Expected: The value should be returned as "true"
var _window = Ti.UI.createWindow({
		backgroundColor:'white'
		});

		var view = Ti.UI.createView({
			backgroundColor:'red',
			width:100,
			height:100,
			top:20
		});
		_window.add(view);
		
		var b = Ti.UI.createButton({
			title:'Show/hide',
			width:140,
			height:40,
			top:160
		});
		
		b.addEventListener('click', function() {
			alert('Visible: '+view.visible);
			if (view.visible) {
				view.hide();
			}
			else {
				view.show();
			}
		});
		_window.add(b);
		_window.open();

Comments

  1. Unknown 2014-04-21

    This issue was previously scheduled to be worked on in more than one sprint: * 'Release 3.1.2' (on board '3.1.X Triage') * 'Release 3.0.1/TS 3.0.2' (on board '3.1.0 Triage') Starting from JIRA Agile 6.3, an issue can only belong to a single future sprint. Read more about this change: http://docs.atlassian.com/agile/docs-0630/Sprint+Marker+Migration This issue is now scheduled for future sprint 'Release 3.1.2' (on board '3.1.X Triage'). If this is incorrect, please update the issue accordingly. This comment was automatically generated by JIRA. If it is no longer relevant, please feel free to delete it.
  2. Shameer Jan 2014-08-08

    Issue reproduces Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
  3. Hans Knöchel 2016-11-02

    Duplicate (and fixed this days) of TIMOB-16357
  4. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source