[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45351] Handle to classdef method works in ML
From: |
Amro |
Subject: |
[Octave-bug-tracker] [bug #45351] Handle to classdef method works in ML but not Octave |
Date: |
Fri, 19 Jun 2015 09:20:18 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 |
Follow-up Comment #1, bug #45351 (project octave):
To add to the issue, replace:
self.hfoo = @foo;
with:
self.hfoo = @(self) self.foo();
or even:
self.hfoo = @(~) self.foo();
and you get the following error:
>> x.bar()
error: subsref: method `foo' has protected access and cannot be run in this
context
while both work in MATLAB... Here are some links to related documentation
where this is discussed:
*
http://www.mathworks.com/help/matlab/matlab_prog/creating-a-function-handle.html?refresh=true#bsh5da_-1
*
http://www.mathworks.com/help/matlab/matlab_oop/class-methods-for-graphics-callbacks.html
*
http://www.mathworks.com/help/matlab/matlab_oop/listener-callback-functions.html
----
By the way, I've been adding similar cases to this wiki page
<http://wiki.octave.org/Classdef>, I hope you guys keep track of it :)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45351>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/