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 Tue 30 Sep 2014, 02:15
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GTKdialog3 program debugging
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Fri 23 Oct 2009, 21:08    Post subject:  GTKdialog3 program debugging
Subject description: What I have done to check a program for bugs.
 

When I create a GTKdialog script, I actually have the script open in Geany.
I have saved said script to a directory and open a terminal in that directory.
I then run the script from the terminal.
Errors are echoed back to the terminal when the script runs and if I see a problem, I exit the program/script , edit it in Geany, save it, and run again.
I did find one thing one has to watch for.
If a called external program run from the script needs some parameters,
look out for those that are also parameters for GTK.
As an example, when running mkdosfs -c -I /dev/sde
the -c is interpreted by GTK as it's own and is not passed to the external program. The same could be said for -f.

Also, in between versions of Puppy, paths to executables seem to have changed and some supporting programs seem to have been removed.
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7805
Location: qld

PostPosted: Fri 23 Oct 2009, 21:33    Post subject:  

Quote:
look out for those that are also parameters for GTK.
As an example, when running mkdosfs -c -I /dev/sde
the -c is interpreted by GTK as it's own and is not passed to the external program. The same could be said for -f.


Does it help if you surround the call with double quotes? Of course these need to be escaped with a back slash.

I always use a functions file, no such problems.

Cheers

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Fri 23 Oct 2009, 22:53    Post subject:  

Well, I had one external program that echoed it's name and version when It started. The version was being interpreted as a destination and I got an error showing the version with a file not found.
I got around this by putting the command with the options I wanted in a variable and running the variable.
For example:
CHKBOX1=mkdosfs -v -c -I
#Other variables are already set up with other parameters.
if condition_met
$CHKBOX1 $PARM1 $PARM2
else
Display message or do another call
fi

The variables are run as a command in their entirety.
But in my two Puppy test cases running the command in a terminal,
in Puppy 4.2.1, if you run #mkdosfs -c -v -I /dev/sde
You get a diskcheck before the format signified by the -c
In Puppy 4.3.1 the -c is ignored.
I assume this since you get feedback showing a diskcheck running in Puppy 4.2.1 and you do not in Puppy 4.3.1
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0428s ][ Queries: 12 (0.0034s) ][ GZIP on ]