You are browsing the archive for Windows.

Profile photo of marc

by marc

Announcing the Oxygene 6 “July 2013″ Update

July 30, 2013 in .NET, Cocoa, Cooper, Elements, iOS, Java, Nougat, Oxygene, Platforms, Visual Studio, Windows


Oxygene "July 2013"

We’re thrilled to inform you that the “July 2013″ update for Oxygene 6 is available now.

The team has been incredibly hard at work since we shipped Oxygene 6 in May, both on this update and on the next feature release coming up in August, and the “July 2013″ update brings with it a good ~140 fixes and improvements across all three editions and across the entire toolchain, from compiler to IDE.

Even though we consider this update a “bug-fix release”, we could not stop ourselves from including two major compiler/language enhancements, as well: On the Java/Android side, the Oxygene language has gained full support for unsigned integer types — a feature not available in the Java language and not officially supported by the Java Runtime, we know that a lot of you who use Oxygene on Java have been looking forward to this. On the Cocoa side, the compiler has been updated with support for Oxygene’s trademark Future Types (one of my favorite features), based on GCD under the hood.

With these two changes, we’re taking another big step towards bringing the Oxygene language closer together on all three platforms.

What’s Next?

We’ve also been busy at work for the upcoming 6.1 release (for which alpha/beta builds have been available for a while now) and beyond. Check out my blog post for more details and some hints at what is coming up. We’re very excited.

Prism

Embarcadero Prism customers, please note that the “July 2013″ release will be the last update made available to you under the Prism brand, and the last release to accept Embarcadero serial numbers.

Please make sure that you have your Prism XE3.2 serial number registered with us, so that we know about you and can contact you about moving forward. As mentioned in the past, we will honor existing SA agreements you may have with Embarcadero beyond July – but we can only do that if we know who you are ;).

As always, if you have any questions or concerns at all, please contact us at sales@remobjects.com.

Yours,
marc hoffman
Chief Architect

Profile photo of marc

by marc

…then i might as well learn Java?

April 23, 2013 in .NET, Cocoa, Delphi, Elements, iOS, Java, Windows

One of the most frequent comments i hear when people dismiss or decide against considering Oxygene as their development tool of choice goes along the lines of the title of this blog post:

“With Oxygene i need to learn all the new platform APIs. If that’s the case, i might as well learn C# [or Java or Objective-C].”

That’s certainly true. When moving to and learning a new platform, there’s a vast number of things to learn — new classes, new APIs, new concepts, new ways of doing things. Learning a new language, especially if it’s one from the same broader family of languages you already know (i.e. Object Oriented languages) is only a small and insignificant part of that.

But, i think it is missing the point of Oxygene, to think its whole reason d’être is to save you from learning a new language. Quite the contrary.

Oxygene is based on Object Pascal, and is, at its root, very close to the “Delphi” language (which basically represents the state-of-the-art of Object Pascal ca. 2003). The main reason for that is not that Delphi developers (which the creators of Oxygene were too, at the time) do not have to learn a new language. The reason for that is that Pascal — as much as it has gone out of fashion over the past 20 or so years — is a freaking amazing base point for a programming language. It’s clean, well structured, easy to learn, and — very importantly — easy to read.

Many developers underestimate this, but they spend a lot more time re-eading their (and other’s) code than they originally spent writing it — so having a language that makes code easy to parse and understand by the human brain is a very important and undervalued feature of a language. One that Oxygene shines at like no other.

So that’s the why Oxygene is what it is, but is that enough reason to choose it over C#, Java or even Objective-C? No, of course not.

The biggest selling point for Oxygene in my opinion is not that it’s Pascal based, and is not that is allows you to natively compile for today’s three major platforms (.NET, Java and Cocoa) with the same code base, and it most certainly not that it saves you from doing anything (be it learning a new language, or be it spending more money on a more expensive development tool).

The biggest selling point of Oxygene is — quite frankly — that it is an amazing modern language, with features that developers using the other mainstream languages don’t even begin to dream about.

Going into details on all the features that make Oxygene unique and powerful, the features that will change your life as a developer, would require several posts on its own. But the scope ranges from Class Contracts to language-integrated parallelism, from nullable types to the amazing Future types, from small but powerful things like the colon operator and double boolean comparisons to “for” loop expressions (not to be confused with regular “for” loops), and from duck typing to language-native tuples.

