octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: addproperty: a `XXX' property already exists in the graphics object


From: Ben Abbott
Subject: Re: addproperty: a `XXX' property already exists in the graphics object
Date: Fri, 11 Dec 2009 07:25:01 -0500

On Dec 11, 2009, at 5:52 AM, Shai Ayal wrote:

> Hi all,
> 
> This very descriptive error is raised every time addproperty tries to
> add a property that already exists. It's used in the following
> plotting scripts:
> 
> area.m
> colorbar.m
> plotyy.m
> print.m
> stairs.m
> private/__add_datasource__.m
> private/__bar__.m
> private/__contour__.m
> private/__errplot__.m
> private/__quiver__.m
> private/__scatter__.m
> private/__stem__.m
> 
> with the unfortunate consequence of issuing an error when one of these
> scripts is called more than once.
> Looking at the matlab documentation, I found no equivalent function to
> add properties to objects. While matlab has an addproperty function,
> it is used for other things.
> In octave this function is used to construct an hggroup object
> "on-the-fly", while in matlab all the relevant group objects are
> predefined (i.e. the barseries object).
> 
> So the question what to do about it? I have several suggestions
> (listed in approximate order of complexity to implement)
> 1. turn the error into a warning
> 2. in the scripts, check if a propertiy exists before trying to add it
> 3. Make the added properties belong only to a specific object
> instance, so when the instance will be deleted, so will all of it's
> added properties
> 4. remove the addproperty command, and predefine all group objects
> (this is matlab compatible)
> 
> Comments?
> 
> Shai


This is a strange bug.  Soren came across it in late October.

        
http://old.nabble.com/`__pixels_per_inch__'-property-already-exists-to26049817.html#a26053268

After calling addproperty, it was not possible to "get" or "set" the property 
values. I can't verify this behavior persists, since I'm unable to build the 
sources on Mac OSX ... but I thought I'd mention it.

This same problem has also been mentioned on the threads below.

        http://old.nabble.com/gnulib-and-automake-to25480858.html#a26131731

        http://old.nabble.com/Re:-plot-warnings-to26134549.html#a26134549

        http://old.nabble.com/3.2.4-call-for-patches-to26440879.html#a26557048

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]