I’m programming with Xojo for a couple of months now, and I would consider myself not a beginner anymore. During the time, from the beginning with Xojo until today, I discovered that more sophisticated questions pop up while I code my software.
Not only questions about programming, but also questions concerning the Xojo IDE itself and especially Xojo-specific programming concepts.
It would be a great help, if someone could answer my questions. I don’t expect very long answers to each question. A short hint, a reference link or short explanation is totally enough.
Does a portable Xojo compiler as CLI binary file exist? Where can I find it?
If there is no compiler binary, can I compile Xojo source code out of my own application?
If question 1 and 2 are answered negative, how can I compile source code out of my own application?
How can I protect my software against reverse engineering or decompiling?
There are many ways to implement a licensing system, which one do you recommend? And which one do you consider as safest?
Is there an IDE extension similar to Copilot from GitHub for Xojo?
Where can I find IDE extensions for Xojo?
Programs that I compile for Windows usually come with a lot of separate .DLL files. Is there a way to put all the .DLL files somehow in an executable file?
In which case would I use remote debug hosts and for what?
When would I use a Timer or Threads? Can you give me an example? And what is a Semaphore?
When would I use a Worker? Could you give me an example use case?
For what can I use the class XojoScript? What is the use case?
What are delegates? For what can I use them?
Can you give me an use case for IPCSocket?
When do I use MemoryBlocks? Can you give me a use case?
How can I programatically take a screenshot?
What is Insert → Report? And for what can I use it?
Problem with current coding is, you can no longer alter the GUI elements from within a thread directly.
That is, Textfield.text=“Write this” no longer works from inside a thread.
Instead of, the Thread needs to alter a variable, app.ToWriteThisString = “Write this”,
and the Timer reads this variable recurrent. Within the Timer, the code is
You have to use timers/threads to make a modern interface. Progress bars are needed for tasks that take longer. For which you need a thread which makes nice spaghetti code. Sending emails for instance also needs a thread.
With a thread you can use ThreadSafeMBS methods from MBS to make a bit less spaghetti. Just don’t use a global variable if you don’t use the ThreadSafeMBS methods.
Note it’s not Xojo’s fault, as altering the GUI from threads isn’t supported by operating systems.
It used to be that it would work on certain cases, but that was just coincidences.
And I’ve seen odd behaviours. like entire white windows, because of trying to do UI things from threads; debugging that wasn’t straightforward.
Well, there are LOTS of threads in this forum about that. try the Search function with things like obfuscation, encription, hack, decompile erc. Then if you have a specific question, create another thread for that.
With IDE scripting it’s possible to copy files, add codesign etc. The IDE communicator can open, build and save multiple apps. I can change values like the Bundle ID, the architecture, the version.
Here is the start of my IDE communicator script:
dim MaxVersion as String = "0"
if MaxVersion = "" then MaxVersion = "0"
dim MajorVersion as string = "6"
dim MinorVersion as String = "2"
dim BugVersion as String = "0"
dim BetaVersion as String = "b1"
dim theCommand, theResult as string
dim userHome as String = DoShellCommand("echo $HOME")
userHome = Trim(ShellEncode(userHome))
dim Architecture as integer = 16
dim basePath as string = userHome + "/Documents/Development/Mail\ Archiver/"
'delete old apps and dmg
theCommand = "osascript " + basePath + "code\ current/ide\ communicator/delete\ old\ builds.scpt"
theResult = DoShellCommand(theCommand)
'scheduler: : only for normal, pro and pro admin
if MaxVersion = "0" or MaxVersion = "1" or MaxVersion = "3" then
openfile(basePath + "code\ current/max\ scheduler.xojo_xml_project")
ConstantValue("App.kMaxVersion") = MaxVersion
if ConstantValue("App.kMaxVersion") = "0" then
PropertyValue("App.Application Identifier") = "com.mothsoftware.mailarchiverx-helper"
PropertyValue("App.MacOSXAppName") = "Mail Archiver X Scheduler"
elseif ConstantValue("App.kMaxVersion") = "1" then
PropertyValue("App.Application Identifier") = "com.mothsoftware.mailarchiverxpro-helper"
PropertyValue("App.MacOSXAppName") = "Mail Archiver X Pro Scheduler"
elseif ConstantValue("App.kMaxVersion") = "3" then
PropertyValue("App.Application Identifier") = "com.mothsoftware.mailarchiverxproadmin-helper"
PropertyValue("App.MacOSXAppName") = "Mail Archiver X Pro Admin Scheduler"
makeVersion(MajorVersion, MinorVersion, BugVersion, BetaVersion)
if BuildApp(Architecture) = "" then