Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14574] Parity: Platforms all behave differently when setting borderWidth to null

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-07-27T21:11:11.000+0000
Affected Version/sRelease 3.1.1
Fix Version/sn/a
ComponentsTiAPI
Labelsparity
ReporterTony Lukasavage
AssigneeEric Merriman
Created2013-07-16T22:10:30.000+0000
Updated2017-07-27T21:11:11.000+0000

Description

problem

Setting *borderWidth* to null has the following effect on these platforms:

ios

throws the following exception:
[DEBUG] 2013-07-16 18:03:56.516 parity[8276:c07] -[NSNull floatValue]: unrecognized selector sent to instance 0x3a02678
[ERROR] Script Error {
[ERROR]     backtrace = "#0 () at :0";
[ERROR]     line = 12;
[ERROR]     message = "-[NSNull floatValue]: unrecognized selector sent to instance 0x3a02678";
[ERROR]     sourceId = 199498176;
[ERROR]     sourceURL = "file://localhost/Users/tlukasavage/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/4B1C652E-493D-469E-80CE-FA6178E3874B/parity.app/app.js";
[ERROR] } 

android

Makes the border transparent, presumably setting the borderWidth to the default zero value.

mobileweb

Has no apparent impact on the border, leaving just as it was.

expected

Setting borderWidth to null should remove the borderWidth (or set it to 0) on all platforms without error.

test case

var win = Ti.UI.createWindow({
	backgroundColor: '#fff',
	modal: false,
	exitOnClose: true
});
var label = Ti.UI.createLabel({
	text: 'just a test label',
	borderColor: '#0f0',
	borderWidth: 2
});
label.addEventListener('click', function(e) {
	label.borderWidth = null;
});

win.add(label);
win.open();

Comments

  1. Lee Morris 2017-07-27

    Closing due to inactivity. If this issue still exists, please raise a new ticket.

JSON Source