Re: Method undefined - why?

2017-03-24 Thread Alexander Burger
Hi Thorsten, > (class 1 ...) > (dm ...) > (dm ...) > > (class 2 ...) > (dm ...) > (dm ...) > > The reader seems to remember which class was defined last, and > associates the following methods to that class. Not the reader, but the 'class' function: (de class Lst (let L (val (setq

Re: Method undefined - why?

2017-03-23 Thread Thorsten Jolitz
Thorsten Jolitz writes: > so somehow my understanding of read macros is false here: > > (class ~(any (pack '+ ClsNm))) Grrr ... of course when reading (de foo (ClsNm) ...) ClsNm is still NIL, so the outcome of the above is (class +) which can't work. Sorry for the noise. --

Re: Method undefined - why?

2017-03-23 Thread Thorsten Jolitz
Thorsten Jolitz writes: > Alexander Burger writes: Ok, this works ;-) : (de foo2 (ClsNm MethNm) (class +Bar) (dm plus> (X) (+ 1 X))) -> foo2 : (foo2) -> plus> : (setq B (new '(+Bar))) -> $177641167640474 : (plus> B 3) -> 4 ')) so somehow my

Re: Method undefined - why?

2017-03-23 Thread Thorsten Jolitz
Alexander Burger writes: Hi Alex, >> : (de +Test >>(T (Hi) (=: hi Hi)) >>(hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,")) ) >> -> +Test > > .. while this is half of the lunch ... > >> : (hi> Foo "Alex") >> !? (hi> Foo "Alex") >> hi> -- Undefined # => WHY? >

Re: Method undefined - why?

2017-03-23 Thread Thorsten Jolitz
Joe Bogner writes: HiJoe, > Hi Thorsen, what about using (class) and (dm) instead? > > joebo@joebo:~/dev/picoLisp$ pil + > : (class +Test) > -> +Test > : (dm T (Hi) (=: hi Hi)) > -> T > : (dm hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,")) > -> hi> > : (setq Foo

Re: Method undefined - why?

2017-03-23 Thread Alexander Burger
Hi Thorsten, > : (de +Test >(T (Hi) (=: hi Hi)) >(hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,")) ) > -> +Test .. while this is half of the lunch ... > : (hi> Foo "Alex") > !? (hi> Foo "Alex") > hi> -- Undefined # => WHY? .. it is better (as Joe Bogner suggested) to use 'dm'.

Re: Method undefined - why?

2017-03-23 Thread Joe Bogner
Hi Thorsen, what about using (class) and (dm) instead? joebo@joebo:~/dev/picoLisp$ pil + : (class +Test) -> +Test : (dm T (Hi) (=: hi Hi)) -> T : (dm hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,")) -> hi> : (setq Foo (new '(+Test) "Hi @1")) -> $177463554467256 : (hi> Foo "Alex") -> "Hi Alex"