Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Module loading for android is done in a different way.

  • Loading branch information...
commit 718afa80604fdc0ab52cafe611bb40bd1dbf3a61 1 parent 3d4ac74
@jolby authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 example/ReplTest/Resources/app.js
View
13 example/ReplTest/Resources/app.js
@@ -1,11 +1,16 @@
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
-//var repl = Titanium.Repl.createReplServer();
-var replserverModule = require('com.evocomputing.replserver');
-Ti.API.info("module is => "+replserverModule);
+if(Ti.Platform.osname == 'android') {
+ var repl = Titanium.Repl.createReplServer();
+}
+else if (Ti.Platform.osname == 'iphone'){
+ var replserverModule = require('com.evocomputing.replserver');
+ Ti.API.info("module is => "+replserverModule);
+ var repl = Titanium.Repl.createReplServer();
+}
+
-var repl = replserverModule.createReplServer({'listenPort' : 5071});
//show getting/setting properties
Ti.API.info("repl: "+repl);
Please sign in to comment.
Something went wrong with that request. Please try again.