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@telecomitalia.it.
Thank you
www.telecomitalia.it
--------------------------------------------------------------------
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@telecomitalia.it.
Thank you www.telecomitalia.it
On Wed, 6 Oct 2004, Gustaf Neumann wrote:
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".
Oop, I think I noticed something like this too but forgot to report it as I made a workaround. Bad me :-)
(Need to look at that segmentation fault thing again as soon as I have time) / http://www.fishpool.com/~setok/