MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / buttonTap

Function buttonTap

apps/automated/src/xml-declaration/mainPage.ts:23–45  ·  view source on GitHub ↗
(args: observable.EventData)

Source from the content-addressed store, hash-verified

21
22var count = 0;
23export function buttonTap(args: observable.EventData) {
24 count++;
25
26 obj.set('id', obj.get('id') + 1);
27
28 subObj.set('subId', subObj.get('subId') + 1);
29
30 var parent = (<view.View>args.object).parent;
31 if (parent) {
32 var lbl = parent.getViewById<label.Label>('Label1');
33 if (lbl) {
34 lbl.text = 'You clicked ' + count + ' times!';
35 }
36 }
37
38 http.getString('http://it-ebooks-api.info/v1/book/1615005640').then((r) => {
39 console.log('R: ' + r);
40 });
41
42 http.getString('http://www.telerik.com').then((r) => {
43 console.log('R: ' + r);
44 });
45}
46
47export function MyPageLoaded(args: observable.EventData) {
48 console.log('Page is loaded!');

Callers

nothing calls this directly

Calls 4

getMethod · 0.65
setMethod · 0.45
getStringMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected