File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
tests/app/xml-declaration Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -900,3 +900,15 @@ export function test_hasSourceCodeLocations() {
900900 var labelSource = Source . get ( label ) ;
901901 TKUnit . assertEqual ( labelSource . toString ( ) , "file:///app/" + basePath + "examples/test-page.xml:3:5" ) ;
902902}
903+
904+ export function test_Setting_digits_for_text_Label_is_not_converted_to_number ( ) {
905+ var p = < Page > builder . parse ( '<Page><Label id="testLabel" text="01234"/></Page>' ) ;
906+ var testLabel = < Label > p . getViewById ( "testLabel" ) ;
907+ TKUnit . assertEqual ( testLabel . text , "01234" ) ;
908+ }
909+
910+ export function test_Setting_digits_for_text_Button_is_not_converted_to_number ( ) {
911+ var p = < Page > builder . parse ( '<Page><Button id="testButton" text="01234"/></Page>' ) ;
912+ var testButton = < Button > p . getViewById ( "testButton" ) ;
913+ TKUnit . assertEqual ( testButton . text , "01234" ) ;
914+ }
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ function ensureVisualState() {
2929registerSpecialProperty ( "class" , ( instance : definition . View , propertyValue : string ) => {
3030 instance . className = propertyValue ;
3131} ) ;
32+ registerSpecialProperty ( "text" , ( instance , propertyValue ) => {
33+ instance . set ( "text" , propertyValue ) ;
34+ } ) ;
3235
3336function getEventOrGestureName ( name : string ) : string {
3437 return name . indexOf ( "on" ) === 0 ? name . substr ( 2 , name . length - 2 ) : name ;
You can’t perform that action at this time.
0 commit comments