The list could keep going on.

So when you’re looking at Oxygene (and i know you are), don’t just look at it from the perspective that it will let you keep coding in Pascal without having to learn a new language. Sure, that’s a big factor too. If you’re a Delphi developer, you probably love Pascal (like we do), and have been using it for the past 10, 20 or even more years. And being Pascal certainly is one thing that makes Oxygene attractive to you.

But don’t stop there; you’re doing Oxygene and yourself an injustice, if you look at that as the main benefit.

Instead, think of using Oxygene as switching to the most powerful and modern object oriented language out there, today. That it’s Pascal-based is just the icing on an already very delicious cake.

Oxygene on the Big Screen

January 4, 2013 in Android, Elements, iOS, Java, Mac, Metro, Windows, Windows Phone

Android powered Ouya ConsoleYou already know Oxygene is the best choice for mobile development – Oxygene for Java on Android, Oxygene for .NET for Windows Phone and the Windows RT Surface and the beta “Nougat” already providing great support for iOS development. But what if you want to develop on the big screen? Like that 50 plus inch TV in your front room?

Enter the Ouya, the Android powered game console for your TV. They just released their ODK (Ouya Development Kit), and since it is Android powered, it is perfectly supported by Oxygene for Java right out of the box. Oxygene for Java is a completely native Android development tool – there are no forced abstraction layers or additional run-times to get in your way or require updating when new variations or versions of the platform come out.

Red Ant Games has just announced they are using Oxygene for Java to move their Subject 33 to Ouya and Android mobile devices. Subject 33 is currently an Alpha prototype on Windows. They also have plans to support iOS and Mac with “Nougat”.

Profile photo of Alex

by Alex

New features in Schema Modeler 7

December 12, 2012 in Data Abstract, Windows

As you might know, we are switching to the new Schema Modeler tool in our Data Abstract products. We wanted to make it better, handier and up-to-date with the latest conceptions introduced in Data Abstract. In the last release we fixed some bugs and added a set of new features. Today I want to highlight some of these features. So let’s get started.

UI improvements to simplify navigation

During the beta, we’ve had some complaints that navigation in the new Schema Modeler is more complex than in the old one. In order to see and select a schema table field, we need to expand the Table node, then expand the Fields node, and after that we will see the particular fields. We tried to simplify this by adding a new Content section to the bottom of the schema table view.

Inside this section you can see the table content, including fields, parameters and statements. You can quickly navigate to any particular item – just double-click it. You can navigate to fields, parameters and statements collection nodes by clicking the corresponding hyperlinks (you can find them above the container).
And finally, you can easily create and remove table elements easily from the table view. There are two buttons at the top right corner of each element view.

See video

Tip: You can select several fields and remove them in one go, rather than deleting them one by one.

There are similar improvements planned for the schema command view in the next release.

Improved fields collection view

Now it shows size, scale, precision, and many other field properties. It also highlights read-only fields with gray, so you can easily notice them.

Improved recreating or updating schema table fields

We added the ability to choose a statement for recreating or updating schema table fields.
The previous version used a selected statement, which was not obvious and handy.

If the schema table has only one statement, it will be used for recreating fields automatically. But for cases where your table has several statements, you will see a dialog where you can choose the statement you want to use.

See it in action

Connection Types

Some time ago in the Data Abstract v5, we introduced the new concept of the ConnectionType, which replaces specifying the exact connection with the more general Connection Type. It allows us to implement a more flexible way of working with several connections in the application.

The new Schema Modeler simplifies setting the connection type for the statement by offering a list of available types in the combo-box. You don’t need to remember what connection types your connection manager contains. Just select the appropriate one from the list.

See this in action

Loading connection content by demand

We have implemented a lazy loading pattern for Connections Manager documents in the new Schema Modeler, which is more efficient and decreases memory consumption.

See this in action

Added ability to open *.daConnections files

Now we can open connection files by double-clicking in the Windows Explorer, or in the Visual Studio Solution Explorer, and edit them separately from the schema.

Working with *.daRemoteSchema files

