This works for me: import System callable IntCallable(i as int)
def Foo(f as IntCallable): f(2) Foo do(i): print i On Mon, Jun 22, 2009 at 9:24 PM, Craig Neuwirt <[email protected]> wrote: > I am trying to use anonymous delegates in a binsor file, but I can only > seem to get it to work for delegates with a singe statements, but I need to > define multiple statements. > > e.g. Assume SomeMethod accepts an Action<Something> > > In my binsor I can do this > > SomeMethod( {s | s.Hello()} ) > > but how do I define the anonymous delegate with multple statements? > > I tried > > SomeMethod( do(s) : > s.Hello() > s.GoodBye() > ) > > And > > SomeMethod() do(s): > s.Hello() > s.Goodbye() > > but neither works > > Any ideas? > > thanks, > craig > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rhino-tools-dev?hl=en -~----------~----~----~----~------~----~------~--~---
