Skip to content

Month: April 2016

WeakRef and Memory Management

Object Oriented Programming with Xojo, and in this case Event Oriented Programming as well, is simply wonderful. You create objects (Instances) from the defined classes that act as templates and just let them roll. From there, the interactions made by the user are those that determine how objects interact with each other via sending messages to each other (method calls), the access to properties and also the execution of events.

However, sometimes the combination can simply reach unstable situations by the very nature of our applications and here is where failures can arise in memory management. Fortunately, we can keep this under control with the help of the WeakRef class.

Comments closed

Xojo Programming Language: 6 Fascinating Facts

Xojo is similar to VB, Java and C#

The Xojo programming language is fully object-oriented and uses an object model that is quite similar to VB, Java and C#. If you are used those languages at all, you’ll be right at home with Xojo.

Available since 1998, Xojo was one of the first languages to use Automatic Reference Counting (ARC), something that other languages such as Swift and Objective-C now use. Xojo is type-safe and fully object-oriented making it easy to learn and use, but it also has advanced features such as namespaces, extension methods, exception handling, introspection, delegates and more.

Comments closed

The Chinook Sample Database

Have you ever needed or wanted a populated sample database with several related tables to play around with? Perhaps you are learning about databases and database design or perhaps you want to try out a new tool such as Xojo but want a pre-build database to start with.

Comments closed

Easy as Pi: GPIO updates

We are always keen to see apps and projects that Xojo developers have made for their Raspberry Pi 2 and Raspberry Pi 3 single-board computers. Especially since Xojo 2019r1 when building for Pi Desktop and Console is free with Xojo Pi!

I am pleased to announce some updates to our GPIO project to make it even easier to use more types of hardware in your Raspberry Pi projects.

Comments closed

Introspection

Introspection is a very handy and useful part of the Xojo language.

You can use it to examine a lot of the objects that are in memory at runtime. You can access the properties in those objects, call methods on those objects and even create new instances (with some caveats here).

But there are limits to what you can do with it. You can’t use it to create things that do not exist at runtime because they’ve been stripped out when your app was built.

Comments closed

Code Refactoring Tools

Wikipedia defines Code Refactoring as:

the process of restructuring existing computer code – changing the factoring – without changing its external behavior. Refactoring improves nonfunctional attributes of the software.

Did you know that Xojo has a bunch of refactoring features that can help make this process more efficient?

Comments closed

Advanced Retina/HiDPI: BitmapForCaching and ScaleFactorChanged

The most direct way to support HiDPI* for custom controls is to draw into the Graphics object passed into the Paint event. That graphics object is already configured with the appropriate scale factor and double buffering- the entire control will be handled correctly by the framework if the DoubleBuffer property is set.

*As with other posts, we’ll use “HiDPI” to refer to both HiDPI on Windows and Retina on OS X.

2 Comments