From graphics-request at octave dot org Tue Dec 21 14:41:03 2004 Subject: Re: Octave GUI API: Proposal. From: Ole Jacob Hagen To: N Smethurst CC: graphics at octave dot org Date: Tue, 21 Dec 2004 22:41:50 +0100 N Smethurst wrote: > There is another advantage to this approach. It allows the use of a > syntax > > more appropriate to an object based system: > > For example, instead of: > > mysurface = surface(X, Y, Z); > > set(mysurface, 'AmbientStrength', 0.5); > > set(mysurface, 'DiffuseStrength', 0.8); > > strength = get(mysurface, 'AmbientStrength'); > > One would say: > > mysurface = surface(X, Y, Z); > > mysurface.AmbientStrength = 0.5; > > mysurface.DiffuseStrength = 0.8; > > strength = mysurface.AmbientStrength; > Wouldn't this kind of behaviour break compatibility with the users that still uses M*atlab together with Octave? They would never write this kind of code, but I agree that it should be possible to use this syntax. Ole