X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 30 Dec 2015 11:56 AM by  anon
object method as function_name
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:2
New Member


--
30 Dec 2015 11:56 AM
    Is it possible to pass an object method in as a function_name in, for example, curvefit? I have an obj and would like a method that does a curvefit. curvefit isn't liking a function named 'self.someMethodName'. It if undefined. Curvefit has no knowledge of self (that is is called within an object class definition). Yes I am new to oop. Does what I am trying to do make any sense? It would nice to have all the obj properties available with the method used by curvefit, to avoid all the _extra and common block stuff.

    Zachary Norman



    Basic Member


    Posts:173
    Basic Member


    --
    05 Jan 2016 10:37 AM
    Hi Stephane, Do you think that you could provide an example about what you are wanting to do? I'm a little confused by the way your question is worded because curvefit is not an object, nor does it use object methods. Curvefit is entirely written in .pro code and you can view the contents from the IDL Workbench by typing ".edit curevefit" into the IDL Console. Are you using a different version of curvefit that does not ship with IDL? If so, you may want to contact the creator of the program. -Zach (VIS)

    Deleted User



    New Member


    Posts:2
    New Member


    --
    05 Jan 2016 01:41 PM
    Thanks for the reply. I was hoping an object method could call IDLs curvefit with the fit function that is another method of the obj. Not doable right? Seems I can't use curvefit(... function_name=self.model...). I've gotten around this by resorting to common block.
    You are not authorized to post a reply.