Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Application behaves differently in PPC

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-30-2008, 11:01 AM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 164
Default Application behaves differently in PPC

Hi,

I’m running the program in desktop and in PPC in gives error message only in PPC. The message happens with the lost focus of a test box. The message is like :

“An error occurred on sub_txtname_ lostfocus
FormatException
Continue ?”

The code for the sub_txtname_ lostfocus is :

Sub txtname_LostFocus ' Mother entred before child and checking the sex against the mother-number entred.
If txtmn.Text > 0 AND txtmn.Text < txtmemno.text Then
mperid=txthhidm.Text*100 + txtmn.Text ' mperid is a global variable to hold run-time generated mother's perm_pid.
cmd.CommandText="select name,sex,dob,perm_pid from member where perm_pid ="&mperid&""
cmd.ExecuteTable("table15",0)
sexmother = table15.Cell("sex",0)
If sexmother = 1 Then
Msgbox("Wrong mother number '" & table15.cell("name",0) & "' is male, so cannot be mother")
txtmn.Text=""
txtmn.Focus
Return
Else
i=Msgbox ("Is ' " & table15.Cell("name",0) & " ' the mother of ' "& txtname.Text&" ' being entered now?","Mother of Member",cmsgboxyesno,cmsgboxquestion)
If i=cyes Then
cmbsex.Focus
Return
Else
txtmn.Focus
Return
End If
End If
End If
End Sub

I know that only the above lines are not enough to make sense. But expecting help.


regards,
Reply With Quote
  #2 (permalink)  
Old 07-30-2008, 11:37 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Debugging on a PPC is much more difficult than on the desktop. You can find which line is giving the error by putting lines such as "msgbox("line 23") at one or more places in your code or use the Tracer object in my debug library http://www.basic4ppc.com/forum/addit...g-library.html to output trace messages to a separate window. You can then edit and run your code, altering the position and content of these messages, on the device and so get some indication as to what is happening.
Reply With Quote
  #3 (permalink)  
Old 07-30-2008, 06:41 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Another thing you can try is to run your code from the device IDE and see the exact line that raises the error.
Reply With Quote
  #4 (permalink)  
Old 07-31-2008, 03:22 AM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 164
Default

Thank both of you very much.

I got the point generating the error message!

regards,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Application Name kawawong Questions (Windows Mobile) 8 05-18-2012 11:37 AM
My first application Erel Tutorials 16 04-18-2010 08:09 PM
Application behaves differently in Device mozaharul Questions (Windows Mobile) 4 08-07-2008 04:48 AM
Tab control behaves differently on device than desktop AHeroMenKill Questions (Windows Mobile) 2 06-24-2008 10:46 AM
How to identify each pocketpc differently hung Questions (Windows Mobile) 3 07-24-2007 10:05 AM


All times are GMT. The time now is 10:10 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0