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 FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich 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 File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by muhali (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to 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 UTCmtmillerCategoryNone=>Octave Function
      Item GroupNone=>Incorrect Result
      Operating SystemGNU/Linux=>Any
    Sun 13 Jan 2013 09:08:48 PM UTCpantxoAttached File-=>Added struct2hdl_diff.patch, #27255
    Wed 09 Jan 2013 06:04:12 PM UTCrik5Summarystruct2hdl error=>struct2hdl error when struct has 'uicontrol' object
    Wed 09 Jan 2013 06:03:43 PM UTCrik5StatusNone=>Confirmed
    Wed 09 Jan 2013 01:54:48 PM UTCmuhaliAttached File-=>Added foo.ot, #27228

    Back to the top


    Powered by Savane 3.1-cleanup