No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] XOtcl 1.3 bug
From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Wed, 6 Oct 2004 23:26:33 +0200
Hi Attilio,
if i would be Mr Spock, i would say "fascinating".
The example can be simplified to:
set pippo 1
Object o
puts [o exists pippo]
Object o::p
puts [o exists pippo]
and was like this already at least in 0.9 (in 2001),
most likely as well in all versions supporting "exists".
For the time being, you can use:
Object instproc exists var {
string compare [my info vars $var] ""
}
puts [o exists pippo]
o set pippo 1
puts [o exists pippo]
It should be fixed properly in the forthcoming release.
best regards
-gustaf
On Wednesday 06 October 2004 17:38, Attilio Dona` wrote:
> Hy Gustaf and Uwe,
>
> We have the following bug:
>
> package require XOTcl
> namespace import xotcl::*
>
> xotcl::Class::Parameter create Param -parameter {
> {value ""}
> }
>
> Class create MA -superclass Class
>
> MA parameter {{v -Class {Param -value ciao} -default 1}}
>
> MA create A
>
> puts "A exists pippo: [A exists pippo]"
>
> set pippo 10
>
> puts "A exists pippo: [A exists pippo]"
>
>
> --> A exists pippo: 0
> --> A exists pippo: 1
>
> This is true if you have at least one parameter defined for a Metaclass
> and for every global variable defined!
>
> ciao
> Attilio
>
>
>
>
> --------------------------------------------------------------------
>
> 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
>
> --------------------------------------------------------------------
Date: Wed, 6 Oct 2004 23:26:33 +0200
Hi Attilio,
if i would be Mr Spock, i would say "fascinating".
The example can be simplified to:
set pippo 1
Object o
puts [o exists pippo]
Object o::p
puts [o exists pippo]
and was like this already at least in 0.9 (in 2001),
most likely as well in all versions supporting "exists".
For the time being, you can use:
Object instproc exists var {
string compare [my info vars $var] ""
}
puts [o exists pippo]
o set pippo 1
puts [o exists pippo]
It should be fixed properly in the forthcoming release.
best regards
-gustaf
On Wednesday 06 October 2004 17:38, Attilio Dona` wrote:
> Hy Gustaf and Uwe,
>
> We have the following bug:
>
> package require XOTcl
> namespace import xotcl::*
>
> xotcl::Class::Parameter create Param -parameter {
> {value ""}
> }
>
> Class create MA -superclass Class
>
> MA parameter {{v -Class {Param -value ciao} -default 1}}
>
> MA create A
>
> puts "A exists pippo: [A exists pippo]"
>
> set pippo 10
>
> puts "A exists pippo: [A exists pippo]"
>
>
> --> A exists pippo: 0
> --> A exists pippo: 1
>
> This is true if you have at least one parameter defined for a Metaclass
> and for every global variable defined!
>
> ciao
> Attilio
>
>
>
>
> --------------------------------------------------------------------
>
> 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 und Neue Medien Wirtschaftsuniversität Wien, Augasse 2-6, 1090 Wien