File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -268,9 +268,12 @@ class BEMCheckBoxDelegateImpl extends NSObject implements BEMCheckBoxDelegate {
268
268
export class CheckBoxStyler implements style . Styler {
269
269
private static setBorderColorProperty ( view : any , newValue : any ) {
270
270
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
+ }
274
277
}
275
278
}
276
279
Original file line number Diff line number Diff line change @@ -39,4 +39,8 @@ export function onTapTest(args){
39
39
export function onDumpModel ( args : any ) {
40
40
var label = < Label > page . getViewById ( "modelDumpLabel" ) ;
41
41
label . text = JSON . stringify ( model . data . getItem ( 0 ) ) ;
42
+ }
43
+
44
+ export function onPropertyChanged ( args : any ) {
45
+ console . log ( "Property Changed" ) ;
42
46
}
Original file line number Diff line number Diff line change 18
18
<Repeater items =" {{ data }}" >
19
19
<Repeater .itemTemplate>
20
20
<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 " />
22
22
</StackLayout >
23
23
</Repeater .itemTemplate>
24
24
</Repeater >
Original file line number Diff line number Diff line change 5
5
"version" : " 2.2.0"
6
6
},
7
7
"tns-ios" : {
8
- "version" : " 2.1 .1"
8
+ "version" : " 2.2 .1"
9
9
}
10
10
},
11
11
"dependencies" : {
12
12
"nativescript-checkbox" : " file:.." ,
13
- "tns-core-modules" : " ^2.0.0 "
13
+ "tns-core-modules" : " ^2.2.1 "
14
14
},
15
15
"devDependencies" : {
16
16
"babel-traverse" : " 6.7.6" ,
22
22
"typescript" : " ^1.8.10" ,
23
23
"tns-platform-declarations" : " 2.0.0"
24
24
}
25
- }
25
+ }
You can’t perform that action at this time.
0 commit comments