octave-maintainers
[Top][All Lists]
Advanced

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

Re: Class method access control lists


From: Richard Crozier
Subject: Re: Class method access control lists
Date: Tue, 10 Apr 2018 08:06:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0



On 08/04/18 08:15, Mike Miller wrote:
On Tue, Apr 03, 2018 at 12:32:10 +0100, Richard Crozier wrote:
Matlab supports restricting classdef classes method access to a list of
other classes, see:

https://uk.mathworks.com/help/matlab/matlab_oop/selective-access-to-class-methods.html

In a (fairly old, 4.1.0+) dev version I am using this does not appear to be
present in Octave. I attach and example/test case. Should I submit a bug
report?

In the example, running test_octave_method_access_control.m should display
'Access granted' on the command line (and does so in Matlab R2016b). In
Octave it results in the error:

error: invalid property/method access in class `testMethodAccess1'

If you change the syntax from

     methods (Access = ?testMethodAccess2)

to

     methods (Access = {?testMethodAccess2})

then it works in Octave.

I think you should file a bug report for the missing Matlab
compatibility.


Thanks for explaining this, I'll file a bug for the minor incompatibility.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




reply via email to

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