bugGNU Octave - Bugs: bug #29456, class() should work for any method

 
 

bug #29456: class() should work for any method

Submitted by:  Judd Storrs <judd>
Submitted on:  Tue 06 Apr 2010 07:40:27 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 07 Apr 2010 05:39:12 PM UTC, comment #4:

I have never seen the "bless" feature that you described. Where is it documented? If that is something that Octave should also have, then please open another bug report (as a feature request) and give a pointer to some documentation for the feature.

John W. Eaton <jwe>
Project Administrator
Wed 07 Apr 2010 05:19:06 PM UTC, comment #3:

The code that I stumbled over this in appears to be going about subsref-ing a structure array in a strange way that sort of looks like it should be easier to do. Probably this code represents a kludge around limitations of an older Matlab release. Matlab's current error codes indicate that class() can only be used in a constructor.

Please close this bug report with "won't fix".

Judd Storrs <judd>
Wed 07 Apr 2010 03:31:35 AM UTC, comment #2:

Sorry, that was meant for bug 29447.

Judd Storrs <judd>
Wed 07 Apr 2010 03:29:36 AM UTC, comment #1:

Here's another patch that improves on the earliest one. Instead of returning a string it returns an invalid handle. I think the behavior is much better:

Judd Storrs <judd>
Tue 06 Apr 2010 07:40:27 PM UTC, original submission:

Octave prevents use of class() outside the constructor, however Matlab appears to allow class() inside any method.

Consider:

Matlab allows bless to convert any structure with the correct fields into a foo-object.

Octave refuses to allow class() outside of @foo/foo:

Judd Storrs <judd>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by judd (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 07 Apr 2010 05:39:12 PM UTCjweStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1