Hi Curt! Unfortunatelly it does not work. The error returned is the same. :(
2008/11/26 Curt Hagenlocher <[EMAIL PROTECTED]>: > For the first problem, does it work if you just use "super" without any > arguments? > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dudu Baião > Sent: Tuesday, November 25, 2008 6:26 PM > To: ironruby-core@rubyforge.org > Subject: [Ironruby-core] IronRuby and XNA. Super and Generics > > Hi guys! > > Im playing with XNA trying to run the simplest xna example: To show a > SpriteBatch on screen. > > After some tests I found some problems: > > 1- The "Microsoft::Xna::Framework::Game" expects that we implement > some methods like "Update", "Drawn" etc, and inside the method we have > to call the base class (super) actual method passing some parameters. > > If I try to do this: > > def update(game_time) > super(game_time) > end > > I get this error: > > my_game.rb:23:in `update': wrong number or type of arguments for > `update' (ArgumentError) > from Snippets.scripting:0:in `Update' > from Microsoft.Xna.Framework.Game:0:in `Run' > from program.rb:23:in `main' > from :0 > > 2- XNA uses generic functions to load the game contents. How can I > convert the code above to IronRuby? > > // This is a texture we can render. > Texture2D myTexture; > > protected override void LoadContent() > { > myTexture = Content.Load<Texture2D>("mytexture"); > } > > Can IronRuby consume generics? > > Thanks! > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core