bugGNU Octave - Bugs: bug #38046, struct2hdl error when struct has...


bug #38046: struct2hdl error when struct has 'uicontrol' object

Submitted by:  Muhali <muhali>
Submitted on:  Wed 09 Jan 2013 01:54:48 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.


Mon 14 Jan 2013 04:38:11 PM UTC, comment #3:

Generating an error seems like a good intermediate step until we have full support so I pushed the changeset here (http://hg.savannah.gnu.org/hgweb/octave/rev/8135bce0812a).

Rik <rik5>
Project Administrator
Sun 13 Jan 2013 09:08:48 PM UTC, comment #2:

Indeed uicontrols are not supported and I had not noticed those objects where implemented.

For ui related objects my approach has been to not store theim in the structure (see "uimenu" in hdl2struct), until QtHandle or any "ui"aware backend is added to the hg source tree, as I don't have any mean to actually test the code.

On the other hand implementing (fake) support for objects that are already implemented would not be a huge work has Rik stated.
What do you think?

I have attached a minimal patch: struct2hdl sends an error if the requested object is not implemented.

(file #27255)

Pantxo Diribarne <pantxo>
Project Member
Wed 09 Jan 2013 06:03:43 PM UTC, comment #1:

The issue is that your figure had an object of type "uicontrol" which currently isn't supported by struct2hdl.

The code to modify begins at line 114 of struct2hdl where there is a large if/elsif/elsif/endif tree for each type of object. It seems like a branch needs to be added for "uicontrol" and then a new subfunction createuicontrol() added. There are examples of other createXXXX functions in struct2hdl so it shouldn't be too difficult.

Rik <rik5>
Project Administrator
Wed 09 Jan 2013 01:54:48 PM UTC, original submission:

Using hdl2struct I have created a structure s so that the following produces an eror:

error: 'h' undefined near line 143 column 20
error: called from:
error: /usr/local/octave-dev/share/octave/3.7.0+/m/plot/struct2hdl.m at line 143, column 3
error: /usr/local/octave-dev/share/octave/3.7.0+/m/plot/struct2hdl.m at line 150, column 16

foo.ot is attached.

I use a fairly recent dev version of octave (Dec. 12, 2c6b00c03329)

Muhali <muhali>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #27255:  struct2hdl_diff.patch added by pantxo (706B - text/x-patch)
file #27228:  foo.ot added by muhali (39KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by muhali (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.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Sun 19 Jan 2014 07:27:52 PM UTC mtmiller CategoryNone => Octave Function
        Item GroupNone => Incorrect Result
        Operating SystemGNU/Linux => Any
    Sun 13 Jan 2013 09:08:48 PM UTC pantxo Attached File- => Added struct2hdl_diff.patch, #27255
    Wed 09 Jan 2013 06:04:12 PM UTC rik5 Summarystruct2hdl error => struct2hdl error when struct has 'uicontrol' object
    Wed 09 Jan 2013 06:03:43 PM UTC rik5 StatusNone => Confirmed
    Wed 09 Jan 2013 01:54:48 PM UTC muhali Attached File- => Added foo.ot, #27228

    Back to the top

    Powered by Savane 3.3