Teaser - MonoDroid with Oxygene
Now that the MonoDroid preview is out, I thought I’d experiment a little with Oxygene (aka Delphi Prism), so I ported the “Button” sample to Oxygene. Here’s a taste of what I came up with:
method Activity1.OnCreate(bundle : Bundle);begininherited OnCreate(bundle); // Create your application herevar button :=new Button(self); button.Text:='Oxygene Says: Click Me!'; button.Click+=methodbegin button.Text:= string.Format('{0} clicks!', count);inc(count);end; SetContentView(button);end; |
Obviously, this won’t be in the build that we RTM’ed last week, and will soon be available from our friends at Embarcadero, but it will work with said release. So if you’re a Delphi Prism customer, or just have a fondness for Pascal syntax, keep an eye out here – more info will be available soon, including templates & other support files.
method Activity1.OnCreate(bundle : Bundle);
begin
inherited OnCreate(bundle);// Create your application here
var button := new Button(self);
button.Text := ‘Oxygene Says: Click Me!’;
button.Click += method begin
button.Text := string.Format (‘{0} clicks!’, count);
inc(count);
end;
SetContentView (button);
end;