<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, Adam<br>
<br>
indeed you changed the code of the wiki with the system browser :-)<br>
(
<meta charset="utf-8">
<a href="http://www.lively-kernel.org/repository/lively-wiki/lively/">http://www.lively-kernel.org/repository/lively-wiki/lively/</a>)<br>
<br>
r19492 | AdamSpitz | 2010-04-14 16:49:34 +0200 (Mi, 14 Apr 2010) | 2
lines<br>
Autoversioning commit: a non-deltaV client made a change to<br>
/lively/Base.js<br>
...<br>
<br>
Page local changes can be made using the Local code browser:<br>
<br>
For example the page:<br>
<a
href="http://www.lively-kernel.org/repository/lively-wiki/changelog/changelog.xhtml"> http://www.lively-kernel.org/repository/lively-wiki/changelog/changelog.xhtml</a><br>
adds requirements: ['lively.FileUploadWidget', 'cop.Workspace',
'lively.ide']<br>
defines the class JournalEntryMorph and executes some doIts<br>
<br>
what we meant with user specific modules is the follwing: a page can
add modul<br>
requirements and modules can also be but in user directories.<br>
<br>
<meta charset="utf-8">
<a
href="http://www.lively-kernel.org/repository/lively-wiki/users/AdamSpitz/HereYouGo.xhtml">http://www.lively-kernel.org/repository/lively-wiki/users/AdamSpitz/HereYouGo.xhtml</a><br>
<meta charset="utf-8">
<a
href="http://www.lively-kernel.org/repository/lively-wiki/users/AdamSpitz/hello.js">http://www.lively-kernel.org/repository/lively-wiki/users/AdamSpitz/hello.js</a><br>
<br>
The System browser does not know about these files yet, but we will
support them soon.<br>
<br>
Best<br>
<br>
Jens<br>
<br>
Am 14.04.10 17:19, schrieb Adam Spitz:
<blockquote
cite="mid:g2ya3b9e4441004140819z1f22eb72l5da48695e4d3e19b@mail.gmail.com"
type="cite">
<pre wrap="">Robert Krahn wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Part 2: Using modules to add your extensions
The first thing you need is some place to store your source code and your
data. You can create your own subdirectory in the wiki
here: <a class="moz-txt-link-freetext" href="http://www.lively-kernel.org/repository/lively-wiki/CreateUserDirectory.xhtml">http://www.lively-kernel.org/repository/lively-wiki/CreateUserDirectory.xhtml</a>
Your directory includes a WorldTemplate.xhtml that you can clone to create
new pages. You can then add new Worlds and add source code in them using the
local changes (and the Local code Browser, you find it in the Tools menu).
Or you can create your own JavaScript files using the System browser or
manually by checking out your directory using SVN and adding/editing files
with a TextEditor. The JavaScript files should include a module definition.
</pre>
</blockquote>
<pre wrap="">
I'm confused about all these different tools.
The System Code Browser (which I originally thought would be like a
Smalltalk browser, showing me what's in the live image) seems to be
showing me what's in the system code *files*. When I first open it up,
it says that everything, even the core stuff (Core.js, Text.js, etc.),
is "not loaded." Then when I click on the file name, it "loads", which
I take to mean that the system is parsing the file and showing me
what's in it (rather than showing me the actual code that's in the
live image). If I make a change in there and hit Apple-S, it saves the
change, and that change is visible if I hit my browser's Reload button
or even open the world in another browser. So it obviously saved my
change to a file somewhere. Where's the file? The only file in
<a class="moz-txt-link-freetext" href="http://www.lively-kernel.org/repository/lively-wiki/users/AdamSpitz/">http://www.lively-kernel.org/repository/lively-wiki/users/AdamSpitz/</a>
is the WorldTemplate.xhtml file (I don't see any .js files there), so
I hope I didn't just overwrite some important official LK file or
something.
And then there's the Javascript Code Browser, which I can open by
right-clicking any morph and saying "show class in browser." If I make
a change *there*, it seems to be only changing the running image -
when I reload the page my change is gone. Good, that makes sense to
me.
Incidentally, I noticed that after I've opened a System Code Browser,
the Javascript Code Browser doesn't seem to work anymore - I get an
error message in the console saying, "TypeError: Result of expression
'this.methodDicts' [undefined] is not an object." (Did I just cause
this error by mucking around with system files?)
Is the System Code Browser just meant to be a way of editing .js
files? (That is, it doesn't operate on the live image, it's just a bit
nicer than Emacs for editing .js files?) Is the idea that most
"normal" programming (programming that isn't likely to crash the whole
system if you make a typo) should be done in the Javascript Code
Browser?
</pre>
<blockquote type="cite">
<pre wrap="">** Using the namespace inside a module is NOT enforced. This means if you
define a class Object.subclass('SystemBrowser', {...}) it will "extend" the
Global namespace. This means that you can access the class via
Global.SystemBrowser (or simply with SystemBrowser). Only if you use the
namespace explicitly Object.subclass('lively.ide.SystemBrowser', {...}) the
namespace will be used and you can access the class via
Global.lively.ide.SystemBrowser (or simply lively.ide.SystemBrowser).
We might change that in the future to enforce namespace usage.
</pre>
</blockquote>
<pre wrap="">
If you do that, will it still be possible for me to write, say, a
"set" class and add an asSet method to the Array class?
Come to think of it, how does the current system know how to find
"extension" methods like that and file them out when you file out the
module that they belong to? In Self's module system (and in my port of
it to LK), the module object itself keeps track of all the slots
belonging to the module. But I don't think I've seen anything like
that in LK. (I could easily have missed it, though.)
Adam
_______________________________________________
lively-kernel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lively-kernel@hpi.uni-potsdam.de">lively-kernel@hpi.uni-potsdam.de</a>
<a class="moz-txt-link-freetext" href="http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel">http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel</a>
</pre>
</blockquote>
<br>
</body>
</html>