[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always re
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false |
Date: |
Mon, 18 Feb 2019 15:05:19 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #6, bug #55487 (project octave):
Looks like the comment was cut off because the verbatim tag was misspelled.
In any case, I tried in Matlab and methods() returns only the function name.
It does not return the output type, nor does it include the extra parentheses
'()'.
Either we change how methods() returns data from Java objects, or if we like
the extra verbosity about the function, then we have to change ismethod to
possibly use a regular expression to remove extraneous information.
This regexp would work
mtd = regexprep (methods (x), '^(?:[^ ]+ )+(\w+)\(.*$', '$1')
Of course, this leaves duplicates in the list of methods. But that doesn't
really matter because you could then use
retval = any (strcmp (method, method_list));
rather than
retval = ismember (method, method_list);
This will probably be faster because ismember is rather slow.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55487>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, Rik, 2019/02/17
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, John W. Eaton, 2019/02/18
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, John W. Eaton, 2019/02/18
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, Rik, 2019/02/18
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, John W. Eaton, 2019/02/18
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false,
Rik <=
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, John W. Eaton, 2019/02/18
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, Rik, 2019/02/18
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, Mike Miller, 2019/02/21
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, John W. Eaton, 2019/02/21
- [Octave-bug-tracker] [bug #55487] ismethod of custom classdefs always returning false, Rik, 2019/02/21