[General] How to Execute Code@World Startup on Lively Wiki?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[General] How to Execute Code@World Startup on Lively Wiki?

Philip Weaver
I want some code to execute every time my world opens on the wiki. Is this
possible? I have done this locally already by altering my local copy of
Main.js.

I'm basically trying to incorporate my own examples and demo into my
existing wiki page without having to use alt-d to kick them off. Do I
instead just need to host my own page?

Thanks,
Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090222/e0752680/attachment.html 


Reply | Threaded
Open this post in threaded view
|

[General] How to Execute Code@World Startup on Lively Wiki?

Robert Krahn
Hi Philip,

paste and select your scripts in a Wiki World. Then open a context  
menu, go to 'Text functions...' and choose 'add as preamble to current  
ChangeSet' or 'add as postscript to current ChangeSet'.

When you have new Morph definitions and instances of those Morphs  
should be saved with the page, put the definitions in the preamble  
(because the preamble is evaluated before the World is serialized). If  
you have scripts which are accessing the WorldMorph or its submorphs  
than put those into the postscript.

You can than view and change the ChangeSet by opening the  
SystemBrowser and choose 'ChangeSet for World' in the left pane (at  
the bottom).

Robert


On Feb 22, 2009,@2:53 PM, Philip Weaver wrote:

>
> I want some code to execute every time my world opens on the wiki.  
> Is this possible? I have done this locally already by altering my  
> local copy of Main.js.
>
> I'm basically trying to incorporate my own examples and demo into my  
> existing wiki page without having to use alt-d to kick them off. Do  
> I instead just need to host my own page?
>
> Thanks,
> Philip
> _______________________________________________
> General mailing list
> [hidden email]
> http://livelykernel.sunlabs.com/mailman/listinfo/general