daRemoteSchema files are just a reference to a remote Data Abstract server. Schema Modeler can open these files: it connects to the server and downloads the schema from there. If the server requires a login or is encrypted with an AES envelope, Schema Modeler shows a login dialog where you can provide the login and password.

Since we cannot update a schema on the server in runtime, daRemoteSchema project opens in Read-only mode and can be used for informational purposes only.

See this in action

Working with *.RelativityClient files

A RelativityClient file is the another type of shortcut file that can reference a particular schema in a particular Relativity domain. The important point here is the necessity to work with connections using Relativity abilities only. Actions like obtaining metadata, a list of database objects or driver information should be performed by the Relativity application. Saving changes in the schema and connection manager will lead to uploading data directly to the Relativity server, no local or temporary files will be created.

See this in action

Working with Internal connections

Internal connections is a quite new concept in the Relativity world, representing a general connection that can be managed by Relativity only. Its main aim is to abstract the details of connections even for Relativity administrators. With an internal connection, it doesn’t matter what driver is used for working with data. It can be SQLite, or a more exotic driver, Relativity will know how to deal with it.

Improved automatic mappings regeneration

Now it understands SQL field aliases and generates proper mappings for it.

See this in action

Improved generation delta commands for schema tables

Now it creates commands and sets them for the table.

See this in action

So far that’s all for the current release.

If you have any remarks or ideas, please let us know.
Thanks!

Windows Store Development with Oxygene

November 1, 2012 in .NET, Elements, Metro, Oxygene, Windows

When Microsoft released the Visual Studio 2012 Shell, support for building Windows Store apps (formerly known as Metro apps) was missing. This certainly frustrates Windows Store Development with Oxygene which ships with the Shell.

Fortunately I’ve found a work-around to this annoying omission. Simply install Visual Studio 2012 Express for Windows 8 (free download) and then install (or re-install) Oxygene for .NET. This activates the support for WinRT templates and the Modern UI designers in the Shell. After that you can use the WinRT and Modern UI designers in the Shell with Oxygene for .NET.

The Visual Studio Shell and the Express Editions share many resources. As long as the Express Edition is installed, the Visual Studio Shell has WinRT and Modern UI support available for use in Oxygene for .NET development. The Express edition does not support Oxygene, so you will need to continue using the Shell.

Update: It was reported that it may be necessary to uninstall the Shell if you have trouble installing the Express Edition. So if you run into trouble you might try that.

Profile photo of marc

by marc

The new Oxygene website (Oh, and some exciting new Oxygene announcements, too)

September 6, 2012 in Elements, iOS, Mac, Metro, Nougat, Platforms, Visual Studio, Windows

Yesterday, we launched the major revamp of our “Oxygene” product homepage, available at remobjects.com/oxygene, along with announcing the 5.2 release, a significant update to the product.

Let’s have a quick tour of the new content.

What’s New in 5.2

First, and most importantly, there’s the updated What’s New page, updated to list the new features in 5.2 and providing back access to previous release notes as well.

5.2 introduces some significant (and dare i say ground-breaking) improvements to error handling, with better fix-it support, auto-fix-its for select (safe to fix) issues and — my personal favorite – the new Treat Fixable Errors as Warnings, which can be an enormous timesaver if you just wanna code and test some quick changes. Of course there’s much more to 5.2 — such as our new IDE-integrated Gendarme Code Analysis, support for language-native tuples, Visual Studio 2012, Metro, and more.

Nougat

Next to 5.2, the second biggest announcement has been the first peek at “Nougat“. Nougat is the codename for a new (third) platform for Oxygene, namely Cocoa and the Objective-C runtime for creating truly native Mac and iOS apps. Right now it is just a teaser — we’ll be releasing more details about “Nougat” here on the blogs over the next few weeks.

The good news is that “Nougat” is already part of our new Oxygene shop SKU — so anyone buying (or renewing) Oxygene now will be among the first people to see the Nougat beta (roughly within the next month) and get the final product when it ships in 2013.

We’re very excited.

The Language

The new website also contains a sizable new section focusing on the Oxygene Language and its Object Pascal heritage. We have five pages detailing the most exciting language features. We also have an overview of Oxygene evolved over the years (even i rediscovered cool features i had forgotten about, as i wrote this page ;), and Jim has written an excellent history of the Pascal Language since the 1960s, including a cool diagram that shows how it all fits together:

