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 21 Oct 2014, 13:04
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 Posts_count  
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3380
Location: Oregon

PostPosted: Fri 23 Oct 2009, 21:08    Post_subject:  GTKdialog3 program debugging
Sub_title: 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: 7831
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_website 
8-bit


Joined: 03 Apr 2007
Posts: 3380
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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0455s ][ Queries: 11 (0.0065s) ][ GZIP on ]