octave-maintainers
[Top][All Lists]
Advanced

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

Creating classdef method handles


From: Piotr Held
Subject: Creating classdef method handles
Date: Mon, 31 Jul 2017 09:22:27 -0700

Hello all!

I have created a bug report Bug #51586 that deals with creating a function handle to a classdef method.

Should this feature be supported? If yes, what should be the syntax?

In Octave 4.0.3 (and maybe later), the syntax str2func('@class/method') worked (there is some test code for this on the bug tracker). I submitted a one-line patch (also on bug tracker) that restores this functionality. This was possible due to the parsing already built into libinterp/octave-value/ov-fcn-handle.cc:make_fcn_handle(). Should that syntax be supported?
(Kai Torben Ohlhus thinks, for multiple valid reasons, that it should not, as he has stated on the bug tracker)

If not, should any syntax that creates method handles be supported?
(for instance 'fcn_handle = @method' placed within another method of the same class)

If not, then should the error message be different when trying to create a method handle and not include "no method found"? (please reference bug tracker for code example)

Piotr

reply via email to

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