• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Programming with ReadBASIC

VMSZealot

Well-known member
I thought I'd take a break from the day job of hacking with C, and play with ReadBASIC on the Mac. It seems VERY limited - but perhaps that's me (probably is). How do I, for example, create an application which doesn't have a window? It seems like it should be possible (because in Project Settings I can select <None>), but I can only open the code editor if I have a Window to edit code for. I can't, for example, seem to have a class for the menu items (which is what I'd like).

I'd like to be able to have an application load with just a menu bar, and to have Preferences under the Edit menu and then to be able to select Preferences from Edit and have it load the Preferences window at that point.

I'd also like it to be able to do stuff when it loads, when it quits, and every few minutes - all without a menu on the screen.

To further complicate matters, I chose RealBASIC 1.1 from MacintoshGarden in order to have the compiled code run on the widest variety of Macs.
 

Phipli

Well-known member
Not answering your question at all, but I suggest grabbing a newer version than 1.1. Version 2 has similar target platform requirements, but is better in every way.
 

Phipli

Well-known member
WRT your actual question, there is a way, but it isn't part of RealBasic, I'd have to do some testing. It isn't really what that age of RealBasic is for.

Basically there is a flag that can be used to set an application as a background application, but it crashes if you do certain things.

The other option is hide the window on launch.
 

VMSZealot

Well-known member
WRT your actual question, there is a way, but it isn't part of RealBasic, I'd have to do some testing. It isn't really what that age of RealBasic is for.

Basically there is a flag that can be used to set an application as a background application, but it crashes if you do certain things.

The other option is hide the window on launch.
I tried hiding the window `.visible = false` - but then no methods run on that window either.
 

Phipli

Well-known member
One last trick, once you have the program set to run in the background like above, you can turn it into a special type of extension that launches when the user gets to the desktop. You just change the file type from "APPL" to "appe", then drop it in the Extensions folder.

Changing the existing background app into an extension application :

View attachment 20230327_214737_1.mp4

Showing it working:

View attachment 20230327_215056_1.mp4

It quacks three times when the computer finishes booting and the extension executes, then it continues running invisibility in the background, wasting RAM 🤣
 
Last edited:

aladds

Well-known member
I can confirm that the method you use (changing the default window in project settings and adding a class with Super set to Application) works in Realbasic 1.1. That said there are quite a few bugs in 1.1 from memory, so I'd try to use at least 2.1.2 as has been suggested already :)
 

Phipli

Well-known member
I'd also like it to be able to do stuff when it loads, when it quits, and every few minutes - all without a menu on the screen.
To be honest, I'd have the background stuff done by one app that just ran invisibly in the background as an "appe", and create another that communicates with the first via apple events and saves settings as a preference file, to provide the UI for setup. In the style of a Control Panel.
 

Phipli

Well-known member
I can confirm that the method you use (changing the default window in project settings and adding a class with Super set to Application) works in Realbasic 1.1. That said there are quite a few bugs in 1.1 from memory, so I'd try to use at least 2.1.2 as has been suggested already :)
Yeah, I don't have 1.1 installed, it didn't feel like a mature product until version 2.
 

aladds

Well-known member
I was sad when I started using RealBASIC since I'd been playing with demos of 2.1 and 3.5, but then when I bought my license (and I still have the original paperwork somewhere) I could only get 5.2...which couldn't make 68k apps! :(

These days the garden solves that problem though(!)

(and eventually I upgraded my laptop to one with a PowerPC)
 

Phipli

Well-known member
I was sad when I started using RealBASIC since I'd been playing with demos of 2.1 and 3.5, but then when I bought my license (and I still have the original paperwork somewhere) I could only get 5.2...which couldn't make 68k apps! :(

These days the garden solves that problem though(!)

(and eventually I upgraded my laptop to one with a PowerPC)
To this day I'd buy a v2.x or 3.x licence if I could.

The shame is that it is getting so much harder to look things up when you're stuck. I have the O'Reilly realbasic book, but am not sure if there is anything else I should grab for a more offline reference.
 

aladds

Well-known member
I was quite impressed that when I signed up for a Xojo account a little while ago I was able to have my 5.5.5 license added to the account since they still had a record of it. I didn’t ask if they would be willing to generate an older license for me, but since they didn’t back in 2004, I doubt they would now.
 
Top