Can't figure out date

Discuss PocketC for Palm OS (including Desktop Edition)

Postby jermny on Thu Mar 09, 2006 11:58 pm

I have never had a problem seemingly so simple hold me up like this...

I am creating a program to log my military flying activities on the AWACS. When there is a new form, there is a button next to the "Date" field. When this button is activated I was the current date to populate the date text field. However, I seem to keep getting errors on it not being the right variable type.

handler addDateBtn.onselect() {
int p;
string myDate;
myDate = DateConv(p, 18);
if (p!=-1) missionDateField = myDate; // ---- This gives me the error. Says "Cast required between two incompatible types".

Any help would be much appreciated.

Posts: 1
Joined: Thu Mar 09, 2006 11:52 pm

Postby dewey on Tue Mar 14, 2006 3:43 am

I assume that missionDateField is a field, in which case you need to assign the string to it's text property:

missionDateField.text = myDate;
Site Admin
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 4 guests