Skip to content

69 search results for "javier"

Raspberry Pi and Xojo: Configure for Remote Access

Xojo is a superb choice for developing and deploying apps for Raspberry Pi. After all, Xojo not only simplifies making the User Interface of your apps via drag and drop, it’s an object-oriented and event oriented programming language that builds native Linux apps based on the ARM processor architecture for the Raspberry Pi (among other platforms).

Comments closed

Design Patterns in Xojo: Observer, Part II

In previous blog entries we saw how easy it is to implement the Design Pattern Singleton and how we can find the Observer Design Pattern already implemented on several Xojo features by default, greatly simplifying our code and interaction between the objects. Now, as promised, it is time to put it all in practice, creating our own Notification Center: a class that will allow us to share the same unique instance for the entire App (Singleton), and that can use any object in order to register itself for receiving notifications by the observed Control, for one or more message (the notifications themselves).

Comments closed

iOS Tutorial: Shorten that URL!

In this Xojo tutorial we will see how simple it is to make an iOS App that shortens an entered URL using the public API of Bit.ly. We will use our own subclass inherited from Xojo.Net.HTTPSocket, and the Declare statement in order to use some functions and methods found on the native Cocoa Touch API. In fact, the use of Declare is mandatory because with the new Xojo Framewok we don’t yet have access to the EncodeURLComponent function available with the old framework. This one is a big help in substituting any ilegal character with his hexadecimal value for the final URL’s composition.

Comments closed

Design Patterns in Xojo: Observer, Part 1

In a previous post we saw how to implement the Singleton Design Pattern in our Xojo apps. Now, it is time to look at another useful Design Pattern you can use in your apps: the Observer Design Pattern. This one solves the kind of question “How can the ‘x’ controls be automatically notified every time there are changes on ‘y’?” Sound interesting? Let’s see how!

Faro.jpg

In fact, this is the first of a two part series regarding the Observer Design Pattern. This one will focus on how easy is to implement using the interfaces already available in Xojo for UI controls like the PushButton, the BevelButton, and also for the Timer class. In Part 2, we will see how to implement the Observer Design Pattern from scratch, using our own Classes and Interfaces, so it will be easier to understand the mechanisms behind this Pattern and how to use it.

Comments closed

Design Patterns in Xojo: Singleton

One of the best things that Xojo offers to programming newcomers is that they can simply jump-in and start to write code. In a matter of a few hours they’ll have a functional app! Nothing new here. (Or for not-so-newcomers, a fast way of creating a functional prototype from a idea).

CandyMachine.pngBut as these users advance in their Xojo skills, they probably will care about coding better and to embrace the OOP way of doing things. After all, Xojo is a modern programming language with Classes, Inheritance, Interfaces and a bunch of the usual OOP paradigms that have much to offer: reusability, better maintainability and a lot of flexibility.

Comments closed

Methods Overloading: Computed Properties, Setters and Getters

Some years ago, Xojo introduced the ability to use Computed Properties, something that is present in other programming languages too and is based on the use of dedicated methods to assign and retrieve the property value itself. So, in other programming languages, the first of these dedicated methods (or functions), the Setter, is the one invoked every time we want to modify the value of the associated property, while the Getter method is the one used from our code to retrieve the associated value. The Object-Oriented Programming (OOP) concept found behind this feature is Method Overloading. Nevertheless, let’s make clear that Xojo Computed Properties are not methods. They aren’t! But they make our life as developers much easier compared with regular Properties.

Comments closed

Let Your OS X Desktop App React to Custom URIs

Have you ever wondered how the magic behind the “mailto://” or other similar Uniform Resource Identifiers (URI) work? Whether from the web browser URL field or from Xojo via the ShowURL function, when URIs are executed the registered app opens showing the passed parameters (for example, in the Mail app for the ‘To’, ‘Subject’ and ‘Body’ fields).

Implementing this kind of behavior in your OS X apps is not rocket science! Follow these simple steps in order to register a custom URI from your app.

Comments closed

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