Writing a GUI
Hi!
Couple of days ago i posted a message about Pascal and Kylix enterprise 3. I was advised not to move dive into Kylix staight away (i'm new to programming), but rather use a simpler pascal compiler. The reason for me wishing to use Kylix is because i need to write a KDE GUI for configuring IP Firewall, DHCP, DNS etc. I don't know which compiler to use because Kylix doesn't seem to like Pascal (it won't compile a simple 'hello world' program). Will it be possible to write a GUI in pascal for configuring the services in Kylix? Will it be possible at all to write the GUI in pascal or do i need to use Delphi? Thanks |
This may seem a bit off the wall ( I haven't seen your orig post), but do you have to write your own GUI at all ie have you looked at Webmin?
Just a thought... |
I have to write a GUI, this is my uni project.
|
You don't need to use Delphi. Kylix is nearly the same as Delphi/CBuilder. Did you really generate a console application? You can't build a console application with the standard project that appears automatically at startup.
@chrism01: here is his other post |
I apologise if my question wasn't clear. I want to know if I can use Pascal to write a GUI configuration tool in Kylix because I couldn't even compile a simple pascal program in Kylix. Do i need to install additional parts/modules for Kylix to enable Pascal support? Is pascal suitable for writing GUI applications for KDE at all, maybe i have to use Delphi or something?
Please help, i'm confused Thanks |
Kylix supports two languages. Delphi/Pascal and C/C++. There are not many differences between Delphi and Kylix but the programming language is the same.
You should use Delphi if you want to build a win32 application and Kylix if you want to build a Linux application. You may post the code of your pascal program that didn't work and I'll have a look on it. |
The pascal program that i've tried is just a simple 'hello world':
program prog1_1(input, output); begin writeln('Hello World'); end. Thanks |
This program should work with Kylix. What does apper when Kylix starts up? There should be a form, an editor window, the object inspector and the object treeview. When you just replace all the code with your code you will get the error message you posted in the other thread. It's simple to get it work. Just create a new console project with File -> New -> Other... or click on the new project icon. Now you can select from different project types. Here you have to select 'Console Application'. You might just see 'Console...'. Double click on it or click on OK after selecting it.
If everything worked you should see the line '{$APPTYPE CONSOLE}' in the editor window. Just replace the code in the editor window with your code. When you run it you won't see any result. Store the project in a directory you want and compile it. Start a terminal-program, change to your directory and run your project. You just have to do this when you are developing a console application. |
You don't need kylix for that. The best way to write gui with kde I think, is to use the QT library. Either in python or in c++.
I wrote something similar for internet sharing configuration: http://kazit.berlios.de/newsite/tmp/...ntershare1.png http://kazit.berlios.de/newsite/tmp/...ntershare2.png I also tried to use wxWindows, but I didn't like it, since it doesn't have a good (intuitive) gui designer like the qt-designer (boa-constructor is awful). Gtk has extensive c interface that's the first (and the crucial) reason to rule it out. again python + qt, the best choice for quick gui. |
You can use the MiniGUI library
http://www.minigui.org |
Thanks for all your help and the pascal in Kylix is working. I'll probably start learning C++ as well.
|
All times are GMT -5. The time now is 12:27 PM. |