So, you've installed Kylix by Borland and you're wondering how to start next.
If you're Delphi progranmmer, you'll probably want to skip this tutorial. This is then probably the first thing you've tried.
Well, let me introduce you to a the fastest way of building applications in Linux.
Yes, indeed Kylix is a RAD(Rapid Application Development) tool, just like its big brother Delphi(under Window$).Further more the code that you write in Kylix can easily be ported to Delphi. So while writing a Linux application, you're also writing one for window$(if you plan it carefully, of course).
Kylix is based on the older language, Pascal. So dusting up that old school book on Turbo Pascal might come in handy.
Kylix is perfect if you want to write desktop apps, database apps, servers and even Web applications for Apache. All is based on QT
Now, let's meet this RAD tool...
Hi, nice to meet you!
Let's get started. Just fire up Kylix. I'm running Kylix3 in KDE under Suse 8.0, so your Images might look a little different if you're running, let's say, Gnome under RedHat
At the top of your windows you'll see the following windows. This is the heart of Kylix. For here you can direct your app building.

You'll also find, on the left, another window: The Object Treeview and Object Inspector. Don't worry, if one of them is not there. You can add more later, like the Project Manager. It'll something like this:

If you just started up Kylix, you'll also find a window called Unit1.pas(wondering where the pas extension comes from?). Kylix has already prepared the most basic code, needed for the application to be run. This is where you will write your code.
And if you press F12, you'll see the interface window of your program. Here you will place you components and build your interface for your users. To switch back to the coding window, press F12 again. Both will look like this :

After this short introduction to the interface, we'll start building our first program.
The early beginning: Hello world
In the main window, you'll a series of tabs on which are the available components. On the standard tab, click on image of the 'OK button' and click again on your now empty window of your application. It'll now look like this

Now double-click the button, you just dropped on your interface. You'll see that Kylix has created an event-handler for the button. An event-handler is a piece of code that will be executed when that event occurs. In this case, that means, that if the button is pushed by the user, the code between "begin" and "end" will execute. Currently there is nothing there yet. So add the following:
ShowMessage('Hello world!');
Your pas file will now look like this :

Don't forget the ; at the end of the line! Every statement in Kylix is ended by ;
Now, we're ready to compile.. watch this'll go fast!
App constructing
Now that we've written the code, it's time to compile it. You'll that the compiling of Kylix Application goes a lot faster than any other compiler. That's why they call it a Rapid Application Development tool.
How we start compiling... well just press F9 or choose it from the menu (Run->Run). Kylix will then start compiling, after that hiding itself and then fire up your application (btw ready for debugging.)
Now click your button and see what happens.
Congratulations, you've just written your first application in Kylix.
Click on the 'ok' button and close the main window of your application (in my case the x in the upper right corner). This will bring you back to Kylix where you can start building even bigger applications.
Good luck!
You can log-in or register for a user account here.
