bugGNU Octave - Bugs: bug #33012, getappdata called before...

 
 

bug #33012: getappdata called before setappdata should not fail

Submitted by:  None
Submitted on:  Thu 07 Apr 2011 11:16:09 AM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: David BatemanOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.4.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 18 Apr 2011 01:20:12 AM UTC, comment #8:

I'm closing this. It can be reopened if needed.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 12 Apr 2011 11:02:42 PM UTC, comment #7:

I've pushed another changeset to the stable branch.

http://hg.savannah.gnu.org/hgweb/octave/rev/e12a7c0a1fc5

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 12 Apr 2011 03:29:23 PM UTC, comment #6:

Thanks David. I'll push a fix later today.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 12 Apr 2011 03:02:33 PM UTC, comment #5:

The getappdata function should also allow ta call with a single argument, returning the structure _appdata_ directly. So some code something like

if (nargin == 1 && ishandle (h))
if (isfield (get (h), "__appdata__"))
val = get(h, "__appdata__");
else
val = struct ();
endif
endif

at the start of getappdata is needed

D.

PS: Sorry still posting anonymously due to my dev machine being out of service (David Bateman)

Anonymous
Tue 12 Apr 2011 12:44:29 AM UTC, comment #4:

Should this patch be committed to stable as well?

... or maybe I should ask what the policy is going forward?

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Mon 11 Apr 2011 11:54:02 PM UTC, comment #3:

The patch for bug #33025 was applied on stable and merged to default. You should be okay to go ahead and commit your patch now.

Rik <rik5>
Project Administrator
Fri 08 Apr 2011 12:21:17 PM UTC, comment #2:

I've attached a patch. But it will not work correctly until the bug below is fixed.

https://savannah.gnu.org/bugs/?33025

(file #23137)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 07 Apr 2011 10:38:06 PM UTC, comment #1:

I'll push a fix shortly. I just need to confirm how multiple objects are supposed to be treated.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 07 Apr 2011 11:16:09 AM UTC, original submission:

In matlab the getappdata function can be called before setappdata and an empty matrix is returned. Octave's getappdata function should be modified accordingly. Either the call to get(h, "__appdata__") might be wrapped in an unwind_protect, or the presence of the property might be tested before it is used.

Sorry I can't fix this myself as I don't have access to my development machine at the moment.

D.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #23137:  changeset.patch added by bpabbott (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by None (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 18 Apr 2011 01:20:12 AM UTCbpabbottStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue 12 Apr 2011 11:02:55 PM UTCbpabbottStatusPatch Submitted=>Ready For Test
    Fri 08 Apr 2011 12:21:17 PM UTCbpabbottAttached File-=>Added changeset.patch, #23137
      StatusNone=>Patch Submitted
    Thu 07 Apr 2011 10:38:06 PM UTCbpabbottAssigned toNone=>bpabbott

    Back to the top


    Powered by Savane 3.1-cleanup1