[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50756] display of objects in cell arrays and
From: |
Oliver Heimlich |
Subject: |
[Octave-bug-tracker] [bug #50756] display of objects in cell arrays and structs is suppressed |
Date: |
Sun, 18 Mar 2018 06:28:12 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #6, bug #50756 (project octave):
Yes, it is a regression. However, it never really worked. In previous versions
of Octave, during output of cell arrays the overridden “display” method
has been called. It was possible to find out that the content of a cell had to
be printed and the cell index had to be printed by the overridden
“display” method instead of the usual variable name.
For example:
https://sourceforge.net/p/octave/interval/ci/9526f0fb5f9ef5480bf595d8c4c7a9ee30a93b20/tree/inst/@infsup/display.m#l84
Also, the overridden “display” method had to indent the output, which was
impossible to do correctly for nested cell arrays, because the required
information was unaccessible (octave_value::current_print_indent_level).
>From the implementing class's point of view it would be the simplest solution
if the indentation could be done by the calling code. However, this is
probably difficult to do unless you intercept and redirect stdout.
A simpler solution probably is to use the overridden “disp” method, reduce
the terminal width for the duration of that call, and print the indented
result with indexes.
Can you check how it should be done to be Matlab compatible?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50756>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50756] display of objects in cell arrays and structs is suppressed,
Oliver Heimlich <=