LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-03-2005, 03:47 PM   #16
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232

Quote:
Originally Posted by Wim Sturkenboom
Please explain with a little detail
I don't see what is messy about clicking a button resulting in message to be send over a socket or reading data from a socket, parsing it and placing it in some widgets.
It's clear and easy when you think about it... It changes when it comes to implementation. Look at this code: http://www.dci.clrc.ac.uk/Publicatio...kbook/msg.html The code doesn't look very readable, you have positions given in pixels (it doesn't scale well) and so on. Code in GTK or Qt would look much better and will be written faster (when using manual, not when you're proficient in the language, because that's a completely different story), even when you decide not to use a graphical tool to draw the dialog.

The thing with Tcl wasn't designed to be used for writing GUI. You can still see it...
 
Old 12-05-2005, 12:24 AM   #17
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Personally, I don't think anybody will have a problem reading that code.

With regards to the 'hardcoded' positions, I might misunderstand your 'does not scale well' but the window where the widgets are placed in has a fixed size so it's not a real problem.
I don't use place (pack works for me), so not sure about the exact implications on resizing windows.

But thanks for clarifying your view.
 
Old 12-05-2005, 04:11 PM   #18
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
Originally Posted by Wim Sturkenboom
With regards to the 'hardcoded' positions, I might misunderstand your 'does not scale well' but the window where the widgets are placed in has a fixed size so it's not a real problem.
So I'll try to clarify. Scaling when resizing is one thing, but I'm more concerned about a case when you change font used to display the text, for example. When size is changes and all elements use fixed positions, there's huge chance for all the things to make a big mess (eg. long text that doesn't fit the place for it). It's a very big problem also for translations.
 
Old 12-05-2005, 11:39 PM   #19
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
What you say is that if you place a text entry widget of let's say 100 pix wide on a screen and it fits 10 characters of a certain font, change in font will make that it does not fit any longer.
I was under the impression that that is always the case. The tiny bit of GUI programming that I have done under windows also 'suffers' from it (or I've never found a way to prevent it).

So this is not the case when one uses GTK or Qt? Sounds to good to be true. I see problems coming in that case as well, but that will make a long discussion.

Thanks again and let's close the discussion.
 
Old 12-06-2005, 03:15 AM   #20
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
gtk+ has a good tutorial on making a simple hellow world and
2 button program using C its on there site. Hope that helps
i went though it and im a very novice C programmer. Make sure
to have some understanding of OOP tho.
 
Old 12-06-2005, 04:28 PM   #21
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
Originally Posted by Wim Sturkenboom
What you say is that if you place a text entry widget of let's say 100 pix wide on a screen and it fits 10 characters of a certain font, change in font will make that it does not fit any longer.
I was under the impression that that is always the case. The tiny bit of GUI programming that I have done under windows also 'suffers' from it (or I've never found a way to prevent it).

So this is not the case when one uses GTK or Qt? Sounds to good to be true. I see problems coming in that case as well, but that will make a long discussion.
It is true... Of course you can force a window or label or whatever to be 100px wide, but it's very rare to do it this way. A good topic for a new long discussion...
 
Old 12-07-2005, 10:07 AM   #22
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Rep: Reputation: 15
why not try a WebUI
 
Old 12-07-2005, 10:21 AM   #23
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: NetBSD, Void, Debian, Mint, Ubuntu, Puppy, Raspbian
Posts: 3,487

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by Mara
It's clear and easy when you think about it... It changes when it comes to implementation. Look at this code: http://www.dci.clrc.ac.uk/Publicatio...kbook/msg.html The code doesn't look very readable, you have positions given in pixels (it doesn't scale well) and so on. Code in GTK or Qt would look much better and will be written faster (when using manual, not when you're proficient in the language, because that's a completely different story), even when you decide not to use a graphical tool to draw the dialog.

The thing with Tcl wasn't designed to be used for writing GUI. You can still see it...
1. I can read it. Looks simple to me. It's readable to a programmer - if
you spend a little time studying it.

2. GTK code isn't "readable" either.
How would C++ code look I wonder?

3. pack [ button .b -text hello -command exit ]
Is this difficult to read too? Try the equivalent C++ code.

4. Er, well what is TK designed for exactly? (And C++)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GUIs juvestar15 Linux - Newbie 5 09-10-2005 07:15 AM
Is it possible to use other types of GUIs? Nukem DamnSmallLinux 4 02-13-2004 09:32 AM
Different Users - Different GUIs mikefromau Slackware 3 02-06-2004 08:17 AM
any ssh guis? p0 theed Linux - Software 11 11-23-2003 10:23 PM
GUIs Jed Linux - Newbie 1 08-09-2003 05:14 PM

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

All times are GMT -5. The time now is 07:10 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