[self-interest] Copy down slots
ardeujho at cd.pn
Wed Mar 12 05:05:00 UTC 2014
I just tried doing this without using "Subclass me" and it seems to
work, as long as I make both objects independently - that is I don't
create the second object as a clone of the first. This seems to match
what it says in the Self Morphic document:
"Changes are propagated only to objects registered in the global
namespace (other prototypes), not to clones of those objects
What are the advantages of using copy down slots over using 'data
parents' as described in the "organizing programs without classes"
paper? In that paper a second parent is created that holds the data to
be inherited and the 'copy' operation in the trait is overridden to
copy the data parents. I'm curious why morphic went for the copy down
approach vs that.
On Wed, Mar 12, 2014, at 06:00 AM, ardeujho wrote:
I'm having trouble getting copy down slots working and I'm wondering if
I'm doing something wrong. These are the steps I took:
1) copy a new object (| parent*=traits clonable. x. |)
2) Set that as 'myfoo' in globals and set the creator path to 'myfoo'.
3) Do a "Subclass me" on the myfoo object. Use defaults for the
...the new object appears with the copy down'd 'x' slot...
4) Add a new slot 'y' to 'myfoo'
Here I expected 'y' to appear in my subclassed object but it did not.
This also does not work if I manually create an object and use the copy
down parent annotations. I see the copy down slots but adding a new
in the parent doesn't make it appear in the child.
If I add a field to 'set' though I do see it propagate to 'dictionary'.
Is my own created objects missing some annotation to make this work?
2. mailto:ardeujho at cd.pn?subject=Re%3A%20Copy%20down%20slots
3. mailto:self-interest at yahoogroups.com?subject=Re%3A%20Copy%20down%20slots
9. mailto:self-interest-unsubscribe at yahoogroups.com?subject=Unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Self-interest