| Summary: | Octave output is not parsed correctly | ||
|---|---|---|---|
| Product: | [Applications] cantor | Reporter: | Alexander Semke <alexander.semke> |
| Component: | octave-backend | Assignee: | Filipe Saraiva <filipe> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | alexanderrieder, filipe |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | All | ||
| Latest Commit: | https://commits.kde.org/cantor/1a0043d3ddf905f54f8e706d2f793d55f034e3d5 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Alexander Semke
2016-05-26 18:54:39 UTC
This behaviour is caused by changes in Octave output. Cantor fills the variable management widget using the Octave outputs in OctaveExpression::finalize function. When you type for instance 'x = 2', the output is 'x = 2\n' so the current logic in that Cantor function can get the variable and the value. But the command for creation of a vector, like 'x = [1 2 3]' the output is 'x=\n\n1 2 3\n\n', it is different from the previous pattern of Octave outputs. This bug is related with #363445. I am thinking in a new way to get the variables correctly. would a simple replacing of all occurrences of '\n' with '' and doing the extraction of the variable value after that help here? (In reply to Alexander Semke from comment #2) > would a simple replacing of all occurrences of '\n' with '' and doing the > extraction of the variable value after that help here? Yes, it fix this bug but not the #363445 bug. I am thinking in a way to solve both, if it not possible for the moment maybe I can to use the replacement of '\n'. Git commit 1a0043d3ddf905f54f8e706d2f793d55f034e3d5 by Filipe Saraiva. Committed on 28/01/2017 at 14:05. Pushed by filipesaraiva into branch 'master'. Parse correctly the vector/list output of Octave backend to variable management widget M +1 -1 src/backends/octave/octaveexpression.cpp https://commits.kde.org/cantor/1a0043d3ddf905f54f8e706d2f793d55f034e3d5 Hi asemke, I am using the workaround to fix it. Unfortunately it will be very hard to fix this bug together with bug #363445. Please, if you find some errors with this approach reopen this bug report. |