get_help_text() function problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

get_help_text() function problem

Bill Greene-3
If I create MyClass.m with the following content:

##
## myclass:  do something
##

classdef MyClass
## methods
end

and then run

[t,f]=get_help_text('MyClass')

I get the results

t =
f = Not documented

I've tried to look at other classdef examples from Octave but don't see how to fix this.
Can someone help me?


Reply | Threaded
Open this post in threaded view
|

Re: get_help_text() function problem

mmuetzel
Am 20. Mai 2021 um 19:58 Uhr schrieb "Bill Greene":

> If I create MyClass.m with the following content:
>  ##
> ## myclass:  do something
> ##
>
> classdef MyClass
> ## methods
> end

> and then run

> [t,f]=get_help_text('MyClass')

> I get the results

> t =
> f = Not documented

> I've tried to look at other classdef examples from Octave but don't see how to fix this.
> Can someone help me?

Which version of Octave are you using?
I haven't tested myself. But reading this bug report, it might be working in Octave 6:
https://savannah.gnu.org/bugs/?43047

Markus



Reply | Threaded
Open this post in threaded view
|

Re: get_help_text() function problem

Bill Greene-3
I am running Octave 6.2.0.

Running
help inputParser
works for me. But that class is so much more complicated than my simple 
example that I can't determine what the significant difference is.

On Fri, May 21, 2021 at 2:22 AM Markus Mützel <[hidden email]> wrote:
Am 20. Mai 2021 um 19:58 Uhr schrieb "Bill Greene":
> If I create MyClass.m with the following content:
>  ##
> ## myclass:  do something
> ##
>
> classdef MyClass
> ## methods
> end

> and then run

> [t,f]=get_help_text('MyClass')

> I get the results

> t =
> f = Not documented

> I've tried to look at other classdef examples from Octave but don't see how to fix this.
> Can someone help me?

Which version of Octave are you using?
I haven't tested myself. But reading this bug report, it might be working in Octave 6:
https://savannah.gnu.org/bugs/?43047

Markus



Reply | Threaded
Open this post in threaded view
|

Re: get_help_text() function problem

mmuetzel
Am 21. Mai 2021 um 12:37 Uhr schrieb "Bill Greene":
> I am running Octave 6.2.0.

> Running
> help inputParser
> works for me. But that class is so much more complicated than my simple 
> example that I can't determine what the significant difference is. 

It works for me if the classdef has at least one methods block and the first documentation line is non-empty:

## some comment

classdef MyClass

  ## myclass:  do something
  ##

  methods
  endmethods

endclassdef


In Octave 6.2.0:

>> help MyClass

'MyClass' is a built-in function

 myclass:  do something

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 [hidden email]
mailing list.


There is already an open report about classdef classes being erroneously classified as "built-in function":
https://savannah.gnu.org/bugs/index.php?49434

HTH,
Markus