octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always re


From: Markus Ebner
Subject: [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false
Date: Wed, 16 Jan 2019 05:01:19 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

URL:
  <https://savannah.gnu.org/bugs/?55487>

                 Summary: ismethod of custom classdefs always returning false
                 Project: GNU Octave
            Submitted by: seijikun
            Submitted on: Wed 16 Jan 2019 10:01:17 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Having the following classdef in file testclass.m:


classdef testclass
        properties
                testnumber = 0;
        endproperties
        
        methods
                function p = testclass()
                        p.testnumber = 1337;
                endfunction
                
                function result = getNumber(obj)
                        result = obj.testnumber;
                endfunction
        endmethods
endclassdef


The ismethod() function (if I understood it correctly from the matlab
documentation) should return true, if the class or object given as first
parameter has a public method with the name given as second parameter. So the
following calls to ismethod should return true:


testinstance = testclass();
ismethod(testinstance, 'getNumber')
ismethod('testclass', 'getNumber')


But they return false.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55487>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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