Skip to content
laforge49 edited this page Sep 28, 2011 · 2 revisions

GetRequest can be applied to IncDesList, but not SetRequest.

##List Test

val systemServices = SystemServices(new ServicesRootComponentFactory)
val dbName = "StringListNoLog.db"
val file = new java.io.File(dbName)
file.delete
val properties = new Properties
properties.put("dbPathname", dbName)
val db = Subsystem(
  systemServices,
  new SmallNoLogComponentFactory,
  properties = properties,
  actorId = ActorId("db"))
val list = IncDesStringList(null, db)
val ids0 = IncDesString(null)
val chain = new Chain
chain.op(systemServices, Register(db))
chain.op(list, Add[IncDesString, String](null, ids0))
chain.op(db, SetRequest(db, "/$", list))
chain.op(db, GetRequest(db, "/$/0"), "0")
chain.op(db, GetRequest(db, "/$/1"), "1")
Future(systemServices, chain)
println(chain.results)
systemServices.close

Output.

{0=org.agilewiki.incDes.IncDesString@319c0bd6, 1=null}

ListTest


tutorial

Clone this wiki locally