The time now is Mon 20 May 2013, 12:49
All times are UTC - 4 |
| Author |
Message |
8-bit

Joined: 03 Apr 2007 Posts: 3012 Location: Oregon
|
Posted: 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
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7018 Location: qld
|
Posted: 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
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3012 Location: Oregon
|
Posted: 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
|
|
 |
|
|
|
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.0376s ][ Queries: 12 (0.0044s) ][ GZIP on ] |