Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 31 Jul 2014, 15:49
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Can't find GOOD tutorial for gtkDialog, indepth examples.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Wed 08 Mar 2006, 01:27    Post subject:  Can't find GOOD tutorial for gtkDialog, indepth examples.  

The gtkDialog site's tutorial doesn't show anything about the HTML code I'm using.
I need examples of how to:

absolutely size & position widgets, & windows - at GUI start & in running code
call bash code & functions; <action>(word that calls function):AddClient</action>
overlay widgets on top of other widgets & set which is on top
complete examples of useing the file dialog & other premade dialogs

These are the equivalents of VB's; properties, events, & methods.
Back to top
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Wed 08 Mar 2006, 01:58    Post subject:  

First the bad news:
gtkdialog is not as functional as the web page makes you believe. I tried with infructuose results to make it work as expected.

It was a real nightmare to make the puppy networking wizard look the way it looks. I am seriously thinking on changing it to tcl/tk.

Actually I found version 0.59.8 to be worst than 0.58.8 (both included in puppy).

Second the good news:
I found many workarounds for the gtkdialog shortcomings while working on the networking wizard.

If you have specific questions I will be glad to help you.

Oh, and just to clarify: the gtkdialog window definition is not HTML or even XML. The markup language may be simmilar but its definetivelly different.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Wed 08 Mar 2006, 02:32    Post subject:  

