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

Function stack0Loaded

apps/ui/src/bindings/xmlbasics-page.ts:6–22  ·  view source on GitHub ↗
(args: observable.EventData)

Source from the content-addressed store, hash-verified

4import * as observable from '@nativescript/core/data/observable';
5
6export function stack0Loaded(args: observable.EventData) {
7 var source = new observable.Observable();
8 var stack0 = <stackLayoutModule.StackLayout>args.object;
9 var target = stack0.getViewById<textFieldModule.TextField>('tf');
10 var button = stack0.getViewById<textFieldModule.TextField>('btn');
11 var bindingOptions = {
12 sourceProperty: 'textSource',
13 targetProperty: 'text', // ,
14 // twoWay: true
15 };
16 target.bind(bindingOptions, source);
17 source.set('textSource', 'Text');
18
19 button.on(buttonModule.Button.tapEvent, function () {
20 button.text = source.get('textSource');
21 });
22}
23
24export function stack1Loaded(args: observable.EventData) {
25 var stack1 = <stackLayoutModule.StackLayout>args.object;

Callers

nothing calls this directly

Calls 4

setMethod · 0.95
getMethod · 0.95
bindMethod · 0.80
onMethod · 0.65

Tested by

no test coverage detected