[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: addproperty: a `XXX' property already exists in the graphics object
From: |
Michael Goffioul |
Subject: |
Re: addproperty: a `XXX' property already exists in the graphics object |
Date: |
Fri, 11 Dec 2009 23:45:11 +0000 |
On Fri, Dec 11, 2009 at 11:02 PM, John W. Eaton <address@hidden> wrote:
> >From reading the code (without the patch), I expected the following
> behavior
>
> octave> hg1 = hggroup ();
> octave> addproperty ("textlist", hg1, "data", pi);
> octave> hg2 = hggroup ();
> octave> get (hg1, "textlist")
> ans = 3.1416
> octave> get (hg2, "textlist")
> ans = 3.1416
> octave> set (hg1, "textlist", e);
> octave> get (hg1, "textlist")
> ans = 2.7183
> octave> get (hg2, "textlist")
> ans = 2.7183
>
> but instead, I see
>
> octave> hg1 = hggroup ();
> octave> addproperty ("textlist", hg1, "data", pi);
> octave> hg2 = hggroup ();
> octave> get (hg1, "textlist")
> ans = 3.1416
> octave> get (hg2, "textlist")
> error: get: unknown hggroup property textlist
> octave> set (hg1, "textlist", e);
> octave> get (hg1, "textlist")
> ans = 2.7183
> octave> get (hg2, "textlist")
> error: get: unknown hggroup property textlist
This is the expected behavior. Dynamic properties are specific to
a particular objects. They are not shared and hg2 should not have
any "textlist" property. This was my initial design of the system,
but looking at the changelog, many things have been changed
and this might have broken the initial design.
Michael.