Skip to content

Category: Tips

sort code tips and tricks

WebChart, Easy as Pie

Among the many new features introduced by the Web Framework 2.0, one of my favourites is the new WebChart class. Based on Chart.js, this class offers a total of eight chart types you can create and use really easily in your projects; including the Line, Bar, Pie or Doughnut chart types among others.

Comments closed

WebStyles and Web Framework 2.0

One of the big changes in Web Framework 2.0 is that web styles are no longer the primary means of styling controls. Instead themes are used to provide a single, consistent look and feel across the entire application. We made this change because dealing with individual styles became more complex and unwieldy as projects grew bigger. Themes simplify this dramatically.

Comments closed

Converting Web Projects to Web Framework 2.0

With the release of Xojo 2020r1 comes the new 2.0 version of our web framework. While the way in which you build web applications hasn’t fundamentally changed, this new version is a from-the-ground-up rewrite and utilizes API 2.0 for greatly improved consistency. This means that the conversion process is going to be time-consuming, but will be well worth the effort as web applications built upon Web Framework 2.0 will be more robust, handle more users, be more responsive and have a far more modern look and feel.

Comments closed

PDF Arrives at Xojo!

Xojo 2020r1 brings a highly requested feature to the Xojo IDE: the ability to create PDF documents from code! Now you can use the already familiar methods in Xojo’s Graphics class to create Standard PDF 1.4 documents with the PDFDocument class.

Comments closed

Top-Rounded Rectangle

On the forum a user asked if there was a way to create a rectangle with only the top left and top right corners being rounded. Xojo’s built-in RoundRectangle control draws with all four corners rounded, so that was not an option.

One solution is to use a GraphicsPath to draw exactly what you want. With a GraphicsPath you can use the AddArc() method to add rounded corners and then draw the lines for the rest of the rectangle.

Comments closed

Code Tip: How to Implement the ARC4 Encryption Algorithm

ARC4 is a symmetric encryption algorithm fast and easy to implement. Being symmetric does means that it uses the same function with the same key (varying from 40 to 2048 bits) both for cyphering and de-cyphering a block of data.

Is it the most secure or robust encryption algorithm around? Not really. But it provides a good amount of performance and you can take further steps in order to correct some of its flaws. So, continue reading if you are interested in having this one in your developer toolset implemented as a Class with separate methods to encrypt and decrypt a block of information (even if it uses the same function in both cases).

Comments closed