bugGNU Octave - Bugs: bug #48682, print_usage fails within classdef...

 
 

bug #48682: print_usage fails within classdef block

Submitted by:  Colin Macdonald <cbm>
Submitted on:  Tue 02 Aug 2016 10:05:20 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 11 Aug 2016 05:51:44 AM UTC, comment #3:

See bug #43047 for the original bug about the help function (and get_help_text) not working on classdef classes or methods.

Once we get help and get_help_text working on classdef symbols, then print_usage will probably be fairly easy.

Mike Miller <mtmiller>
Project Administrator
Thu 11 Aug 2016 05:46:34 AM UTC, comment #2:

Additionally we may need to update the function 'get_help_text' defined in C++ 'src/help.cc' to handle the parsing of the classdef objects.

http://hg.savannah.gnu.org/hgweb/octave/rev/91ccd08fe80c

Looks like some work to be done!

Muthu A <muthua>
Thu 11 Aug 2016 05:25:50 AM UTC, comment #1:

Looking at the code,
http://hg.savannah.gnu.org/hgweb/octave/file/ffad2baa90f7/scripts/help/print_usage.m

we see there is a branch where fullname is not defined and the class method takes it.

We should probably update the print_usage function.

Muthu A <muthua>
Tue 02 Aug 2016 10:05:20 PM UTC, original submission:

Suppose I have a classdef block which defines a "myclass", which defines a "length" method. If I call "print_usage" from within "length", it fails. For example:

length(L, 2)
error: 'fullname' undefined near line 55 column 33
error: called from
    print_usage at line 55 column 16
    length at line 168 column 5

On the other hand, methods of the class defined in external .m files (e.g., in "@myclass/foo.m" rather than within the classdef block) can successfully call print_usage.

I can cook up a minimal nonworking example if needed.

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 mtmiller (Posted a comment)
  • -email is unavailable- added by muthua (Posted a comment)
  • -email is unavailable- added by cbm (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-11 mtmiller CategoryInterpreter => Octave Function
        StatusNone => Confirmed
        Dependencies- => Depends on bugs #43047

    Back to the top


    Powered by Savane 3.4