[e-lang] simple question
Kevin Reid
kpreid at mac.com
Tue Aug 15 19:45:05 EDT 2006
On Aug 15, 2006, at 15:59, Matej Kosik wrote:
> I am not sure how to work with CapDesk (I've launched it; I saw some
> directories; I have tried to "install" the capEdit.capplet but it
> failed
> with the following message:
>
> starting run prep
> made scope 2
>
> # value: <capEditCapletAuthor>
> shown
> about to get requestsTree
> got requestsTree
> requests retrieval failed: problem: Prefix doesn't match: visit
This is a bug in E 0.8.35f I've seen myself. It has been fixed since
but there is no newer release yet.
> E programs cannot be run in safeMode without CapDesk? For example:
> running a E program and giving it (at startup) capability to some
> object...which, for example, enables it to write 10 lines to some
> file.
> Or something similar. (just a proposal)
Of course they can.
? def makeEParser := <import:org.erights.e.elang.syntax.makeEParser>
? def program := makeEParser.run(<file:///home/kosik/program.e>)
# value: e`...`
? def object := program.eval(safeScope)
# value: <programWithoutAuthority>
? var alive := true
? def writer(text) {
> require(alive)
> alive := false
> def lines := text.split("\n")
> <file:///home/kosik/output.txt>.appendText(
> "\n".join(lines(0, 10.min(lines.size())))
> )
> }
? object.run(writer)
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list