bugGNU Octave - Bugs: bug #62669, inputParser using...

 
 

bug #62669: inputParser using validateattributes during addParameter

Submitter:  None
Submitted:  Thu 23 Jun 2022 09:31:02 PM UTC
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Duplicate Assigned to:  None
Originator Name:  tsf-solutions Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.1.0
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Mon 27 Jun 2022 06:23:31 AM UTC, comment #1: 

Closing as duplicate of bug #62420.

This should already be fixed for Octave 7.2.

Could you please check with the release candidate whether that will work correctly for you now? You could download a Windows installer of the release candidate from here:
https://alpha.gnu.org/gnu/octave/?C=M;O=D

Markus M├╝tzel <mmuetzel>
Project Member
Thu 23 Jun 2022 09:31:02 PM UTC, original submission:  

Using validateattributes as validator for addParameter of inputParser has no return value, so the validate_arg method fails during executing the if(! val(in)) line in "./Octave-7.1.0/mingw64/share/octave/7.1.0/m/miscellaneous/inputParser.m"

My solution:

<<< original <<<<<<<<<<<<<<<<<<<<
    function validate_arg (this, name, val, in)

      if (! val (in))
        this.error (sprintf ("failed validation of %s with %s",
                             toupper (name), func2str (val)));
      endif
      this.Results.(name) = in;

    endfunction

>>>>> mod >>>>>>>>>>>>>

    function validate_arg (this, name, val, in)

       try
         val (in);
       catch
         val (in);
         if (! val (in))
           this.error (sprintf ("failed validation of %s with %s",
                       toupper (name), func2str (val)));
         endif
       end
       this.Results.(name) = in;

    endfunction

Anonymous

 

(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 mmuetzel (Posted a comment)
  •  

    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 project members can vote.

     

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-27 mmuetzel Dependencies- Depends on bugs #62420
    2022-06-27 mmuetzel CategoryNone Octave Function
        Item GroupMatlab Compatibility Unexpected Error or Warning
        StatusNone Duplicate
        Open/ClosedOpen Closed
        Release7.1.90 7.1.0
        Operating SystemMicrosoft Windows Any

    Back to the top


    Powered by Savane 3.9