octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45351] Handle to classdef method works in ML


From: Richard
Subject: [Octave-bug-tracker] [bug #45351] Handle to classdef method works in ML but not Octave
Date: Fri, 19 Jun 2015 07:47:13 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

URL:
  <http://savannah.gnu.org/bugs/?45351>

                 Summary: Handle to classdef method works in ML but not Octave
                 Project: GNU Octave
            Submitted by: crobar
            Submitted on: Fri 19 Jun 2015 07:47:12 GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Richard Crozier
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Any

    _______________________________________________________

Details:

I have attached a file containing a classdef class definition. In the
constructor, a handle is created to a method in the class, and it is then
called in another method.

This behaviour works in Matlab, but not in Octave

In matlab:


>> x = method_function_handle_test

x = 

  method_function_handle_test with no properties.

>> x.bar
hello!


In Octave:


>> x = method_function_handle_test
error: @foo: no function and no method found
error: called from
    method_function_handle_test at line 17 column 17
stopped in <****>/scratch/mfiles/octave_tests/method_function_handle_test.m at
line 17
17:       self.hfoo = @foo;


While I find this an odd way to do things I came across it in code in the
wild, so it's out there. 



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 19 Jun 2015 07:47:12 GMT  Name: method_function_handle_test.m  Size:
471B   By: crobar

<http://savannah.gnu.org/bugs/download.php?file_id=34258>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45351>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]