Ed & Paul
I tried that, but since it wasn't on the form, but in one of my imported
files I used...
Myfunc=eval("function_name")
Myfunc(param1, param2, etc)
Thanks for the tips.
Larry
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Ed Leafe
> Sent: Thursday, August 06, 2009 5:43 PM
> To: Dabo Users list
> Subject: Re: [dabo-users] Need a reminder on how to call a
> functiondynamically
>
> On Aug 6, 2009, at 1:44 PM, Paul McNett wrote:
>
> >> I have a list with a function's name and its
> >> parameters...['func_name','param1','param2',...]
> >
> > Keep a list with the function's object reference, and tuples of args
> > instead:
>
>
> If you can't keep a function reference, and only have
> the name, if that function is an instance method of object
> 'obj', you can invoke it by the following:
>
> getattr(obj, 'func_name').(param1, param2)
>
>
> -- Ed Leafe
>
>
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/!~!uenerkvcmdkaaqacaaaaaaaaaaaaaaaaabgaaaaaaaaaafa2fnyupuomnfpiynbeqckaaaaqaaaajdwelhkonkc1tqgmjaypwgeaa...@charter.net