[Xotcl] Named objects
Jonathan Kelly
jonkelly at fastmail.fm
Fri Aug 10 03:39:46 CEST 2012
Hi,
I'm trying to get my head into the "named object" space. I was looking
at the container example for a way in and now I'm stuck (again).
nx::Class create SimpleContainer {
:property {memberClass ::MyItem}
:property {prefix member}
# Require the method "autoname" for generating nice names
:require method autoname
# The method new is responsible for creating a child of the current
# container.
:public method new {args} {
set item [${:memberClass} create [:]::[:autoname ${:prefix}]
{*}$args]
}
}
What does the ":require method autoname" do?
I think I understand what [:autoname ${:prefix}] is/does but what on
earth is "[:]::[:autoname ${:prefix}]" ?
Jon
More information about the Xotcl
mailing list