LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-14-2004, 06:41 AM   #1
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Rep: Reputation: 30
Question 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
 
Old 09-14-2004, 06:52 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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...
 
Old 09-14-2004, 12:16 PM   #3
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
I have to write a GUI, this is my uni project.
 
Old 09-14-2004, 01:37 PM   #4
N43
LQ Newbie
 
Registered: Sep 2004
Location: Germany
Distribution: Slackware
Posts: 13

Rep: Reputation: 0
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
 
Old 09-15-2004, 12:52 PM   #5
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
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
 
Old 09-15-2004, 02:06 PM   #6
N43
LQ Newbie
 
Registered: Sep 2004
Location: Germany
Distribution: Slackware
Posts: 13

Rep: Reputation: 0
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.
 
Old 09-16-2004, 09:40 AM   #7
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
The pascal program that i've tried is just a simple 'hello world':

program prog1_1(input, output);
begin
writeln('Hello World');
end.

Thanks

Last edited by hubabuba; 09-16-2004 at 09:42 AM.
 
Old 09-16-2004, 11:07 AM   #8
N43
LQ Newbie
 
Registered: Sep 2004
Location: Germany
Distribution: Slackware
Posts: 13

Rep: Reputation: 0
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.
 
Old 09-16-2004, 12:49 PM   #9
alexrait1
Member
 
Registered: Jul 2003
Location: Israel
Distribution: slackware current kernel 2.6.9
Posts: 70

Rep: Reputation: 15
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.
 
Old 09-16-2004, 08:56 PM   #10
suowei1979
LQ Newbie
 
Registered: Sep 2004
Location: BeiJing,China
Distribution: Red Hat
Posts: 25

Rep: Reputation: 16
You can use the MiniGUI library
http://www.minigui.org
 
Old 09-17-2004, 07:55 AM   #11
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
Thanks for all your help and the pascal in Kylix is working. I'll probably start learning C++ as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ubuntu GUI] Changing GUI from Gnome to wmaker MangaManiac Linux - Laptop and Netbook 8 05-08-2005 03:17 PM
writing gui wrappers for command line tools Genjix Programming 2 01-10-2005 09:25 AM
Isn't Windows 95 or 98 a better GUI solution for old machines than an old Linux GUI lynchmob09 General 10 04-20-2004 01:24 AM
Writing CD Writing Software starunj Linux - Software 1 12-28-2003 05:05 AM
cd writing software which supports multisession writing jayakrishnan Linux - General 3 03-24-2003 05:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration