Re: [Ironruby-core] ScriptScope.SetVariable - pass in a function

2008-11-15 Thread Jim Deville
Correction: Methods are first-class, they just can't be invoked from their objects with (). JD -Original Message- From: Tomas Matousek <[EMAIL PROTECTED]> Sent: November 15, 2008 6:11 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] ScriptScope.SetVariable - pass in a fun

Re: [Ironruby-core] ScriptScope.SetVariable - pass in a function

2008-11-15 Thread Tomas Matousek
Try my_function.invoke('hello!'). Ruby doesn't have first class methods. For convenience we can monkey-patch Delegate to mimic procs (add [], call methods). Tomas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin van der Veen Sent: Saturday, Nove

[Ironruby-core] ScriptScope.SetVariable - pass in a function

2008-11-15 Thread Benjamin van der Veen
Hi, I'd like do something like this: public void AddFunction() { aScriptScope.SetVariable("my_function", (Action)MyFunction); } public void MyFunction(string value) { // do stuff! } Currently if I execute a script like "my_function 'hello!'" or "my_function('hello!')" I get: ArgumentEx

Re: [Ironruby-core] StackOverflowException when accessing o bject properties

2008-11-15 Thread Benjamin van der Veen
Tomas Matousek wrote: > Isn't the class internal? (We should improve error reporting related to > visibility) > Try to make it public. Public fields should be accessible in the same > way properties are. > > Tomas Yep, that was the problem. Declared it public and it works now. Thanks, benjamin

Re: [Ironruby-core] StackOverflowException when accessing object properties

2008-11-15 Thread Tomas Matousek
Isn't the class internal? (We should improve error reporting related to visibility) Try to make it public. Public fields should be accessible in the same way properties are. Tomas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin van der Veen Se

Re: [Ironruby-core] Executables

2008-11-15 Thread Jim Deville
We'll have both types of interactive tests eventually. -Original Message- From: Michael Letterle <[EMAIL PROTECTED]> Sent: November 15, 2008 2:55 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Executables If people are going to be using irb, you might ;) Anyway, I sup

Re: [Ironruby-core] Executables

2008-11-15 Thread Michael Letterle
If people are going to be using irb, you might ;) Anyway, I suppose that makes sense On Sat, Nov 15, 2008 at 5:44 PM, Curt Hagenlocher <[EMAIL PROTECTED]>wrote: > We don't want our interop tests to be testing irb.rb though. :) > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On B

Re: [Ironruby-core] Executables

2008-11-15 Thread Curt Hagenlocher
We don't want our interop tests to be testing irb.rb though. :) From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Letterle Sent: Friday, November 14, 2008 6:18 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Executables ? interop works through IRB just as well

Re: [Ironruby-core] StackOverflowException when accessing object properties

2008-11-15 Thread Benjamin van der Veen
Hello Andrew, Andrew Peters wrote: > I think this is because you need to reference the IronRuby.Libraries > dll. > Strange error I know. > > On Sat, Nov 15, 2008 at 7:33 PM, Benjamin Van der veen > <[EMAIL PROTECTED] Ah, yes, this fixed the stack overflow error. Strange indeed—thanks for the