I can't say I'm suprised, HTML is a stupidly conceived language (and this is the best that MIT's best could do?), & if gtkDialog like HTML pages can't control object position & Z order (top placement), it isn't fit for full blown applications.
Still... it should do fine for something as simple as I'm doing.

So I assume then gtkDialog can not position widgets other than <vbox> & <hbox>?

How to call specific sections of code (use if ... fi somehow?), & call functions?
Start FileDialogBox with a given path, & then get the Path+FileName return?
I may need help getting the table widget to work, I haven't got that far yet.

Observation; Gnome has advanced programming languages, mono (M$ DotNet clone), & Glade (visual IDE for gtkDialog).
This might be a good reason to get it running on Puppy, & there may be other good reasons for it.
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 08 Mar 2006, 08:06    Post subject:  

Gtkdialog is "just" a small set of easy to use Widgets for Shell-scripters.

For more influence,you need a "real" programming-language with bindings to Gtk itself.
This will allow to alter every widget in Detail, you even can add your own events (like replacing the mouseover-action of a button with own functions).

Puppy has wxbasic and Gtkperl.
As both were not designed for Puppy, there is no specificdocumentation available, just the general one.

Gtk-Perl
http://www.murga.org/~puppy/viewtopic.php?t=4193
http://personal.riverusers.com/~swilhelm/gtkperl-tutorial/

wxperl (not yet available, will try to add it)
http://wxperl.sourceforge.net

wxbasic
http://www.murga.org/~puppy/viewtopic.php?t=2339
http://wxbasic.de

Mark
Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Wed 08 Mar 2006, 15:03    Post subject:  

I will try again to clarify some obvious confusions:
sunburnt wrote:
I can't say I'm suprised, HTML is a stupidly conceived language
Again. What does HTML have to do with this? Answer: Nothing.

sunburnt wrote:
it isn't fit for full blown applications.
Still
Well, it isn't meant for full blown applications.

sunburnt wrote:
Gnome has advanced programming languages, mono (M$ DotNet clone), & Glade (visual IDE for gtkDialog).
I think you are confusing GtkDialog with Gtkdialog may the name be the same but they are different things.

The former is a library to write full blown applications. the latter is ".. a small utility for fast and easy GUI building".

Quote:
This might be a good reason to get it running on Puppy, & there may be other good reasons for it.
You don't need Gnome to run GTK or GTK+. Actually there are apps in puppy that use the GTK, for example gplaycd.

Having clarified that HTML has nothing to do with GTKdialog or gtkdialog or GtkDialog or any variation. I would like to take exception to your contempt of HTML.

Dynamic and relative possitioning is what allows well designed pages to show correctly in a variety of different devices. From web broswers in tiny screens to devices that allow blind people to listen to web sites to text based browsers to different resolution on desktop screens.

Actually it is my personal opinion that static positioning usually sucks. Actually I would say that you should have very good reasons for designing an application with static positioning.

A good example of this is: Some applications have the 'file open' dialog with static positioning. Other applications allow you to resize the dialog which repositions the buttons and allows expanding the file list. You tell me which one you prefer.

Another example: Have you ever been frustrated trying to read a web site designed specifically for 800x600 with a monitor in a higher or lower resolution? With a higher resolution even maximizing the browser keeps the content aligned to the old margins while half of your screen is unused. With a lower resolution, you need to scroll horizontally.

Well, you get the idea.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Thu 09 Mar 2006, 17:21    Post subject:  

Still basically unanswered, is there a good tutorial on the concepts somewhere? I've just gotten the hang of using xmessage properly and would really like to create some better looking wizards and such. I'd be more than willing to try wxbasic too but don't really know where to start, other than examining the scripts already in Puppy.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 09 Mar 2006, 17:29    Post subject:  

wxbasic has no tutorial, just Data-sheets and lots of examples in the wxbasic-forum.
So Gtk-perl might be better, as the mentioned tutorial is very good, and Perl+Gtkperl is just 2.3 MB.

For Puppybasic there is a mini-tutorial here:

http://noforum.de/wxBasicscript-documentation/wxbasicscript/index.htm
It still uses the old, depreciated name wxbasicscript.

Mark
Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Thu 09 Mar 2006, 18:21    Post subject:  

Not a tutorial, but if you have a look at the network wizard you'll see how to call specific functions based on user actions.
_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
jmarsden


Joined: 31 Dec 2005
Posts: 263
Location: California, USA

PostPosted: Thu 09 Mar 2006, 18:39    Post subject:  

This whole thread seems really confusing or confused. Or I'm missing the point? Overall it sounds as though sunburnt asked a question at too low a level for what he really wanted, and so the resulting discussion hasn't been all that coherent or easy to follow.

Puppy contains a perfectly good scripting language with GUI capabilities: Tcl/Tk. Given that situation, and the general "keep it small" Puppy approach, why would we be working at either making various little dialog tools do more than they were ever really designed for, or using other less portable less common scripting systems and languages such as wxbasic?

sunburnt: Have you tried learning and using Tcl/Tk? There are multiple online tutorials and books for those who want to learn about using it. Pointers to some of them have been posted in these forums. A really simple tutorial for gently getting started is at http://www.ardenstone.com/projects/seniorsem/tcl/ . One old but good starting point for other resources is probably http://hegel.ittc.ku.edu/topics/tcltk/ or you can try http://www.freeprogrammingresources.com/tcl.html . If you prefer a printed paper book, try http://www.beedub.com/book/ (read sample chapters, then decide if you want to buy the paper book). This book (by Welch) is IMO the "best" Tcl/Tk book out there.

Summary: If you are looking for a useful (and free and open source and portable!) scripting language in Puppy that can allow the creation and use of GUI interfaces, I suggest that you first try the one that Puppy already includes (Tcl/Tk), before you resort to messy over-use of gtkdialog and similar shell script addons, or to other add-on scripting systems and languages that are not native to Puppy, which would mean that the results of your scripting labours would be less easily usable by the rest of the Puppy user community.

Jonathan
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 09 Mar 2006, 19:50    Post subject:  

wxBasic is portable, it runs in Windoze, Linux and MacOSX.
You could compile it on almost any system supporting wxWidgets.

I tried Tcl/Tk some years ago,and found it wasthe pure Horror.
But at that time, there was no good documentation yet, so today I might judge different.

wxBasic has the advantage, that people with knowledge in Visual Basic just have to learn the new wxWidgets-classes, but still can use "Basic".

But the lack of documentation is an argument against it.
So I suggested Gtkperl, that is small too, OpenSource, "native" (Gtk), and (just imho) easier than Tcl/Tk. But that is a very individual view of course.

Mark
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Fri 10 Mar 2006, 02:17    Post subject:  

Many thanks to one and all, the front end I have in mind for LanPuppy isn't demanding & is rather simple.
A TabPanel with specific management functions on each tab.

Users OnLine; a table showing users logged in, & [User Info], [Message User], [Kick User] buttons.
User Accounts; a table showing all users, [Add Users], [Del. User], [User Info], [Message User] buttons.
Client Accounts; a table showing computers allowed to connect, [Add Client], [Delete Client] buttons.
LanPup Setup; options for: login or no-login, allow user to use a USB flash drive, allow root login from client, & others.

I think that this can be done with only gtkdialog & bash script, it's just not that hard an app. to do.
Users will be handled by Samba (I have more reading to do), & clients will be bash modifying the dhcpd.conf file.
LanPup Setup will be bash reading & writing the settings in the lanpup.cfg file & changing LanPuppy startup scripts.

I've looked at tcl/tk, I understood it, but never did anything with it, it'd probably be much better for larger apps.

Puppy Basic I understood immediately, & it seems it can have full use of wxBasic, & other resources as well.
Hmmmm... now to interperet VB syntax to gtkdialog to complete the picture, but with Gnome's Glade it's not needed.

I think I've figured out calling bash scripts, but I'm still vauge on the file dialog box use (open with a given path).
I still don't know if <hbox><vbox> are the only way to position widgets, & if <width><height> are only for some widgets.
LanAdmin_SS.png
 Description   
 Filesize   7.98 KB
 Viewed   626 Time(s)

LanAdmin_SS.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0831s ][ Queries: 12 (0.0050s) ][ GZIP on ]