Thanks for that i understand you but where exactly would i do this line in my view fn, or db??? sorry but i'm just getting into this stuff now thanks
-----Original Message----- From: Joe [mailto:[EMAIL PROTECTED]] Sent: 27 March 2002 15:10 To: Palm Developer Forum Subject: RE: fldInsert Problem... --- Mark Kenny <[EMAIL PROTECTED]> wrote: > i get errors compiling saying stuff about "implicit conversion > from 'ModuleType' to 'const char *'" > ... > > I'm using: > > > > FldInsert(fldP, recP->Type, StrLen(recP->Type)); > > > > This is flagging errors, it works fine for errands. - and - > typedef enum ModuleType{Lecture, Tutorial, Lab} ModuleType; > typedef struct ErrandDB { > Weekday day; /* 0 through 6 ... */ > Char errands[257]; /* Free form text ... */ > ModuleType Type; > } ErrandDB; The compiler is telling you that it expects the second argument to FldInsert to be 'const char *' and you passed in something that is type 'ModuleType', which is an enum. The compiler can't convert an enum into a string -- you have to do that yourself. So, if you want to insert the word "Lecture", "Tutorial", or "Lab" then you have to look at the ModuleType and use it to determine which word to insert. You could use something like: Char * names[3] = {"Lecture", "Tutorial", "Lab"}; // ... FldInsert(fldP, names[recP->Type], StrLen(names[recP->Type])); __________________________________________________ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards� http://movies.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