History of Pascal

The Platforms

Finally, there’s a new section that looks at Oxygene from the perspective of target platforms. With the introduction of Nougat, Oxygene now literally covers every single major target platform that matters today — from desktop and mobile to the server. The Platforms page serves as a central point to discover all the possibilities Oxygene opens up, and for most platforms, links to a dedicated “platform hub” page with details, links and videos about using Oxygene for the platform.

Jim has also created an excellent new WPF Development with Oxygene video to go along with the “Windows Desktop” platform, which, oddly, was underrepresented in the video department.

We expect this section to grow and expand over time, with more potential targets added, and the information for each target getting more comprehensive.

One More Thing: Sugar

Hidden away on the page about the three supported core Frameworks, you’ll find another sneak peek at something we are working on: an open source cross-platform base library for Oxygene, built on the awesome Mapped Types feature introduced in Oxygene 5.1.

Having a cross-platform language such as Oxygene is great, and one of Oxygene’s strong points is that it targets the platform-native APIs on each platform. The downside is that even the base types — simple stuff such as Strings or Dictionaries — can vary widely between platforms, making it tough to share code of any reasonable complexity.

The goal of “Sugar”, which is the codename of this project, is to create a toll-free mapping library that will allow Oxygene developers to write common code that will compile for all three platforms and work with the platform’s base types using a shared API.

This is even cooler than it sounds ;)

The Shop

Before we forget: of course the new Oxygene 5.2 is available now at $499 for new users — that includes all three platforms. Users coming from Prism XE2 (or our own Oxygene for Java) can renew for $349 — which also includes all three platforms.

We also have cross-grade pricing for users of Delphi. If you currently use Delphi, you can cross-grade to the full Oxygene package (again, you guessed it, all three platforms) for $399.

Let us know what you think!

Over the past month or so, we have put a lot of work into the new website. Let us know what you think, like, dislike, or are missing.

Of course even more work and sweat has gone into Oxygene 5.2 (in my humble opinion our most solid release yet, and i am very proud of what the team has delivered), and work already continues to go into the upcoming September and October interim releases, and towards “Nougat”

If you haven’t yet, try Oxygene — we have a free 30-day trial version for the .NET and Java editions. We hope you like what you see, and please do let us know what you think!

yours,
marc

Profile photo of marc

by marc

Setting up your Nexus 7 for Development

July 30, 2012 in Android, Elements, Visual Studio, Windows

Today i tried setting up my new Nexus 7 to use for development with Oxygene for Java and our Data Abstract for Java BETA. As most of you probably know, i’m not a big Android developer myself, and this is my first encounter with a live device. Compared to iOS, there are quite a few more (and not obvious) steps necessary to get started, so i figured i’d write down what i had to do:

  • On the Nexus, go to “Setting|Developer options”, toggle the “ON/OFF” switch at the top to “ON” and enable the “USB debugging” option.

  • Plug your Nexus 7 in to USB. If you’re using Oxygene in VMware (say on a Mac), make sure go into the VM options and connect the “asus Nexus” USB device to the VM. (Carlo tells me there is a way to debug “remote” with the device attached Mac side, but that is fiddly. Maybe we’ll expose UI options to make that easy in a future update for Oxygene.)

  • On Windows, you need to install device drivers (not something i had to do for a long time ;). Oddly, this is a two-step process:

  • Go to the ASUS Website and download the driver that’s offered (choose “Android” as OS. Duh.). Run the installer. Oddly, this installs some stuff, but not the actual device driver. Instead, it places a .zip file with that driver in your Documents folder. Go and unzip that, you will need it in the next step.

  • Go to “Control Panel|Device Manager”. You should see an “Unsupported Device/Nexus” in the list. Right-click it and select “Update Driver”, choose to manually locate the driver, and browse to the extracted .zip from before.

  • With that, you should be set. If you now open an Android project in Visual Studio, you can go to the Project Properties, select the “Android” tab, and the Nexus should show up in the “Android Device” setting (as a cryptic hex number). If it doesn’t yet, clicking “Refresh” should do the trick.

  • There is no Step 7.

That’s it. Press “Start” and your Oxygene project should build and run on your Nexus.

 

 

