Cross-platform code in REALbasic line

In this quick tutorial we will learn how to create a cross-platorm code in REALbasic that will work only with specific platform. Watch it, learn it, enjoy it!

REALbasic and cross-platform code

As you can see it’s very easy to create a multi-platform code that will interact with specific platform. Like I said it was a quick lesson :-)

1
2
3
4
5
6
7
#if TargetWin32
   MsgBox ("You are running MS Windows") //Windows specific code here
#elseif TargetMacOS
   MsgBox ("You are running Mac OS") //Macintosh specific code goes here.
#elseif TargetLinux
   MsgBox ("You are running Linux") //Linux specific code goes right here.
#endIf

Author: Kuba Pawlak

I'm interested in all. Currently working on the development of TUTSPOLIS and I hope that in near feature the project will be successful.

5 Responses to “Cross-platform code in REALbasic”

  1. matt86 says:

    Hello i follow you everyday, could you make a tutorial that explains how to save and read application preferences?

  2. Jakub Pawlak says:

    Hello,

    I will create in near future a tutorial showing how to save and read application preferences using REALbasic.

    Regards
    Jakub

  3. matt86 says:

    ok, thanks!

  4. Bob Keeney says:

    There is some source code at http://www.thezaz.com/opensource/realbasic/mda/ for the Multiple Document Application that has some nice code for preferences that works on all platforms. It’s not using platform specific preferences but it works well.

  5. matt86 says:

    thanks Bob Keeney, i try this code and work all fine!

Leave a Reply

Copyrights (c) TUTSPOLIS | Powered by Wordpress MU | Inspired at Elegant Themes designed by qbap (HTML5 & CSS3)