Skip to content

Commit

Permalink
Minor updates to the Java client; SyncGateway now specified upon clie…
Browse files Browse the repository at this point in the history
…nt creation and is subsequently unchanging.

git-svn-id: http://google-mobwrite.googlecode.com/svn/trunk@94 6a03f37a-134a-0410-852f-bbb3195577bb
  • Loading branch information
neil.fraser authored and neil.fraser committed Dec 1, 2009
1 parent 36f6892 commit 93e5fab
Show file tree
Hide file tree
Showing 10 changed files with 408 additions and 382 deletions.
4 changes: 2 additions & 2 deletions html/compressed_form.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified html/java-demos/mobwrite-demo.jar
Binary file not shown.
6 changes: 2 additions & 4 deletions html/mobwrite_core.js
Expand Up @@ -374,11 +374,9 @@ mobwrite.shareObj.prototype.syncText = function() {
}
} else {
// The last delta postback from the server to this shareObj didn't match.
// Send a full text dump to get back in sync. This will result in any
// Send a full text dump to get back in sync. This will result in any
// changes since the last postback being wiped out. :(
if (this.shadowText != clientText) {
this.shadowText = clientText;
}
this.shadowText = clientText;
this.clientVersion++;
var action = 'r:' + this.clientVersion + ':' +
encodeURI(clientText).replace(/%20/g, ' ');
Expand Down
11 changes: 6 additions & 5 deletions java/com/google/mobwrite/DemoEditorApplet.java
Expand Up @@ -22,12 +22,13 @@ public void init() {
public void run() {
createGUI();

MobWriteClient mobwrite = new MobWriteClient();

mobwrite.syncGateway = getParameter("syncGateway");
if (mobwrite.syncGateway == null) {
mobwrite.syncGateway = "http://mobwrite3.appspot.com/scripts/q.py";
String syncGateway = getParameter("syncGateway");
if (syncGateway == null) {
syncGateway = "http://mobwrite3.appspot.com/scripts/q.py";
}

MobWriteClient mobwrite = new MobWriteClient(syncGateway);

try {
mobwrite.maxSyncInterval = Integer.parseInt(getParameter("maxSyncInterval"));
} catch (Exception e) {
Expand Down
11 changes: 6 additions & 5 deletions java/com/google/mobwrite/DemoFormApplet.java
Expand Up @@ -59,12 +59,13 @@ public void init() {
public void run() {
createGUI();

MobWriteClient mobwrite = new MobWriteClient();

mobwrite.syncGateway = getParameter("syncGateway");
if (mobwrite.syncGateway == null) {
mobwrite.syncGateway = "http://mobwrite3.appspot.com/scripts/q.py";
String syncGateway = getParameter("syncGateway");
if (syncGateway == null) {
syncGateway = "http://mobwrite3.appspot.com/scripts/q.py";
}

MobWriteClient mobwrite = new MobWriteClient(syncGateway);

try {
mobwrite.maxSyncInterval = Integer.parseInt(getParameter("maxSyncInterval"));
} catch (Exception e) {
Expand Down

0 comments on commit 93e5fab

Please sign in to comment.