Why did i get a Nexus 7? Good question. As we are getting deeper into Java and Android support (and with Oxygene for Java now being out almost three quarters of a year), i decided i need to get my hands dirty with some Android development myself in order to apply more of my trademark anal retentiveness to our Java and Android tool chain in both Oxygene and RO/DA. I figured the best way to do that was to get an actual device to play with.

So what do i think of the 7? It’s a nice device, for sure. I like it, probably more than i expected to, and i am starting to appreciate certain aspects of Android. There are some nice ideas there. That said, i don’t see the Nexus (or Android in general) replacing my iPad or iPhone anytime in the near future. No surprise there.

Spell checking in code

July 19, 2012 in .NET, Elements, Linux, Mac, Oxygene, Windows

Last year marc wrote about our spell checking in code feature for Oxygene. This feature lets you continue using code completion after you made a typo in your code. The compiler will report an error as usual, pick the most likely choice from a list of possible identifiers and pretend that item was picked in the first place. The end result is that this code:

var s: Srting;
 
for i: Integer := 0 to s.Length -1 do begin
  s[i].
end;

will show code completion for the elements of the string, despite the wrongly spelled srting, and the compiler does the same thing, it shows an error for srting as usual, but using s will make it act like it’s a string.

There are a number of algorithms we could have picked to find the best matching item for this, so after some trial and error we picked the Damerau–Levenshtein distance and modified it a bit. Given two strings, this algorithm returns an integer indicating how many changes there are. Removal, adding or changes are counted as a single change, as are swapping two characters that follow each other (unlike the plain Levenshtein distance which only does removal, adding and changing, so swapping would count as 2). After some optimizations we came up with:

method DamerauLevenshteinDistance(string1: System.String; string2: System.String; aThres: Integer): System.Int32;
begin
  if string1 = nil then exit length(string2);
  if string2 = nil then exit length(string1);
  var s1l := string1.Length;
  var s2l := string2.Length;
  if ((s1l - s2l) > aThres) or 
    ((s2l - s1l) > aThres) then exit Int32.MaxValue; // if the length is that different there's no point in trying.
 
  if s1l > s2l then begin 
     // swap; make sure the smallest is always in string1, which will speed up the inner loop.
    var s := string2;
    string2 := string1;
    string1 := s;
    s2l := s1l;
    s1l := string1.Length;
  end;
  if aThres > s1l then aThres := s1l; 
 
  var lPrev := new Integer[s1l + 1];
  var lDist := new Integer[s1l + 1];
 
  for i: Integer := 0 to s1l do begin
    if (i <= aThres) then 
      lPrev[i] := i
    else
      lPrev[i] := Int32.MaxValue;
    lDist[i] := Int32.MaxValue;
  end;
 
  for j: Integer := 1 to s2l do begin
    var c := string2[j-1];
    lDist[0] := j;
 
    var min := Math.Max(1, j - aThres); // make sure we don't have to look back that much
    var max := Math.Min(s1l, j + aThres);
    if min > max then exit Int32.MaxValue;
 
    if min > 1 then lDist[min-1] := Int32.MaxValue;
 
    for i: Integer := min to max do begin
      var a := string1[i-1];
      if a = c then // the same, do not increase the value.
        lDist[i] := lPrev[i-1]
      else if (i < s1l) and (j < s2l) and (string1[i] = c) and (a = string2[j]) then  // swap
        lDist[i] := lPrev[i-1]
      else 
        lDist[i] := 1 + Math.Min(Math.Min(lDist[i-1], lPrev[i]), lPrev[i - 1]); // adding/removing
    end;
    var lTmp := lDist; // swap them; so instead of having to use a vector we use two arrays that swap around.
    lDist := lPrev;
    lPrev := lTmp;
  end;
  exit lPrev[s1l];
end;

It’s not the exact Damerau–Levenshtein distance implementation as found on Wikipedia, the original is slower and takes a lot more memory, but it’s based on it, with some ideas gotten from StackOverflow posts. It might not give the same result 100% of the time, but it works really well for us. We run this against a list of possible identifiers in scope where normally an unknown identifier error would occur, and return the lowest item. The Fix-It dialog shows the 10 possible matches below a given threshold. Now this same code can be used for a lot of things. You can even make a regular spell checker with this method.

