[Oz] Hmmm: applying non-procedure and non-object

Seif Haridi seif at sics.se
Mon Nov 1 08:18:11 CET 1999


Mathias, I looked quickly to your program the method 'dosomething'
meth dosomething
 {ro doAnotherThing(SomeData)}
end

should be
meth dosomething
 {@ro doAnotherThing(SomeData)}
end

to access an attributed you have to use @attr, remeber that in your case 'ro'
is a key to the attribute. It is
only an atom, i.e. a symbolic name.
You need to get the value of the attribute which is @attr.

Seif

Mathias.Picker at virtual-earth.de wrote:

> I' m puzzling about the following:
>
> I have an object which has a remote object as attribute, e.g.:
>
> class Connector
> attr ro
>
> meth connect(Ticket)
>  ro <- {Connection.take Ticket}
> end
>
> meth dosomething
>  {ro doAnotherThing(SomeData)}
> end
> end
>
> Compilation gives:
>
> *** static analysis error ***
> applying non-procedure and non-object
>
> I've now resolved to use
>
> meth dosomething
>   fun {TmpSend Obj Msg}
>    {Obj Msg}
>   end
> in
>   {TmpSend ro doAnotherThing(SomeData)}
> end
>
> (I've yet to test this, just hope it works, but at least it compiles :-)
>
> Is there a more elegant solution? Do I do something wrong??
>
> Thanks for listening,
>
> Mathias
> --
>                             virtual earth
>  Mathias Picker
>  Geschäftsführer      Gesellschaft für Wissens re/prä sentation mbH
>
>                             Mathias.Picker at virtual-earth.de
>                             Fon +49 89  / 540 7425-0
>                             Fax +49 89  / 540 7425-9
>
>   ------------------------------------------------------------------------
>    Part 1.2Type: APPLICATION/pgp-signature
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gforge.info.ucl.ac.be/pipermail/mozart-users/attachments/19991101/34e333f7/attachment.html


More information about the mozart-users mailing list