fenfire-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fenfire-dev] about caching and testing


From: Asko Soukka
Subject: [Fenfire-dev] about caching and testing
Date: Sat, 13 Sep 2003 08:10:47 +0300
User-agent: Mutt/1.4.1i

Hei,

I fixed FenMM (org.fenfire.demo.mm) to use the new api, but got a
problem with caching: usually the content of nodes didn't update at
all, sometimes the content updated while editing, but after I moved to
an another node, the node returned to show the old content. I wonder,
if someone can the problem in the following code. Mudyc said that
there is no need for explicit freeing of the changed node from the
cache. 

The another thing is about testing demos. As Tuomas told. in the best case it 
would work like:

import demo
vs = demo.scene()
render(vs)

This would already test a lot. But at least in FenMM it stopped
already on the first lines, when the global window attribute in demo
environment (w) was not found. And I could't get it from
vob.putil.demowindow.w either.

Well, wondering these more on monday..

--- 

ff_structure = ff.structure.Ff.create(fen.graph, myalph)

functional = ff.functional.SuperFunctional1(
    fen.constgraph,
    vob.AbstractUpdateManager.getInstance()
    )

functional.cache("ContentFunction", 1);
functional.cache("NormalTextNodeView", 500);
functional.cache("AccursedTextNodeView", 10);

contentFunction = functional.createFunctionInstance(
    "ContentFunction",
    ff.structure.Ff.ContentFunction,
    [ ff_structure ]).getCallableFunction()

# nodeview for normal nodes
normal_text = ff.view.TextNodeView(contentFunction, style, java.awt.Color(0., 
0., 0.), 250.)
normalf = functional.createFunctionInstance(
    "NormalTextNodeView",
    ff.fenmm.WhiteNodeView,
    [normal_text, java.awt.Color(.6, .6, .6)])

# nodeview for accursed nodes
accursed_text = ff.view.TextNodeView(contentFunction, style, 
java.awt.Color.black, 250.)
accursedf = functional.createFunctionInstance(
    "AccursedTextNodeView",
    ff.fenmm.WhiteNodeView,
    [accursed_text, java.awt.Color(.9, .9, .9)])

multiplexer = ff.swamp.MultiplexerNodeFunction(
    normalf.getCallableFunction(),
    accursedf.getCallableFunction())

-- 
Asko Soukka <address@hidden>
<http://www.iki.fi/asko.soukka/>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]