Problems viewing source code from an .rb file

Try changing the extension to RBP and opening that with Xojo…

If that does not work you need a version of RB that is old enough to read the file.

If it is an “rb” file then that likely means it is a binary RealBasic file. This eventually was renamed to be “rbp” and now “xojo_binary_project”.

It’s possible it will open with Xojo, so you should just try renaming it to “rbp” and trying to open it with Xojo.

If that doesn’t work, it may need to first be open in an older version of Realbasic to convert it to one of the newer formats. Feel free to send the file to me and I’ll give it a shot: paul@xojo.com

Thanks, everyone. I resaved it with the .rbp suffix and opened it in Xojo, but couldn’t view the source code. Perhaps that’s because I’m unfamiliar with how Xojo works. I will send it to you, Paul, for additional help in getting it to open. Again, thank you.

An .rb file is VERY old - from around RealBasic version 5 or earlier perhaps older as the extension for these was changed to rbp because Ruby also use .rb as the extension for their files
It’s very likely you’ll have to open this in version 5.5, save it as XML or Text & then be able to open it in later versions

[quote=19737:@Norman Palardy]An .rb file is VERY old - from around RealBasic version 5 or earlier perhaps older as the extension for these was changed to rbp because Ruby also use .rb as the extension for their files
It’s very likely you’ll have to open this in version 5.5, save it as XML or Text & then be able to open it in later versions[/quote]

I’m pretty sure I recently did change the extension on an old .rb file and was able to open it… are you saying that is not likely to work generally?

The last time I had to upgrade an .rb file to a new version I had to go through a number of intermediate versions (4.5 to 2006, 2008 then 2009) and fix up all the deprecations along the way.

Just opening the .rb file didn’t work for this particular project - however the .rb format has NOT undergone huge changes but there have been some in the intervening years (nearly 10 :P) Some are significant - some are not.

Your mileage may vary.

.rb is the extension for Ruby-files. A fine language for learning programming. If you want to learn the basics of OO programming, you should play for one day with

http://hackety.com

After that, you will understand a lot more from any other language or programming environment like Xojo.

[quote=19744:@Norman Palardy]The last time I had to upgrade an .rb file to a new version I had to go through a number of intermediate versions (4.5 to 2006, 2008 then 2009) and fix up all the deprecations along the way.

Just opening the .rb file didn’t work for this particular project - however the .rb format has NOT undergone huge changes but there have been some in the intervening years (nearly 10 :P) Some are significant - some are not.

Your mileage may vary.[/quote]

I have opened REALLY OLD .rb files found over the web from back the very old days. You usually get a festival of warnings that need resolving but the file itself is usually recognizable enough to get there. The OP’s problem seems to be earlier than that.

Something tells me the file is not a basic file at all:

I’m guessing the file is NOT a realbasic file at all. By the OP’s implied expectation that changing the extension changes the format I’d be willing to bet the file is BASIC from another part (.BAS file, for example, or even a plain .TXT). I don’t even discard that the actual files are Ruby really :slight_smile:

Looking at the file would be the fastest way to figure it out.

Sam: Could you share one of the files with us? You could do so privately if you wish. I could tell you what the code is in a few seconds when looking at it.

It is now, but it used to be for RealBasic and it got sort of hijacked, so REAL changed it to .rbp.

If the files are old enough, they might be .rb and still be “Xojo” (back from the stone age of Xojo’s evolution, right after extensions started being used in Mac OS, more by convention than need).

I have REALbasic project files that appears (I create some) before .rb was the REALbasic file extension. Go figure.

As far as I can recall, there were three project file formats; the first one is incompatible with the third one (Xojo).

I doubt if this is correct. Ruby is invented and launched in 1992 - 1995 with the extension .rb. Visual Basic became CrossBasic in 1998, later renamed as Real Basic. Thats over 5 years later.

I could have it wrong. I wasn’t interested back when the extension started being used and I might have picked the story wrong.

No sweat. More interesting is, in this context: How can a Xojo-app activate a Ruby-script and pick up the results? So full integration of Xojo and Ruby?

It wasn’t always and .rb files may have been from Ruby OR the now very old REAlbasic versions.

Visual Basic was not CrossBasic.
They are totally separate products. VB came from Microsoft. CrossBasic came from Andrew Barry before REAL software was founded.
CrossBasic turned into RealBasic in about 1996/1997 - and Ruby still wan’t all that common then.

Run it in a shell

Visual Basic did not “become” CrossBasic! Andrew Barry said there was some inspiration from VB but that’s about it.

As long as the underlying operating system, of course. Windows is a no-go and between mac and Linux you might want to check for ruby version and path, just in case.

From Tonio Loewald, the “other” guy working with Barry in those days (they did the great Prince of Destruction that, sadly, may be too hard to port, according to discussions I had with Tonio earlier this year, and for which discussions CrossBasic may have come to be):

Realbasic and Visual Basic

It’s a great read, in the sense that the very early history of RealBasic is usually nebulous.

The sad part is that this post comes where, 20 years after original inception, the stupid “It’s based on Visual Basic” crap keeps coming up.

Off-Topic: Prince of Destruction was a marvelous and gorgeous indie RPG from 1995, made by Tonio and Andrew Barry, original author of what would eventually become CrossBasic, RealBasic, RealStudio and then Xojo. Hence Tonio’s twitter account is “@podperson

Hi, just posting to say “Thank you!”

I had some old .rb files from using RealBasic in 2003. (I do not know the version.)

On my Mac today, the OS suspected they were Ruby Source files. I could open them with Xcode, but they were a garbled mess. Similarly if I opened them with text editors.

I found this thread. Upon changing the suffix to “.rbp” instead of “.rb”, the file could open in Xojo. Lots of errors and things that were no longer features, sure, but I was able to see my old notes, classes, and code.

The tricky part is that Xojo’s hierarchy automatically put things in places that I couldn’t find… so I guess I’ll have to learn Xojo if I want to do a deep dive into what on earth I was thinking back in 2003…

Anyway, thank you to all the forum participants who chimed in on this thread.

-D