bugGNU Octave - Bugs: bug #62804, "help class.method"...

 
 

bug #62804: "help class.method" cannot access old-style class methods

Submitter:  Colin Macdonald <cbm>
Submitted:  Sun 24 Jul 2022 04:49:23 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 09 Feb 2024 07:03:17 PM UTC, comment #7: 

I think this shows the same behavior as the earlier bug #61521.

Rik <rik5>
Group administrator
Thu 08 Feb 2024 08:42:51 PM UTC, comment #6: 

using the recent octave 9 RC1 on the same files:

classdef:

>> help foobar_class.meth
'foobar_class.meth' is a function from the file <path>/foobar_class.m

 comment inside method


Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at https://www.octave.org and via the help@octave.org
mailing list.
>> help foobar_class/meth
error: help: 'foobar_class/meth' not found
>> help @foobar_class/meth
error: help: '@foobar_class/meth' not found



嘈 >> help foobar_class_old.disp
error: help: 'foobar_class_old.disp' not found
>> help foobar_class_old/disp
error: help: 'foobar_class_old/disp' not found
>> help @foobar_class_old/disp
'@foobar_class_old/disp' is a function from the file C:\Users\nicholas.jankowski\Desktop\workingfiles\matlab\@foobar_cl
ass_old\disp.m

 foobar disp fn above


Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at https://www.octave.org and via the help@octave.org
mailing list.
>>


Nicholas Jankowski <nrjank>
Group Member
Thu 08 Feb 2024 08:37:29 PM UTC, comment #5: 

matlab 2023b.  using the test classdef we made for testing help with various help locations:


> help foobar_class.meth
  comment inside method

>> help @foobar_class/meth
@foobar_class/meth not found.

    Search the documentation for @foobar_class/meth

>> help foobar_class/meth
  comment inside method


testing with an old style class and dropping a disp method in there:


>> help foobar_class_old.disp
  foobar disp fn above

>> help foobar_class_old/disp
  foobar disp fn above

>> help @foobar_class_old/disp
  foobar disp fn above


Nicholas Jankowski <nrjank>
Group Member
Thu 08 Feb 2024 08:14:57 PM UTC, comment #4: 

What does modern Matlab do?  Does it still accept the @classname/methodname syntax for old-style classes and also accept classnmae.methodname?  Do both also work for classdef classes?

John W. Eaton <jwe>
Group administrator
Sun 24 Jul 2022 05:34:48 AM UTC, comment #3: 

Also related: bug #55890.

Colin Macdonald <cbm>
Sun 24 Jul 2022 05:00:31 AM UTC, comment #2: 

Perhaps is a dupe of bug #61521

Colin Macdonald <cbm>
Sun 24 Jul 2022 04:53:04 AM UTC, comment #1: 

Forgot to mention, same results with 6.4.0, 7.1.0 and tip.

Colin Macdonald <cbm>
Sun 24 Jul 2022 04:49:23 AM UTC, original submission:  

"help class.method" works nicely with classdef but not well with old-style classes.

This can be tested with the Symbolic package (which uses only old-style classes for now) where "help @sym/isNone" shows the right thing but "help sym.isNone" just shows the same as "help sym".

If helpful, I can make a MWE.

- - - -

There are some other strange cases: e.g., "help sym.symvar" shows the same thing as "help symvar", it even says:


'sym.symvar' is a function from the file /home/cbm/.octavehg/share/octave/8.0.0/m/miscellaneous/symvar.m

...


I've been happy using "@class/method" but there are various problems with this syntax in the classdef context such as bug #48041.  But its hard to switch if one has to use different syntaxes for old-style or classdef classes (users should not need to be aware of which is which).  There is also a matlab compatibility argument for supporting the dotted notation.

Colin Macdonald <cbm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by cbm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-09 rik5 Item GroupFeature Request Matlab Compatibility
        StatusNone Duplicate
    2024-02-08 jwe Item GroupMatlab Compatibility Feature Request
    2024-02-08 rik5 Dependencies- Depends on bugs #61521

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code