Working around things the IDE prevents

Sometimes when you want to subclass a control you want to retain the property name the Xojo control uses, but you want to add some custom functionality by putting a computed property in place in your subclass.

In the long run this makes your subclass a better drop in replacement. You dont end up with the case where the superclass has a property named one thing, like Text, and your subclass has a similar property named something else, like Caption.… Read the rest

Helping yourself debug

There are some really handy pragmas that can help you speed up your code a lot if you turn off the things they deal with.

Normally Xojo puts in extra checks to make sure you dont exceed array boundaries and dont overflow the stack on recursive calls. The list is on this page but I’ll repeat a few here

BackgroundTasks Enables or disables auto-yielding to background threads.In… Read the rest

Ptrs. And Memoryblocks. Oh My !

Sure I badly paraphrased the line from Wizard of Oz but this isn’t a word junkies blog. Or a Word© junkies blog either 🙂

Stupid tech jokes aside this one is about Ptr and Memoryblock and their interesting relationship.

In Xojo a memory block is just that – a chunk of memory acquired in one of many ways, that usually can be manipulated in lots of ways.… Read the rest

Whats your purpose ?

Methods should solve a single problem, answer a single question, or otherwise do one thing.

When you, the author, are asked “what is this code going to do ?” you should be able to say it in ONE sentence without the use of conjunctions or disjunctions – no ANDs and ORs required.

The upside to such a description is that this often can make method nice and short.… Read the rest

Single Static Assignment

Or “write once”

This is a form that LLVM uses for its IR when compiling. It makes certain kinds of analysis much easier to perform as its simpler to determine how variables are affected long term and what their life times are.

And Rust uses it for EVERYTHING – you literally have to tell Rust that a variable should be “mut” or mutable.… Read the rest

Whatever you think of him

Joel Spolksy has some great blog posts

Several I re-read from time to time just to refresh my recollection of them or to glean something new from them I may have missed on one of the tens of rereads I did.

I really like his blog posts about organization style, functional specs and other aspects of software development.… Read the rest

Enum extender updated

Yeah again 🙂

Fixed a bug where it would write the wrong value into the data on the clipboard and so it would create an incorrect enum to be pasted.

Thats been fixed

More things on the way !

On Propertiness

I’m not sure thats a word – propertiness

I’m using it to describe something that acts or behaves as a “property”

What defines something being a “property” ?

C# uses

A property is a member that provides a flexible mechanism to read, write, or compute the value of a private field. Properties can be used as if they are public data members, but they are actually special methods called accessors.

Read the rest