[lively-kernel] newbie - "Cannot serialize old model object" problem

Jens Lincke Jens.Lincke at hpi.uni-potsdam.de
Tue Apr 26 11:26:11 CEST 2011


Hi Davide,


On 26.04.2011, at 00:30, Davide Della Casa wrote:

> I have a couple of questions:
> 
> - Is there any further documentation I can read beside what's in http://www.lively-kernel.org/repository/webwerkstatt/documentation/ ? Specifically around the structure of the code and how the page "boots"?
> 

since we refactored a lot the existing documentation to that topic is a bit outdated. But to keep it short:
Every page includes now only one external script: <script src="lively/bootstrap.js">
The path to that script is adapted during the serialization of that page.

The bootstrap.js supports the loading of old and new pages, which will be cleaned up after there are no old pages any more.
The data of the page lies in <meta id="LivelyJSONWorld"><![CDATA[{"id":0," ....
In old pages the data is serialized as XML, which does not support the serialization of arbitrary objects as our new serialization mechanism does.

What the booting does is to load all the necessary modules to load that page. Deserialize all objects in LivelyJSONWorld and start the world. 
In a normal page you will find loaded a file called combindedModules.js, this file is a statically generated file that bundles some of our core modules to speed up loading. 

The modules can be changed by the localconfig of the wiki such in:

http://www.lively-kernel.org/repository/webwerkstatt/lively/localconfig.js
Config.modulesOnWorldLoad = Config.modulesOnWorldLoad.concat(["lively.Graffle", "lively.Undo", "lively.ide.AutoCompletion", "lively.ide.SyntaxHighlighting", 'lively.Scripting'])
and additionally every page can also add local requirements this way.


>  - When I try to change the text in any textbox at http://www.lively-kernel.org/repository/webwerkstatt/documentation/GettingStarted.xhtml I get "TypeError: Cannot call method 'getUndoHistory' of null" - is there a way around that?
> 

thanks for reporting, I fixed that.


Best,

Jens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.hpi.uni-potsdam.de/archive/lively-kernel/attachments/20110426/df51b31c/attachment.htm 


More information about the lively-kernel mailing list