Meinrad Recheis
2009-Feb-16 14:34 UTC
[Ironruby-core] problem with WPF animation.Duration= and TimeSpan
Hi all, Once again I am hitting some unexpected behavior in IronRuby. Might be a bug ;)>>> animation = System::Windows::Media::Animation::DoubleAnimation.new()=> #<System::Windows::Media::Animation::DoubleAnimation:0x000005c>>>> animation.Duration= System::Windows::Duration.new(System::TimeSpan.FromSeconds(2)) => #<System::Windows::Duration:0x000005e>>>> animation.Duration= System::Windows::Duration.Forever=> #<System::Windows::Duration:0x0000060> So far everything works as expected. Now trying to directly set a timespan which should be possible in C#:>>> animation.Duration= System::TimeSpan.FromSeconds(2):0: can''t convert System::TimeSpan into System::Windows::Duration (TypeError) ok, automatic conversion seems not yet to work here ... but the next thing is really strange:>>> animation.Duration= System::Windows::Duration.new(System::TimeSpan.FromSeconds(2)) :0: can''t convert System::TimeSpan into System::Windows::Duration (TypeError)>>> animation.Duration= System::Windows::Duration.Forever:0: can''t convert System::TimeSpan into System::Windows::Duration (TypeError)>>> ???What has already worked now doesn''t any more, depending on the value that has been set before. You will probably know what is going on. Cheers, -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090216/54888b76/attachment-0001.html>
Jimmy Schementi
2009-Feb-16 23:19 UTC
[Ironruby-core] problem with WPF animation.Duration= and TimeSpan
Crazy. I''ve opened a bug: http://rubyforge.org/tracker/index.php?func=detail&aid=23953&group_id=4359&atid=16798 ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Meinrad Recheis Sent: Monday, February 16, 2009 6:34 AM To: ironruby-core Subject: [Ironruby-core] problem with WPF animation.Duration= and TimeSpan Hi all, Once again I am hitting some unexpected behavior in IronRuby. Might be a bug ;)>>> animation = System::Windows::Media::Animation::DoubleAnimation.new()=> #<System::Windows::Media::Animation::DoubleAnimation:0x000005c>>>> animation.Duration= System::Windows::Duration.new( System::TimeSpan.FromSeconds(2))=> #<System::Windows::Duration:0x000005e>>>> animation.Duration= System::Windows::Duration.Forever=> #<System::Windows::Duration:0x0000060> So far everything works as expected. Now trying to directly set a timespan which should be possible in C#:>>> animation.Duration= System::TimeSpan.FromSeconds(2):0: can''t convert System::TimeSpan into System::Windows::Duration (TypeError) ok, automatic conversion seems not yet to work here ... but the next thing is really strange:>>> animation.Duration= System::Windows::Duration.new( System::TimeSpan.FromSeconds(2)):0: can''t convert System::TimeSpan into System::Windows::Duration (TypeError)>>> animation.Duration= System::Windows::Duration.Forever:0: can''t convert System::TimeSpan into System::Windows::Duration (TypeError)>>> ???What has already worked now doesn''t any more, depending on the value that has been set before. You will probably know what is going on. Cheers, -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090216/5a08c577/attachment-0001.html>