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
Lets start with the code
Dim v1 As Variant = Nil
Dim v2 As Variant = 12
If v1 < v2 Then
Elseif v2 < v1 Then
Which break statement would YOU expect to be hit ? I will say that the one that does get hit here is NOT what I expected at all.… Read the rest
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
In the world somethings change and some don’t. Some change loudly. Some things change quietly and invisibly.
One that I’m disappointed that has changed kind of quietly is Bob Keeney’s role in the community. Apparently he’s no longer a Xojo consultant.
Its notable that after nearly 20 years as a REALbasic/Xojo consultant Bob has moved into a new role at BlackBag Technologies.… Read the rest
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
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
IfNotNil has some new tutorials.
I’ve posted one, in a series, on data structures and how to implement them in Xojo.
More to come.
I’ve now had use of a Pro+ license for nearly a year.
When this license type was introduced Xojo told us that the Pro+ included
Top Priority Support is just as defined on that page, we’ll bump your support questions to the top of the queue and we’ll review your Feedback cases first. And of course you can set up a call with us anytime too.
… Read the rest
Some companies like to pose certain programming questions as part of their interview process.
I’ve run into a variety of these. They’ve been SQL related questions, code writing, and algorithm descriptions. Some were fairly straight forward. Some less so.
One of the best I heard was a series of “How would you write this code if you had to write it …” with varying restrictions put on things.… Read the rest
MacOS has been fully 64 bit since the release of 10.7 (Lion) in 2011.
Yet is has continued to support running 32 bit apps up until the release of 10.15 (Catalina) which removes support for 32 bit apps entirely.
There are ways to work around this like running an old version of macOS in a VM.… Read the rest