Hi Henrik,

> Sorry for the wording, "non-existent" would have been better.
> 
> The thing is I'm not able to access the objects if they are stored in a list
> in the parent, eg (setq *Objs (collect ... )), if I then do (show (car
> *Objs)) in the child process I get NIL.

There must be some fundamental misunderstanding here.


Let's do this: Edit in "family.l" from the distribution (after unpacking
"doc/family.tgz" or "doc/family64.tgz") the 'go' function:

   (de go ()
      (rollback)
      (setq *Objs (collect 'nm '+Person))  # Inserted this line
      (server 8080 "!person") )

'*Objs' is set in the parent, as 'server' will do the first 'fork'.


Then I start the server

   $ pil family.l -main -go +

connect the browser to localhost:8080, and at the resulting prompt (we
are in the child, right?):

   : (show (car *Objs))
   {2-o} (+Man)
      ma {2-j}
      fin 711698
      dat 688253
      nm "Adalbert Ferdinand Berengar Viktor of Prussia"
      pa {2-h}
   -> {2-o}

or

   : (more *Objs show)
   {2-o} (+Man)
      ma {2-j}
      fin 711698
      dat 688253
      nm "Adalbert Ferdinand Berengar Viktor of Prussia"
      pa {2-h}
                     
   {2-1L} (+Man)
      mate {2-1M}
      nm "Adam"

   {2-1B} (+Man)
      kids ({2-1C} {2-1D} {2-1E} {2-1F} {2-1G} {2-1H} {2-1I} {2-g} {2-a})
      nm "Albert Edward"
      job "Prince"
      mate {2-f}
      fin 680370
      dat 664554

   {2-b} (+Man)
      ma {2-Y}
      nm "Albert Victor"
      dat 680760
      pa {2-a}
      fin 690991
   ...

Voila! :)

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to