Issues with creation

No. I dont meant the whole “God created the earth in 7 days” business. Sorry but this isnt going to be a discussion of monotheism and the belief systems they have. Maybe some other time when I get tired of discussing it with my uncle, the ex-Catholic priest, and his wife, the ex-Catholic nun. It does make for some fun discussions though 🙂

No, this is about the whole question of creating objects in Xojo and how, in our code, we can make it so some code can create new instances using NEW and other code cannot.… Read the rest

Why implicit instance isnt your friend

When you start a new desktop project in Xojo you get a few items by default.

One of the is a Window – often named Window1.

And it has a certain set of default properties. One of these causes a LOT of confusion and grief. You end up with issues like Window opening unexpectedly, Mac Window Size Keep Changing and Enumerations act private when they are not

While at first implicit instance makes life simple once you get very far with Xojo it becomes a liability.… Read the rest

Talking about other tools

One thing thats not usually allowed on Xojo’s forums is talk about other products that they might consider “competitors”

But there are some interesting options and discussion of them can take place on the user group hosted forums at IfNotNil.Com

You might want to give them a try


In a recent discussion on the forums someone said that “operator_convert acts like a constructor”.

It’s true, except when its not.

For instance, if you create a class that has an “operator_convert from” then you may be surprised at the behaviour.

So first, whats an “operator_convert from” ?

A class can have two forms of operator_convert.… Read the rest

Developers needs are not the same as consumers needs

There are lots of apps; desktop, web, and mobile. And they are for all kinds of needs for general consumption.

Developers needs often don’t fit that model though.

How many developers have IDE’s that the use on the Web ? Or on their mobile phone ? You might be able to write text there but if you using a tool like VS Code, Xcode, etc these are still mostly traditional desktop apps.… Read the rest

Is nil or = nil ?

Often in code you might see checks for NIL written as

if foo = nil then

and sometimes you might see

if foo is nil

Whats the difference between the two ?

In Xojo the IS operator compares the references. It doesn’t compare the contents of the objects in any way. It answers the question “do these two references refer to the exact same instance” – in some languages this would be comparing whether two pointers point to the same location.… Read the rest

Decide by not deciding

I was doing some reading on the weekend and came across some really good thoughts on how to make decisions in code – but not by using conventional if or select branching mechanisms or others that masquerade as flow control statements under other guises.

There’s a whole movement for “if-less programming”.

And it fits very well with using OOP and the capabilities of polymorphism in ways that make your code clearer and easier to maintain and extend.… Read the rest