[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[tns8] Hello Workspace app

Steps to build the "hello workspace" app
  1. from windows cmd:
    tns create helloWorkspace
  2. at helloWorkspace/app level ensure: [tns8] Embedding S8 environment in your app
  3. replace default stackLayout code in /helloWorkspace/app/main-page.xml with:
    <StackLayout class="p-20">
            <Label text="Tap to evaluate an S8 expression" class="h1 text-center"/>
    	<TextField id="s8expression" hint="s8 expression" text="{{ s8expression }}" />
            <Button text="showIt" tap="{{ onTap }}" class="btn btn-primary btn-active"/>
            <Label id="evaluation" text="{{ evaluation }}" class="h2 text-center" textWrap="true"/>
  4. replace default /helloworld/app/main-view-model.js with:
    var Observable = require("data/observable").Observable;
    var s8 = require("./s8");
    function createViewModel() {
        var viewModel = new Observable();
        viewModel.s8expression = "Smalltalk classes size";
        viewModel.evaluation = "[tap to get result of evaluation]";
        viewModel.onTap = function() {
        return viewModel;
    exports.createViewModel = createViewModel;
  5. to run the app in