bugGNU Octave - Bugs: bug #46659, classdef: cannot create handles to...

 
 

bug #46659: classdef: cannot create handles to functions in +package

Submitter:  Richard <crobar>
Submitted:  Thu 10 Dec 2015 04:31:59 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Richard Crozier Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 26 Feb 2019 06:06:39 AM UTC, comment #3: 

This works now with containers.Map:


>> fn = @containers.Map;
>> m = fn ();
>> class (m)
ans = containers.Map


Mike Miller <mtmiller>
Group Member
Tue 26 Feb 2019 04:18:00 AM UTC, comment #2: 

My recent changes to the parser seem to have fixed this problem.  Could you test and see if there are any remaining issues that are not covered by other bug reports?

I think the fix is this changeset

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

which I made while working on bug #51709.

John W. Eaton <jwe>
Group administrator
Wed 06 Jan 2016 10:22:47 AM UTC, comment #1: 

Incidentally a partial workaround in Octave is to do:


fcnhandle = str2func ("mypackage.afcn")


which works fine.

Richard <crobar>
Thu 10 Dec 2015 04:31:59 PM UTC, original submission:  


In Matlab you can create a handle to a function in a package (i.e. in a +package directory), like so:


fcnhandle = @mypackage.afcn


If I try the same in Octave I get an error like:


error: function handle cannot be indexed with .


Richard <crobar>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by amro_octave
  • -email is unavailable- added by crobar (Submitted the item)
  •  

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

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 mtmiller StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-02-26 mtmiller Carbon-CopyRemoved 80942 -
    2019-02-26 jwe StatusConfirmed Ready For Test
    2016-12-09 amro_octave Carbon-Copy- Added amro_octave
    2016-06-02 mtmiller StatusNone Confirmed
        SummaryCannot create handles to functions in +package classdef: cannot create handles to functions in +package

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code