Page 1 of 1

Contexts

Posted: Mon Mar 01, 2004 9:19 am
by newdep
Hello Lutz,

How can i display all generated namespaces under newlisp? For the GUI-TK version you have this seperated window which contains all known Contexts, in the console mode a function like (contexts) would be very nice to have..

> (contexts)
( MAIN a PERSONS testing )


Regards, Norman.

Posted: Mon Mar 01, 2004 12:01 pm
by HPW
Hello newdep,

From newLISP-tk.tcl

(filter (lambda (x) (context? (eval x))) (symbols 'MAIN))

Posted: Mon Mar 01, 2004 12:13 pm
by newdep
Hello HPW,

Aaaa Thanks !!! Ill have a look in the code...
Nifty function btw.. ;-)

Norman.

Posted: Mon Mar 01, 2004 12:58 pm
by nigelbrown
A variation:
(filter context? (map eval (symbols)))

Posted: Mon Mar 01, 2004 2:23 pm
by newdep
Thank you for the tips, because i was just looking for way on how to
get ALL the variables displayed in a context and i did not expect (symbols) to work on context too ;-) nice nice...

Norman.