[Ironruby-core] Hiccup with WPF/Button events

Frank Aurich lists at ruby-forum.com
Mon Oct 29 09:02:54 EDT 2007


Curt Hagenlocher wrote:
> 
> In RubyActionBinder.HookEvent is the following code:
> 
> rule.SetTarget(rule.MakeReturn(wiringContext.LanguageContext.Binder,
>     Ast.SimpleCallHelper(rule.Parameters[0], addMethod,
> Ast.CodeBlockReference(handler, eventInfo.EventHandlerType))));
> 
> The rule is subsequently cached so that all handlers added to
> System.Windows.Controls.Button.Click will get the same rule.  The rule 
> is
> only parameterized by target event -- not by code block -- which means 
> that
> subsequent code generation results in the same code block getting 
> attached
> to the event.

But how come it works in the interactive console but not when executed 
from a file?
-- 
Posted via http://www.ruby-forum.com/.


More information about the Ironruby-core mailing list