help-octave
[Top][All Lists]
Advanced

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

isprop and ismethod for User Class


From: Lau2019
Subject: isprop and ismethod for User Class
Date: Sat, 28 Sep 2019 21:09:58 -0500 (CDT)

Hello,

I tried to used "isprop" and "ismethod" for an user defined class, but they
didn't work. 

Example:
%-------------------------------------------------------
% Class file
classdef myclass 
    properties
        ID
    end
    methods
        function obj = myclass()
        end
        function  Add(obj, ID)
        end
    end
end

%-------------------------------------------------------
% main program
c = myclass()
isprop(c, 'ID')
ismethod(c, 'Add')

%-------------------------------------------------------
% Command window
c =



ans = 0
ans = 0

%-------------------------------------------------------

The answer is always false. But this code works in Matlab, that returns
true.

Do you know if the current implementation of "isprop" and "ismethod" can
only work with graphics objects ? 

Thanks in advance

Lau2019







--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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