This shows you the differences between two versions of the page.
built_in:call [2015/03/26 21:03] madlyr created |
built_in:call [2018/04/15 12:55] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====Call===== | ||
- | ====Description==== | ||
- | |||
- | The **Call** method makes phone call to a **number**. | ||
- | < | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code javascript> | ||
- | |||
- | function OnStart() | ||
- | { | ||
- | //Create a layout with objects vertically centered. | ||
- | lay = app.CreateLayout( " | ||
- | |||
- | txt = app.CreateText( " | ||
- | txt.SetMargins( 0, 0.05, 0, 0 ); | ||
- | lay.AddChild( txt ); | ||
- | |||
- | edt = app.CreateTextEdit( "", | ||
- | edt.SetMargins( 0, 0, 0, 0.05 ); | ||
- | lay.AddChild( edt ); | ||
- | |||
- | btn = app.CreateButton( " | ||
- | btn.SetMargins( 0, 0.05, 0, 0.05 ); | ||
- | btn.SetTextSize( 20 ); | ||
- | lay.AddChild( btn ); | ||
- | |||
- | //Set function to call when button pressed. | ||
- | btn.SetOnTouch( btn_OnTouch ); | ||
- | |||
- | //Add layout to app. | ||
- | app.AddLayout( lay ); | ||
- | } | ||
- | |||
- | function btn_OnTouch() | ||
- | { | ||
- | app.Call( edt.GetText() ); | ||
- | } | ||
- | |||
- | </ |