Editing main.jpf
[jpf-core.git] / examples / Empty.groovy
1 class Empty {
2
3         // This function runs when the SmartApp is installed
4         def installed() {
5                 // This is a standard debug statement in Groovy
6                 //log.debug "Installed with settings: ${settings}"
7                 //int x = 5;
8                 //int y = 6;
9                 //int result = x + y;
10                 //return result;
11                 println "installed() is called!"
12                 boolean thisBoolean = false;
13                 initialize(thisBoolean)
14         }
15
16         // This function is where you initialize callbacks for event listeners
17         def initialize(thisBoolean) {
18                 // The subscribe function takes a input, a state, and a callback method
19                 //subscribe(contact, "contact.open", openHandler)
20                 //subscribe(contact, "contact.closed", closedHandler)
21                 thisBoolean = true;
22                 println "Boolean is now " + thisBoolean
23                 println "initialize() is called!"
24         }
25
26         static void main(String[] args) {               
27
28                 Empty empty = new Empty();
29                 //int result = emp.installed();
30                 //println result;
31                 empty.installed()
32                 int x = 5;
33                 int y = 6;
34                 int result = x + y;
35                 println result
36                 println "End of call!"
37         }       
38 }