Skip to content

Commit 9e73ed3

Browse files
authored
Merge pull request #6 from sitefinitysteve/master
One seg11 fix
2 parents 40a820c + a13c0fc commit 9e73ed3

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

checkbox.ios.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,12 @@ class BEMCheckBoxDelegateImpl extends NSObject implements BEMCheckBoxDelegate {
268268
export class CheckBoxStyler implements style.Styler {
269269
private static setBorderColorProperty(view: any, newValue: any) {
270270
if (view.nativeiOSCheckBox){
271-
var color = new Color(newValue);
272-
console.log("setBorderColorProperty to "+ color);
273-
view.nativeiOSCheckBox.tintColor = color.ios;
271+
try{
272+
var color = new Color(newValue);
273+
view.nativeiOSCheckBox.tintColor = color.ios;
274+
}catch(error){
275+
//Do nothing, catch bad color value
276+
}
274277
}
275278
}
276279

demo/app/main-page.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ export function onTapTest(args){
3939
export function onDumpModel(args: any){
4040
var label = <Label>page.getViewById("modelDumpLabel");
4141
label.text = JSON.stringify(model.data.getItem(0));
42+
}
43+
44+
export function onPropertyChanged(args: any){
45+
console.log("Property Changed");
4246
}

demo/app/main-page.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<Repeater items="{{ data }}">
1919
<Repeater.itemTemplate>
2020
<StackLayout class="listitem" >
21-
<CheckBox:CheckBox text="{{ text }}" checked="{{ checked }}" fillColor="{{ color }}" tintColor="{{ color }}" />
21+
<CheckBox:CheckBox text="{{ text }}" checked="{{ checked }}" fillColor="{{ color }}" tintColor="{{ color }}" propertyChanged="onPropertyChanged" />
2222
</StackLayout>
2323
</Repeater.itemTemplate>
2424
</Repeater>

demo/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"version": "2.2.0"
66
},
77
"tns-ios": {
8-
"version": "2.1.1"
8+
"version": "2.2.1"
99
}
1010
},
1111
"dependencies": {
1212
"nativescript-checkbox": "file:..",
13-
"tns-core-modules": "^2.0.0"
13+
"tns-core-modules": "^2.2.1"
1414
},
1515
"devDependencies": {
1616
"babel-traverse": "6.7.6",
@@ -22,4 +22,4 @@
2222
"typescript": "^1.8.10",
2323
"tns-platform-declarations": "2.0.0"
2424
}
25-
}
25+
}

0 commit comments

Comments
 (0)