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"



On Thu, Mar 23, 2017 at 3:17 PM, Thorsten Jolitz <tjol...@gmail.com> wrote:

>
> Hi List,
>
> playing around a bit wih Pil classes/object, here is something I don't
> understand:
>
>
> #+BEGIN_SRC picolisp
>
> : (de +Test
>    (T (Hi) (=: hi Hi))
>    (hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,")) )
> -> +Test
>
> : (setq Foo (new '(+Test) "Hi @1"))
> -> $176777024346263
>
> : (hi> Foo "Alex")
> !? (hi> Foo "Alex")
> hi> -- Undefined  # => WHY?
> ?
>
> : (getl Foo)
> -> (("Hi @1" . hi))
>
> : (can 'hi>)
> -> ((hi> . +Test))
>
> : (type Foo)
> -> (+Test)
>
> : (show Foo)
> $176777024346263 (+Test)
>    hi "Hi @1"
> -> $176777024346263
>
> : (methods Foo)
> -> ((T . +Test) (hi> . +Test))
>
> #+END_SRC
>
>
> Is that strange, or is the problem sitting in front of the computer?
>
> --
> cheers,
> Thorsten
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to