Migrating a Metro app from Beta to Release Preview

July 5, 2012 in .NET, Elements, Metro, Oxygene, Uncategorized, Visual Studio, Windows

There were a few breaking changes to Metro apps when the Visual Studio 2012 Release Candidate came out. To develop for the latest version of Metro sing our tools, you will need the June 2012 Release or newer, which you can get from the usual places, including our [licensed downloads page](http://downloads.remobjects.com) and [as trial version](http://www.remobjects.com/trials).

Once you have the June Release or a newer beta installed, you are ready to build Metro apps for the Visual Studio 2012 Release Candidate and Windows 8 Preview, but if you started working with the Consumer Preview of VS11, you’ll need to make the following changes:

  • Remove public from your XAML Pages and App partial classes – You will get an error like ‘(E57) The type visibility for “app” does not match other class parts.’ Simply remove the public visibility modifier from the declaration in the interface section of your pas files. So instead of “type app = public partial class” it should say “type app = partial class”.
  • Add a default language – You may get a warning like “(APPX1901) The DefaultLanguage property is either missing from the project file or does not have a value. The fallback language is set to the Visual Studio language: en-US.” You will need to open the .oxygene project file in your favorite text editor and add the line <DefaultLanguage>en-US</DefaultLanguage> in the first <PropertyGroup>. The warning will then be removed.
  • Recreate your certificate – Anytime you move a project from one machine to another you may find you need to recreate your certificate. You will know because you get a warning like “(APPX0107) The certificate specified is not valid for signing.” The fix is simple:
    1. Just find the XXX_TemporaryKey.pfx file in your solution (where XXX is the name of your project) and remove it.
      TemporaryKey in Solution Explorer
    2. If you try to build now, you will get the warning “(APPX0104) Certificate file ‘XXX_TemporaryKey.pfx’ not found.” You need to create a new certificate: Double-click your Package.appxmanifest file in the solution explorer. From there, go to the Packaging tab.
      Package.appxmanifest Packaging tab
    3. Click the Choose Certificate… button. From the Choose Certificate dialog, click the Configure Certificate drop down, and select Create test certificate…
      Choose Certificate
    4. Then, on the Create Test Certificate dialog, you can provide a Publisher ID or just click OK. Now you will have a new “XXX_TemporaryKey.pfx” file and the warning will go away.
    5. The Metro Style Apps Dev Center has more information about valid certificates.

There were a few other changes, but those will vary from app to app, depending on what you’ve done in the app. I’ve updated my MetroExamples to work with the latest Release Preview and the June Release.

Metro Development with Oxygene for .NET

May 28, 2012 in .NET, Elements, Metro, Visual Studio, Windows

Windows 8 introduces the new Metro style for app development. These Metro apps take advantage of the new Windows Runtime (WinRT) and are available on both Windows 8 desktop and Windows 8 Tablets. Of course Windows 8 has preliminary support in Prism XE2.5 and Oxygene for .NET 5.1. To get started you need the May update to Prism XE2.5, which is available this week. If you want to consistently have access to the latest version of Oxygene for .NET, register your Prism XE2+ serial number. The May update (releases this week) is the minimum version you need to get started. Once you registered, you can download the latest version.

To do any Metro development you need to be running Windows 8 since that is the only place WinRT is available. You can download the Windows 8 Consumer Preview ISO and install it in a Virtual Machine (you might need to update your VM software), Boot Camp or as your main operating system. You also need the Visual Studio 11 (VS11) Beta. When VS11 ships, the shell edition will be available with the Oxygene for .NET installation, but for now you need to download the beta from Microsoft. Since you cannot install add-ins to the express edition of VS11, you will need to download the professional version or higher.

The steps for installation are:

  1. Windows 8 Consumer Preview
  2. VS11 (Pro or higher)
  3. Prism XE2.5 – May update or newer

If you want to get a quick start you can download the Oxygene Metro Examples (Updated for the July Oxygene for .NET Beta and the Visual Studio 2012 Release Preview) I’ve put together. The examples cover interacting with the Search Charm, adding an App Bar, changing the app layout when the view state changes, customizing your tile and dealing with notifications. I included both the source and the binaries in the download.