LiveCode and WebSockets

Mark Wilcox m_p_wilcox at yahoo.co.uk
Tue Jul 9 05:00:21 EDT 2013


Thanks Pierre, I'm pretty sure I could make something like that work but it's a nasty kludge, I'm not in any hurry (busy with non-LiveCode projects at the moment anyway) and when I get around to looking at it, I want to do it properly. :)


________________________________
 From: Pierre Sahores <sc at sahores-conseil.com>
To: How to use LiveCode <use-livecode at lists.runrev.com> 
Sent: Tuesday, 9 July 2013, 0:56
Subject: Re: LiveCode and WebSockets
 

Mark ,

Should work (untested) :

Node.js on the server side + revBrowser (desktop) or mobileBrowser (iOS/android) + some js +  <a href…>client-side pseudo urls</a> to get catched by :

on browserLoadRequested pUrl, pType
-- prefered on the iOS platform (desktop platforms untested)
end browserLoadRequested

and 

on browserStartedLoading pUrl
-- prefered on the Android platform (desktop platforms untested)
end browserStartedLoading

to being able to exchange bidirectional messages between your web layer to the native livecode one.

note : your web view pseudo URLs needs to match existing files (workingpath/file.html…) in your client app sandboxed cache or document directory to be catchable on the Android platform at least. To maintain a common codebase with the iOS app, i have the habit to create the on this platform too.

Pierre


More information about the use-livecode mailing list