Re: Octave GUI API: Proposal.
Ole Jacob Hagen <[email protected]> Tue, 21 Dec 2004 22:41:50 +0100
| Newsgroups | gmane.comp.gnu.octave.graphics |
|---|---|
| Message-ID | <[email protected]> |
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