[Xotcl] xotcl 1.2: info parameter problem

Gustaf Neumann neumann at wu-wien.ac.at
Tue Mar 23 15:29:45 CET 2004


On Tuesday 23 March 2004 13:20, Attilio Dona wrote:
> Hi,
>
> I am newer of XOTcl and I am evaluating the language for using it
> instead of Itcl in the new version
> of a large OSS Telecommunication sw project ranging from SDH/PDH, ip,atm
> and application level management.
>
> XOTcl builded successfully on HP-UX 11 and SunSolaris 8 and was
> integrated easily it into a starkit.

 Hi Attilio,
 good to hear this.

> My preliminary tests reveal this bug:
>
> # define a C class with a name
> Class C -parameter {{name ""}}
>
> # add a new parameter
> C parameter {{oid ""}}
>
> # now inspect the parameters
> C info parameter
> {oid ""}
>
> Whereas it would be:
> {name ""} {oid ""}

 This is a known deficiency. info parameter returns currently 
 the content of the last parameter argument. 

 Please use for the time being the following approach to
 add parameters (maybe define a proc for it).

   Class C -parameter {{name ""}}
   ...
   # add a new parameter
   C parameter [concat [C info parameter] {{oid ""}}]
   ...
   C info parameter
   # ... returns: {name ""} {oid ""}


 -gustaf neumann


PS: I am currently not completely happy with the parameter command,
 and started some time ago a few approaches to redo it, but these
 turned out to have other deficiencies. Known problems of the
 current implementation:

    - "info parameter" is not truely introspective but
      returns the last string content (although, this is in most cases fine)

    - the semantics of the method "parmeter" is different 
      to other methods where one can specify multiple values. Look 
      e.g. on the "mixin" method:  one can remove mixins by issueing the mixin 
      command again with a shorter list of values
        ....
        o mixin A B
        ....
        o mixin A
      In contrary to "mixin" another call of "parameter" adds a new one.

    - for the same reason, one cannot remove a parameter
      through the parameter interface (although one can remove the instcmd
      and the default by hand)

 I think, a better approach will be to use subobjects of the class to 
 handle parameter semantics, but this will be most probably 
 slower than the current version, which works quite well in a 
 wide range of apps....

>--------------------------------------------------------------------
>CONFIDENTIALITY NOTICE
>This message and its attachments are addressed solely to the persons
>above and may contain confidential information. If you have received
>the message in error, be informed that any use of the content hereof
>is prohibited. Please return it immediately to the sender and delete
>the message. Should you have any questions, please contact us by
>replying to webmaster at telecomitalia.it.
>        Thank you
>                                        www.telecomitalia.it
>--------------------------------------------------------------------

-- 
Univ.Prof. Dr.Gustaf Neumann
Abteilung für Wirtschaftsinformatik
WU-Wien, Augasse 2-6, 1090 Wien



More information about the Xotcl mailing list