About incremental compilation

There are ways to see what is / isnt being recompiled

Its one of those many temporary files xojo creates

First thing you need is the PID of the specific instance of xojo you’re interested in.
It makes life simpler IF you just run one version at a time
Once you start Xojo you can look in Activity Monitor & get its PID

If you find the dir referred to by SpecialFolder.Temporary… Read the rest

About Events

Seems there is some lack of clarity about event handlers and event definitions and how this affects 2019r2.

Lets start with event handlers and event definitions.

When you take a control, like a push button, and drag one onto a layout you are creating an instance of a button on that layout. And you can add event handlers to that control.… Read the rest

ByVal and ByRef

A recent thread on the forums made it clear there is some lack of clarity about ByVal and ByRef

So here’s yet another attempt.

Value types are ones that the data assigned to them is stored right IN the memory location the compiler set aside for them.

A statement like

dim i as integer

reserves a spot in memory when you compile.… Read the rest

Final(ly)

Some languages have to notion of FINAL for methods, events, properties and many other aspects of the language.

But what exactly does FINAL do or mean ?

In other languages, like Java, FINAL has other uses like creating “constants” which there is no need for in Xojo. In those languages a FINAL property is a constant.… Read the rest

On being a developer

As developers we need to be more than just average consumers of technology.

That means we need to be more realistic about things like system updates and patches than just blindly installing them especially on our primary working machine.

At the very least we need to be able to test the very latest. You know our users are going to install the latest betas and run them as soon as possible.… Read the rest

A reason

I want Xojo to succeed. My living relies on it. This is the same for others I talk with. We all NEED Xojo to succeed. For us it needs to do more than just survive from day to day. We need it to grow. Our businesses depend on Xojo. We need it to be stable. We need it to be dependable.… Read the rest

New Attributes in 2019r2

There’s a lot of things to digest in 2019r2

One of the handy things that was added is a new Attribute you can make use of in your own custom controls – DefaultEvent

By adding this attribute to your custom class’ attributes you can make it so any one of the events your custom controls exposes is the “default event”.… Read the rest

ToHex

Converting numbers, especially ones of a specific size, to hex has long been problematic. The built in functions don’t do a very good job with it and often drop leading zeros even when the integers size is known.


Dim s1 As String 
s1 = Hex(13) // here 13 is an "Integer" literal 
             // and should be treated as a 32 bit integer in a 32 bit build
             // or a 64 bit integer in a 64 bit build

Dim i8 As Int8 = 13
Dim s2 As String
s2 = i8.ToHex
Read the rest

Game of Code

Or “write code like you immediately forget what you wrote” so it’s not a guessing game to figure out why you wrote what you wrote way back when.

What do I mean by that ?

Write code CLEARLY. Use constants liberally and give them good meaningful names.

So instead of writing a line like

If asc(key) = 16 or asc(key) = 204 then

where 16 and 204 are not obvious to everyone maybe write this as

Const ctrlP = 16
Const F5 = 204

if asc(key) = ctrlP  or asc(key) = F5 then

And then even when you go back and look at this code in 6 months even you won’t have to guess what 16 and 204 mean.