Re: How do I update memory
Hi Jeff, I think you have to join what Palm calls the development Provider Solution (?). When Palm accept you as a member, it takes a while for them to send you the password. You use your email account (that you register with them) and the password they give you to log in. tnn Heather Tufts wrote: > The updates are embedded in the 3.5 SDK and the Update 1 to the 3.5 SDK. > Also, there are a couple of debugger plugins hosted on the Metrowerks > Website which you can download for Mac or Windows at > ftp://palm:[EMAIL PROTECTED]. Those are all the public updates at > this point. This update is password protected - which user name and password should I use? (I did register my copy of Metrowerks.) Thanks! - Jeff --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
RE: Modules or projects? -> multi segments
I don't know how you do this in other compiler. With CW, it is very easy, just follow what this article says: http://oasis.palm.com/dev/kb/papers/1469.cfm hope this help. tnn >> You just need to enable the multiple segment, and the >> compiler will spilt the code to segments automatically! >Not exactly. Once you convert your project to a multi-segment application, >it is your job to determine which files go in which segment in order to work >out the sizes and appropriate linkage. __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
re: Bitmap dimension
Hi there, > Using CW (IDE 4.01) how can I define the dimension of the bitmap? > I can see Default PICT in the box but it is locked. Click on the bitmap window, then go to Contructor menu -> option ->set image size -> you can change the size... tnn __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
References 4.0, (was Re: Transferring a prc)
hello everyone, >You should instead use ExgDbRead, part of the exchange manager. This isn't >documented in the 3.5 documentation, but its described in the 4.0 Reference >PDF, and it works on OS versions back to 3.0. It will let you instantiate a >database on the device from a memory buffer or from some other input stream, >using a callback to get the bytes of the PDB or PRC file. Very neat. Please tell me how I can get the 4.0 Reference PDF. I check on Palm site again and they only have 3.5 Reference. Thanks a lot. tnn __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Please help with ExgDBRead()
Hi everybody, I read PRC file or PBD file from my device that connects to Palm thru the serial port, put the data in a file stream. Before, I use the data manager functions create the database in Palm it works fine. I think I can not use DmCreateDatabaseFromImage() because the database is to big (>64K) to fit in a buffer. Now, I try to use ExgDBRead() to read data from a file stream to create a database in Palm and I always get err = 259 (MemErrInvalidParam) return from ExgDBRead(). Please check for me to see what I did wrong. For now, I delete the old DB before calling exgDBRead(), I do not use the DeleteOldDB() call back function yet. Thank you so much for any helps or suggestions on how to do this. Tnn // global variable UIn32 totalBytesRead = 0; /***/ /* FUNCTION:ReadFromFile */ /* */ /* DESCRIPTION: Call back function for exchange manager function */ /* ExgDBRead to read data from file streaming, put in RAM */ /* */ /* PARAMETERS: dataP - bufffer containing data to put in file */ /* sizeP - number of bytes to put in file */ /* userDataP - application defined buffer for context */ /* (holds exgSocket when using ExgManager */ /* */ /* RETURNED:non_zero if error */ /* */ /* REVISION HISTORY: */ /* */ /***/ static Err ReadFromFile(void* dataP, UInt32* sizeP, void* userDataP) { Err err = 0; if (totalBytesRead) { if (*sizeP > totalBytesRead) *sizeP = totalBytesRead; FileRead((FileHand)userDataP, (void *)dataP,(Int32) *sizeP, 1,&err); ErrFatalDisplayIf(err," FileRead() error"); totalBytesRead -= *sizeP; } return (err); } Err CopyDBToPalm(FileHand fileH,UInt32 size, Int16 whichCard) { Err err; LocalID dbID; //... // delete the old db if there is one. totalBytesRead = size; err = ExgDBRead(ReadFromFile, DeleteOldDB,(void *)fileH, &dbID, (UInt16)whichCard, false, true); // err = 259 return from ExgDBRead() totalBytesRead = 0; //... //... return (err); } __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re: Please help with ExgDBRead()
Thank you Danny for helping me with this problem. I still have the same error, please help me. >This function reads from a file into a buffer provided by the caller. Is "the caller" ExgDBRead()? So don't I have to allocate memory for this buffer? If I have to provide the buffer, how big do I have to allocate it? >Your comments are contradictory. Also, the userDataP field is being used to hold the >file >stream, not a socket. Yes, my mistake of cut and paste :( This is the code I modify as Danny told me to do, Error checking is just for debugging. // call back function static Err ReadFromFile(void* dataP, UInt32* sizeP, void* userDataP) { Err err = 0; Char tempstr[32]; if (totalBytesLeft) { if (*sizeP > totalBytesLeft) *sizeP = totalBytesLeft; *sizeP = FileRead((FileHand)userDataP, (void *)dataP, 1,(Int32) *sizeP,&err); if (err) { StrPrintF(tempstr," FileRead() error = %d",err); ErrFatalDisplayIf(true,tempstr); } totalBytesLeft -= *sizeP; if (*sizeP == 0) ErrFatalDisplayIf(totalBytesLeft," More data when *sizeP = 0"); } ErrFatalDisplayIf((err == memErrInvalidParam)," call back return memErrInvalidParam"); return (err); } Err CopyDBToPalm(FileHand fileH,UInt32 size, Int16 whichCard) { //... // delete old DB if needed // totalBytesLeft = size; FileTell(fileH,(Int32 *) &filesize,&err); totalBytesLeft = filesize; err = ExgDBRead(ReadFromFile, DeleteOldDB,(void *)fileH, &dbID, (UInt16)whichCard, false, true); if (err) { StrPrintF(tempstr," ExgDBRead() error = %d",err); ErrFatalDisplayIf(true,tempstr); } //... return (err); } In the callback function ReadFromFile(): I don't really understand the callback function, >If you're asked to get n bytes, where n > 0, but you're out of data, you >need to indicate that by zeroing *sizeP. How do I know that I am out of data in the callback function with FileRead()? I don't have any control of the input parameters "dataP" and "sizeP" in the callback function, do I? FileRead() hits EOF and return error first or return *sizeP = 0 first? In the CopyDBToPalm() function: The input parameter "size" is taken from the YModem transfer thru serial port. It is the exact size of the PRC or PBD on PC. "filesize" that I get back from FileTell() is always greater than "size". Why are they different? I suppose that is the header of file streaming in Palm. Should I read "filesize" bytes or just "size" in the callback function? Before, I assign totalBytesLeft = size; Now, I assign totalBytesLeft = filesize; Either way, I get the error after ExgDBRead(), " ExgDBRead() error = 259" (memErrInvalidParam). Do I make mistake when I use ExgDBRead() and the callback function? Is the data I get from file stream invalid, so I can not create a database from it? What can I try to fix this bug? Thanks in advances. tnn __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:Doubt
Hi there, Any sample database programs I read have code to load table and display records in table. There are a lot of code, LoadTable(), LoadRecord(), DrawRecord(), UpdateScroller(),etc... I use CW, in the contructor, I drop a table in the form, start with the repeat buttons(and later on the scroll bar), follow the sample code, cut and paste and some modification to make it work. You can look at the tutorial (memopad application) or samples in the CDs that comes with most of the Palm books. tnn __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:Hexidecimal sysmbols for buttons
Hi there, >I am using CW6. >I am trying to set a button to an arrow pointing left and right. >In constructor i have put a button on my form and set the font to symbol. >In the label i have ticked to us hexidecimal. >The Hexideciaml number is 0x0206D or something like that, i have a list of >these , but constructor will not accept any of them, i have also tried >putting in the palm numbers for example 026, but constructor cannot find the >symbol for arrows. This is what I would do, in constructor, put a button. In the property of that button, you can choose Font to be "Symbol" or "Symbol11". Check the check box for hex. Then, delete what ever in that line (as you said 0206 or st, st). If you choose "Symbol", put in "03" for left arrow, "04" for right arrow. If you choose "Symbol11", put in "02" for left arrow, "03" for right arrow. I like symbol11 arrows better. Hope that help. tnn __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:Reading in a byte array from the database
>Each record on my database is 3000 bytes. Basically it consists of 100 >smaller records bunched up. >When using a tool like insider to check the record size, it is 3000 >In my code when I access the row, I cast it to a CharPtr. >When I do StrLen of this I get only 500. >Should I be casting this to a CharPtr?? All I want to do is search for a >delimitor and chop up the record I don't know if what I say makes any sense to you... Why do you want to keep a fixed bytes (3000) in each record. I learn pack, unpack from the sample and do it that way when I work with database. The delimitor is '\0' (nullChr). What is the structure of your record? If StrLen() gives you 500, casting to CharPtr would end up give you the same thing. tnn __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:Avoiding e-mail from these forums
How do I stop these forums from e-mailing me every post, while retaining my ability to browse and post to them via my news reader? Palm has made these newsgroups so complicated. Why can't they be like everyone else and just let people access them normally? The second question is rhetorical. Thanks, Dave Hi there, What I did is I unsubscribe myself from the group. So, no more email. If you just want to read the email, you can read them in escribe.com. If you want to post email to the group, subscribe again. This time, check for newsgroup reader (or st), not check for receive emails. Then, there will be no email from this group to your mailbox. tnn __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:database type question
Hi Shawn Hutchinson, >hey everyone, >i'm a little unclear about the use of the database type parameter, >especially in regards to the CreateDatabase() method SystemMgr.rh (.rh, not .h) has all the pre define for database types. type is UInt32 (can be 4 characters), type of 4 lowercase character is deserved for Palm. The application program type is 'appl'. I use 'Data', 'DATA', 'dATA', etc. for my record databases and make up a type for other database. Once, I try to create a record database with type other than data and it works fine. I don't think the type you make up for your program (with at least 1 uppercase letter) would hurt the program at all. May be I am wrong. :( tnn __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
How to truncate a long categoryname that overwrites the form title?
Hi everybody, In my program, the database is display in a table with the popup trigger and the category. When the user edits or renames a caterogy and the category name is long enough, it overwrites the title of the form. Making the title shorter is not an option for me because my client wants that long form title. I try to use CategoryTruncateName() but it doesn't work. I call CategoryTruncateName() right after CategorySelect(). When I debug the program, right when I get out of CategorySelect(), the long name's already overwritten the title. // these are called when user tab on the popup trigger //... categoryEdited = CategorySelect (listDB, frmP, ctlID, lstID, false, &category, categoryName, 1, categoryDefaultEditCategoryString); CategoryTruncateName(categoryName,CATNAMELENGTH); // truncate to 40 pixels so it doesn't overwrite the form title //... Please tell me where I have to call CategoryTruncateName() or what else I can do to fix this problem. Thanks so much. tnn __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Convert to UInt32 format
Hi Anuradha J, >str = "abcd"; >now I want to convert the value in str to UInt32 format such that the >value in number is >number = 'abcd'; I do this: number = (UInt32)str[0] << 24 | (UInt32)str[1] << 16 | (UInt32)str[2] << 8 | (UInt32)str[3]; works for me :) tnn __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:How long do Palm intend to carry on with the Palm V(x)
Hi, >Does anyone out there know how long the Palm V and Vx series will be >available ?, now that the m500,m505 have come out. Palm has a lot of Vx that they can't sell and if m50X come out, people may not want to buy Vx anymore. >I have some hardware in a >Palm V modem cradle, and this will have to be redesigned into a new m500 >series cradle. Also does anyone know if moving hardware from a Palm V modem >cradle to a m500 modem cradle is a simple re-casing and new connector job, >or has the interface changed significanlty ?? My boss got some modem cases for m500 series. I think it connects to the palm by the serial port, the same interface as older palm models. So, I think you would just do "simple re-casing and new connector job" or re design if you want to use the USB. And may be you just do it once because the new models share the same plug in case. BTW, I am not the hardware guy, tell me that I am wrong :((( tnn __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re: multiple database
Hi, >Can anyone help, i have multiple databases, i can get one of them to work >o.k, but am unsure how to declaire the 2nd one. You can declare (or open or create) the databases at the beginning, one after the other. After you are done, you close (or close then delete) them one by one. The only thing is each database should has different data type ('Data', 'DATA', 'datA', or st else you make up) and different database names. I use the same creator ID for all of them. There is a lot of threads about this issues. (Search for multiple database) Are you going to slip your PilotMain()? Something likes: static UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) { Err error; error = RomVersionCompatible (launchFlags); if (error) return (error); switch (cmd) { case sysAppLaunchCmdNormalLaunch: error = AppStart(); if (error) return error; FrmGotoForm(StartUpForm); AppEventLoop(); AppStop(); break; default: break; } return errNone; // Return 0 } Then you can Open the databases in AppStart(), Close the databases and all the forms in AppStop() I use global variables for the database references and use them through out the program. Hope it helps. tnn __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
RE: Multiple DB
Hi Adam, From: adam davies > if(((error=DmCreateDatabase(0,"1DB-T018", 'T018','hosp',false))!=dmErrAlreadyExists)&&(error!=0)) > if(((error=DmCreateDatabase(0,"2DB-T018", 'T018', 'hosp',false))!=dmErrAlreadyExists)&&(error!=0)) I think that: 1. The database type you use here is 'hosp', may be you don't want to use the databasetype with all the lowercase letters, those are reserved for Palm. ANW, your program still works if you use it. 2. You use the same creator ID ('T018') and databadatype ('hosp') for both databases. I tried this before and my program didn't even run. When I change to different creatorID OR different databasetype (prefer), then it works. tnn __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Hw ExgDBRead() works? please help.
Hi everybody, Please tell me what I did wrong. I read a database file (PRC or PDB) from PC, put in a file stream. If I use MemPtrNew() to allocate buffer and create database using DmCreateDatabaseFromImage(), my database is OK. That means the data in file stream is good. I don't know how big the database would be so I can't actually use MemPtrNew(). If I use ExgDmRead() to create the database, my last record in the new database is corrupted. I am asking about this problem before and ExgDBWrite works for me but I can not make ExgDBRead() working at all. Thanks in advances. tnn This is my code for DmCreateDatabaseFromImage() Char *buff; // ... buff = (Char *) MemPtrNew(size); // check for error of MemPtrNew() // ... FileRead(fileH, buff, 1,(Int32) size,&err); err = DmCreateDatabaseFromImage(buff); MemPtrFree(buff); // this database is OK !!! // And this is my code for ExgDBRead. UInt32 fileSize = 0; // callback function static Err ReadFromFile(void* dataP, UInt32* sizeP, void* userDataP) { Err err = 0; UInt32 bytesLeft; if (*sizeP > fileSize) *sizeP = fileSize; *sizeP = FileRead((FileHand)userDataP, (void *)dataP, 1,(Int32) *sizeP,&err); bytesLeft = fileSize - *sizeP; if (!bytesLeft) *sizeP = 0; // by returning 0 in *sizeP, ExgDBRead () will stop reading else fileSize = bytesLeft; return (err); } static Boolean DeleteOldDB(const Char *dbName, UInt16 dbVersion, UInt16 whichCard, LocalID dbID, void* userDataP) { return (true); } Err CreateDBFromFile(FileHand fileH,UInt32 size) { // ... LocalID dbID; UInt16 whichCard = 0; // ... for now, I look for the duplicate and delete it to make the DeleteOldDB() callback function simple // ... delete database if there is duplicated // ... fileSize = size; err = ExgDBRead(ReadFromFile, DeleteOldDB,(void *)fileH, &dbID, whichCard, false, true); // err return from ExgDBRead() is 0, //... return (err); } __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
re:Downloading PQAs onto device with File API
Hi there, >... now using an application i make a connection to the server, > and get the pqa on my palm. i store using the FileWrite api as a .pqa In Palm data is stores different than in PC. In Palm, a .pqa file is stored as a resource database with type "pqa ". You can use ExgDBRead() to store the .pqa as resource database in Palm. You can use the callback function to read data from the receiving buffer or from the file stream and the callback function to delete the old .pqa if it exists. At first, if your .pqa is small (that dynamic allocation works), you can try to use DmCreateDatabaseFromImage() to creat the database, something similar to this: // open the file stream, rewind if needed... // this is my real code, works for me... buff = (Char *) MemPtrNew(filesize); FileRead(fileH, buff, 1,filesize,&err); if (!err) { err = DmCreateDatabaseFromImage(buff); } MemPtrFree(buff); Hope this helps. tnn __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
why my form shows up as transparent form?Please help.
Hello everyone, In my program, I use form A to display a 160x160 4 bit gray scale bitmap. At first, I use an alert form to warn user about something and the program works OK. Now, I use a custom form (form B) that warns user about something and this form will disappear if user taps OK button (the same as alert form) or after displaying in 10seconds. Form B is 160x80, not a modal form. I use FrmPopupForm(FormBID) and FrmReturnToForm(FormAID)... When I run my program on POSE, it works just fine. When I run it on m100, form B looks like transparent. Part of the bitmap on form A is showed inside form B. Why does that happen? For now, I do a quick fix by erase the area of the screen before calling FrmPopupForm() and it seems to me that it is too slow, I can see the rectangle is erased before Form B shows up. Is there other way to fix this problem? Thanks for any help or suggestion. tnn __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re: why my form shows up as transparent form?Please help.
Thanks for your mails. Hi jacky, > Did you set the save behind attribute to true? No, I do not set the save behind in contructor of Form B. I think this is set for saving the content of form A, I do call FrmDrawForm(FormAID) in frmUpdateEvent. Form A works OK. Form B shows part of the bitmap of form A ??? Hi Dave, > Are you drawing anything to the screen before you call FrmInitForm for B? > If so, don't. No, I draw the border and set the text in my label after FrmDrawForm(). What else could I do wrong? This is my Original Message, in case somebody can help me. > Hello everyone, > > In my program, I use form A to display a 160x160 4 bit gray scale bitmap. > At first, I use an alert form to warn user about something and the program works OK. > Now, I use a custom form (form B) that warns user about something and this form will >disappear if > user taps OK button (the same as alert form) or after displaying in 10seconds. Form >B is 160x80, > not a modal form. I use FrmPopupForm(FormBID) and FrmReturnToForm(FormAID)... > > When I run my program on POSE, it works just fine. When I run it on m100, form B >looks like > transparent. Part of the bitmap on form A is showed inside form B. Why does that >happen? > > For now, I do a quick fix by erase the area of the screen before calling >FrmPopupForm() and it > seems to me that it is too slow, I can see the rectangle is erased before Form B >shows up. Is > there other way to fix this problem? > > Thanks for any help or suggestion. > > tnn __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Version in Launcher->Info->Version/Records/Size?
Hi everybody, How can I get the version that shows in Launcher->Info->Version/Records/Size? I read the API and search the archives, somebody mentions that the version that we get from DmDatabasaInfo() and the version that Palm OS shows in Launcher->Menu->Info->Version/Records/Size are difference. I am using CW R6. There are 2 places that I can put in the version. - In CW, I can put in the version (...setting->Linker->PalmRez Post Linker->version) This version can be retrieved by DmDatabaseInfo(). - In the contructor, I can put the version in the "Version String" field (next to "Application Icon Name"). This Version String value is what PalmOS shows in the launcher. I try to make them the same but I can't. In CW, the version in UInt16, when I put the value "1.01" in, it is saved as "101" and DmDatabaseInfo() give me the value 101. My program lists all the databases (record db or resource db) in the Palm memory. The versions of most of them (from DmDabaseInfo()) are "1.00" and are different from what are shows in the launcher. Can anybody help me please. Thank you so much. tnn __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Does a Palm program with color work the same on Palm IIIc and SonyN710C?
Hi all, I try to draw an 8bit 160x160 bitmap on Palm. The bitmap is read from a PDB file. When I run my program on Palm IIIc, the bitmap displays nicely. When I run the same progam on Sony Clie N710C, it doesn't look right ??? If I set high resolution, the bitmap display at the top left corner of the screen and still looks bad. If I set the program to display that 8bit bitmap as 4bit gray scale, both Palm IIIc and Sony work fine. The bitmap looks the same on both PDAs. Does anybody have a similar problem? Does Sony take a bitmap with color table? If not, how can I show a color bitmap in Sony? Thanks for any help. tnn __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re: FldSetTextHandle()
Hi Micheal, This is what I use, hope that helps, remember to free the memory when you go to the next form. tnn /***/ /* */ /* FUNCTION:SetFieldText, taken from utils.c in SimpleScan example*/ /* */ /* DESCRIPTION:Perform all necessary actions to set a Field control's */ /* text and redraw, if necesary. Allocates a text handle.*/ /* */ /* */ /* PARAMETERS: nFieldID(in) - The resource ID of the field. */ /* pSrcText(in) - The text to copy into field.*/ /* nMaxSize(in) - Max size that the field can grow. */ /* bRedraw(in) - Should the text be redrawn now? */ /* */ /* RETURNED: None */ /* */ /***/ void SetFieldText(UInt nFieldID, const CharPtr pSrcText, Int nMaxSize, Boolean bRedraw) { VoidHand hFieldText; CharPtr pFieldText; FieldPtr pField; Int16 len; UInt32 curSize; pField = (FieldPtr)GetObjectPtr(nFieldID); if(!pField) return; hFieldText = FldGetTextHandle(pField); if(!hFieldText) { hFieldText = MemHandleNew(nMaxSize); // If already allocated, make sure it can handle nMaxSize already. // If not, realloc that buffer } else { curSize = MemHandleSize(hFieldText); if(curSize < nMaxSize) MemHandleResize(hFieldText, nMaxSize); } if( hFieldText ) { len = StrLen(pSrcText); pFieldText = (CharPtr)MemHandleLock(hFieldText); if (len > nMaxSize) { StrNCopy( pFieldText, pSrcText, nMaxSize-1); pFieldText[nMaxSize-1] = nullChr; } else { StrCopy(pFieldText, pSrcText); } MemHandleUnlock(hFieldText); FldSetTextHandle(pField,(Handle)hFieldText); FldSetTextAllocatedSize(pField,nMaxSize); FldSetMaxChars( pField, nMaxSize-1); FldRecalculateField( pField, true ); if(bRedraw) FldDrawField( pField ); } } /***/ /* FUNCTION:FreeFieldHandle, taken from SimpleScan example*/ /* DESCRIPTION: Free the memory associated with the text field on the */ /* current Palm Form */ /* PARAMETERS: field id */ /* RETURNED:nothing */ /* */ /***/ void FreeFieldText(int objectID) { FieldPtr pField; VoidHand textH; pField = (FieldPtr)GetObjectPtr(objectID); textH = FldGetTextHandle(pField); if (textH){ FldSetTextHandle(pField, 0); MemHandleFree(textH); } } --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Highlight a button
Hi everyone, I have a button in my form. Before, I use ctlSelectEvent to catch the pen tab on the button and it works just fine. Now, I need to check when the pen touches the button and when the pen is lifted (inside and outside the bound of the button) I have tried to use penDownEvent, penUpEvent and the program catches the events just fine BUT the button is no longer hightlight when the pen is tabbed on the button. So, I try to use ctrEnterEvent instead of penDownEvent and ctrselectEvent instead of penUpEvent and the program catches these events BUT the button is still not highlighted. Anyone please tell me what to do so the button will be highlighted when a user tabs on it. Thanksss in advances. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
uncheck the checkbox ???
Hi everyone, I have 3 check boxes and I group them together so user can only check one at a time. Now, I don't know how to uncheck all 3 of them. Before, when I didn't have them group together, they worked OK when I check/uncheck them. I just had to make sure only 1 is checked at a time. Should I go back to what I did before because when a bunch of buttons/check boxes are grouped together, one of them must be choosen? What I am missing here, please tell me, please. Thanks a lot. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:highlight a button
Hi Steve, >>Anyone please tell me what to do so the button will be >>highlighted when a user >tabs on it. >I suspect you have to return false in your event handler so >that the >system does it's normal default stuff, like highlight the >control. I did return true in my event handler. When I use penDownEvent and penUpEvent, I understand that the control (button in this case) should not be highlighted but when I use ctrEnterEvent,... the system doesn't highlight the control either. What else do I do wrong? anyone, please help. Thank you, tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re: Uncheck the check boxes
Hi everyone, > Why are you grouping checkboxes? Wouldn't push buttons be more appropriate? Believe me or not, I use check boxes becauce I like the check mark that the system draws on the square. :) My question would be: Can I unselect all the controls in a group and thank you eveyone for telling me to use the ctlSetValue(). Use another check box as "non if the aboves" is the good idea, too. Thanks again. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Highlight a button, again
Hi Richard and everyone, From: "ThuNguyet Nguyen" <[EMAIL PROTECTED]> Subject: Highlight a button >> Anyone please tell me what to do so the button will be highlighted when a user tabs >on it. >Maybe I don't understand what you are trying to accomplish, but the OS takes care of highlighting buttons when you tap on them. When the user taps on the button, I use ctlSelectEvent to catch the action and do something. The button is highlighted, the code works fine. Now, I need to know how long the user tabs on the button. Depending on the time the button is tabbed, I have to do different things. I use ctlEnterEvent (is queued to the event queue when the pen tab on the button), ctlExitEvent (is queued when the pen lifts from the screen) and my code works (I think it means that the system catches the events) but the button is never highlighted. I did return "true" in the eventHandler. I hope I make myself clear this time, please tell me what I have to do. Thanks a lot. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:pdb newbie: how to get a data file into a resource
Hi there, I don't know how what the input needed for DmCreateDatabaseFromImage() and I am not sure what you want to do. If you want to create a database (resource db or record db) in Palm and you have the database in desktop format (.prc, .pdb), you can do st similar to what people do in the Netsample project (palm OS example or Palm OS extra) The file I look at is ftp.c. By doing what they do, I can create a db in Palm from a desktop file and vice versa using the database manager. Hope that help. tnn Original msg... I have the O'Reilly book for palm programming, and it gives sample code for "DmCreateDatabaseFromImage" where it gets imageHandle = DmGetResource ('DBIM', 1000); It goes on to say that I can just provide the user with a Palm database PDB file to download which I want to do. But it goes on to say that "The exercise of getting a data file into a resource in your application is not covered here. Your development enivronment determines how you do this." So where do I go to do this? I am using Codewarrior 5 (with patches) and PalmOS 3.0. Any pointers to further references (tutorials, docs, etc) would be much appreciated. thanks, Quan --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
RE: >64K record
Hi there, I haven't done it but in O'Reilly book, P.155, the author said that you can have large record by using File streaming (I think you are using it). "You create a uniquely maned file and a small record that stores only that filename"... or you can do multiple chinks in a seperate database ..."If File Streaming Manager isn't available"... "The record stores the unique IDs of each of the chunks in the separate chunk database."... He had the sample code, too. If you want, I can find in the CD or type and send to you. tnn original msg ... is there a way to use records in a database larger than 64k? I am using a stream which should be saved at one point to a database. In the database are already 2 Records. I am using DmResizeRecord, but when I reach 64k the program terminates and the error is NULL from the DmResizeRecord. Thanks Till --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
How to make a shared library ?
Hi everyone, I have 2 programs that use the same utility functions. I'd like to make a shared library and include in the programs. Can anybody tell me some info about doing it. I am using Code Warrior R6 on PC (win98). Thank you in advances. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:how to get data from .pdb into palm? (urgent)
Hi there, >Thanks for the reference. It looks good except for >the "NetUReadN" function >call -- I think I need another function to "read" though -- >... I fail to use exchange manager. I will try again when I have time. I didn't use NetUReadN. I read the data through serial port. We actually read data between our device and Palm, not Pc & Palm. So, we have use a protocol for our transmission. Basically, it is messages back and forth between our device & Palm. When I get the message, I collect raw data (desktop file format) , put in a buffer (I use file streaming for buffer), when I get all the data, I use the database manager to write the raw data to Palm (Palm database format). How do you get the .pdb file (desktop file)? Beaming? through serial port? I can email you the code to make Palm database from the data in the buffer. Let me know if you want. The code to get data from serial port would be the whole project and it required the lower level code from our device to process messages. You can search for beaming. There is some sample code that use exchange maneger, look very simple, just don't work for me yet. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
help, please!!!bugs in palm program
Hi the experts, I am some bugs in my program but can not catch them and fix them. Please help me. I run the program the 1st time, inside the program, I get "index out of range" error. I have to reset the program. I run it the 2nd time, I get "bus error", the program doesn't run. I have to delete it and load it back before it can be run again. I step through the program, set break points all over the places but in the middle of the program, after one breakpoint, before the next break point, I get "index out of range" error. I step throught the program, step by step, sometimes the program jumps into the Assembly code, then jump back to my code. After a while, it goes in the evenloop and I miss the message sent back from the serial port, the program behaves differently... (I should get the message from the com port, process that message and so on). When the program jumps to the Assembly code, doesn't it mean it catch an exception? I am checking the code to make sure I don't have the "out of range" bugs when I access the database. I check to make sure I do not overflow the strings in my program. What else I should check? I think I may have bugs because word alignment. Please tell me what I have to do. I can duplicate the bug but can not catch it. What can I do? Thank you for your respond. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:How to align a label in a table
Hi there, > How can I align the label to the left? I don't know if there is better way to do it. This is what I do, I make the table with 1 col and fill data in using WinDrawChars() I forgot where I took this code, must be in an example code. // Determine the length of text that will fit within the bounds. // data to put in col1 is in tempstr1, col2 is in tempstr2 width = bounds->extent.x - 45; textLen = StrLen(tempstr1); FntCharsInWidth(tempstr1, &width, &textLen, &fits); // if the string is too long, add "..." at the end where it is cut if (!fits) { WinDrawChars("...",3,width,bounds->topLeft.y); } // Now draw the text from the record. WinDrawChars(tempstr1, textLen, bounds->topLeft.x+1, bounds->topLeft.y); leftbound = bounds->topLeft.x+125; WinDrawChars(tempstr2,StrLen(tempstr2), leftbound, bounds->topLeft.y); hope that helps. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
What happens when user tab the silkscreen/hard buttons?
Hi everyone, Please help me with these questions: 1. While my program is running, if the user tabs on the silkscreen buttons or the hard keys, does the FrmCloseEvent invoke? and the AppStop() will be called? 2. At a certain point in my program, I want to ignore anything the user tabs on the silkscreen (except the "cancel" button in my form), I set handle to true in keyDownEvent but it doesn't seem to work. What do I have to do? 3. I have a dialog form in my program ("save behind" is checked), when user tab a button on this dialog form, the window doesn't redraw completely. Part of the screen is erased, do I have to redraw everything to make sure? I think, supposely, we don't have to that. 4. I have a table in my form, when I select a row, I show a information window about that row (dialog form). If the row I selected is outside the dialog form, when I close the dialog form, it is OK. If the row is hidden, when I close the dialog form, it is not highlighted anymore. What can I do? I try to select the row afterward but it doesn't highlight either. Is this the same problem as 3 ? Please tell me about anything that you may think of to solve these. Any help is very appreciated. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
re:netsample for Palm OS 3.5
From: Jaco Vis (view other messages by this author) Date: Thu, 19 Oct 2000 19:12:48 >Anyone been able to port the 3.1 sample project Netsample to >3.5? The supplied OS >3.5 Netsample >project does no longer contain the FTP portion, as the 3.1 >version did. I have an >application >based on the netsample for my ftp stuff, but this doesn't >compile under 3.5. I've >solved this >by including the 3.1 header file dataprv.h in my project. >dataprv.h seems no longer >supported >by 3.5 ? Can anyone confirm this? If so, why isn't it? Yes, I think dataprv.h is no longer in Palm 3.5. I don't know why. What I did is I look at dataprv.h, copy the structure defined in there to my program, simplify it and use it. I change some variable typed structure to a generic datatype. I also have to change (I think a lot) in the name of datatype so my program can run under Palm3.5. Mainly, I use UInt8, Int8, UInt8*, Int8*, UInt16.. for all of my variables. Palm 3.5 doesn't support Ptr (CharPtr, MemPtr...) So you have to use Char*, MemHandle. There is a header file you can include (*compatibility.h or st) but it doesn't cover everything so I go ahead make the changes once. If you use a good editor, it won't take too long to make all the changes. There is some documents in Palm dev zone about Palm 3.5 that may help, too. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
re:StrNCopy terminates with NULL?
Hi, tmpstr = StrNCopy(tmpstr,lap->jobdata.fields[icustomer],24); FrmCopyLabel(frm,detailcustlabel,tmpstr); MemPtrFree(tmpstr); >Does StrNCopy terminate the string with a NULL? All the data >looks fine, tmpstr >contains a truncated string as expected. I think that StrNCopy() works the same way as strncpy() in C. So, it may not add a null char for you. Can you try to add a null char tmpstr = StrNCopy(tmpstr,lap->jobdata.fields[icustomer],24); tmpstr[24] = nullChr; then put it in the label. If you change the text in the label many times in one form, you may want to reallocate the text inside the label, too. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
FrmGetFormPtr(), gadget, PRC to Overlay?
Hi everybody, I am learning to use PRC to Overlay tool in Palm. I have a form with 3 objects. I want to make an overlay PRC with just 2 objects. I get stuck because I don't know how to do this: 1. If I call FrmGetFormPtr() in AppStart(), it return 0. If I call FrmGetFormPtr() or FrmGetActiveForm() in frmOpenEvent, it works fine. Why ? 2. If I'd like to find whether an object is existing in a form or not, can I do it or not? which API can I use? 3. I have a gadget in my form, I do some custom draw (WinDrawLine(), etc.) in the gadget. When I set gadget unusable (uncheck the usable box), it still draws. Why? How do I check the value of usable of that gadget? How do I set the value of usable of that gadget? Can anybody tell me how to do 1. 2. 3. or how to make an overlay PRC with 2 objects. Is there any more documents about PRC to Overlay other than 7 pages OVERLAY TOOL from Palm site? Thank you for reading and helping me. tnn --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re: FrmGetFormPtr(), gadget ???
Hi everyone, Richard, thank you so much for your respond, I use FrmGetObject*() that you show me and they work fine. > FrmGetFormPtr() returns NULL (==0) if the specified form is not in memory. > The form hasn't been loaded into memory when your code executes AppStart(). My stupid question, FrmGetFormPtr() only return the form pointer when the form is in memory, which is when frmLoadEvent is queued( when we call FrmgotoForm() or FrmPopupform()), why do we need FrmGetFormPtr(formID) while we can use FrmGetActiveForm()? >Is this an extended gadget and are you using the 3.5 New Feature Set? Have >you defined and set up the gadget handler with FrmSetGadgetHandler()? Is >your gadget handler responding to formGadgetDrawCmd and formGadgetEraseCmd? >If not, then the gadget is really not much more than a screen area you >define so you can later get it's bounds. For some gadget, I just need to bounds, for some other gadgets, I do need to define and setup the gadget handler. The gadget handler is called when user tab inside/outside the gadget. I need the gadget to draw w/o user control. I am hoping that when I set the gatget unusable, it won't be drawed. I am wrong? >> How do I check the value of usable of that gadget? >> How do I set the value of usable of that gadget? >Use FrmShowObject() to set it and FrmHideObject() to clear it. Can I read the value of usable of a gadget? Can anyone help me, please. Thanks a lot. tnn __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:Sony Memory Stick Audio
Hi there, >Has anyone here successfully initialized the audio library? Is there >some Sony programming forum somewhere where I could actually get some >direct help from Sony programmers/engineers? (Their dev site does NOT >list/host any forums that I can tell.) How the heck am I supposed to >innovate on these new devices if I can't get my development questions >answered? ;-) The Palm Dev. group for Sony Clie is not very actived. Sony does offer support. Each package is 3 questions for JPY $9,450. You can look for more detail on www.us.sonypdadev.com MSA is not supported on the POSE. The program must be tested on the real device. tnn __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re: sound device
Hi there, >Does anyone make a sound device that can plug into the serial port? Check out www.pocketpyro.com. They make MP3 players and mass storages for the Palm PDA. Also, review of one of their products is in the gadgeteer: http://www.the-gadgeteer.com/pyropro-review.html tnn __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:PDB creation and overflow
Hi There, >I have a relatively large chunk of data (about 20,000 records and 10 >fields) that I want to convert to a PDB. However I get an "Overflow" >error. I got the overflow error when I tried to make a PDB file from PC. My error was because of the "big" endian (in Windows) and "liile" endian (in PalmOS). If that is not the problem, I guess you go over the max size of record (65505) or max number of records (I remember 65535, please correct me if I am wrong). Hope that helps. tnn __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
C++ program doesn't work on CW R8 - resolve. Thank you.
Hi Ben, >> I have 1 C++ project and it doesn't work >Can you post the error messages you get? Just highlight an error, then >do "Edit/Copy" to copy all the errors to the clipboard. When I tried to cut and paste the errors, some of the errors are "Undefined identifier '...'". It is because I use VFS but did not include VFSMgr.h and because there are some chances of #define in the new header file. So, I include VFSMgr.h, make the chances and the program works again. Thank you so much. tnn __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Link err, please help.
Hi everyone, I am using CW8 on Win98 machine. I make a new project using "Palm OS Application Stationary" (C++ project). I change the filename of Starter.cpp to PyroMain.cpp. The application works fine. Then I add some forms, and add another file (PyroApp.cpp) to the project. AudioFormHandleEvent(EventType*) and FileSysFormHandleEvent(EventType*) are defined in PyroApp.cpp. The function prototypes are in PyroApp.h and I do include it in PyroMain.cpp. When I make a call to these functions, I get the Link Error as following: Link Error : PyroMain.cpp: 'AudioFormHandleEvent(EventType*)' referenced from 'AppHandleEvent(EventType*)' is undefined. Link Error : PyroMain.cpp: 'FileSysFormHandleEvent(EventType*)' referenced from 'AppHandleEvent(EventType*)' is undefined. I put all the code in PyroMain.cpp. The project with one file works OK. I did the same thing many times before (CW6) without any problem. I think I must have a wrong setting somewhere but I don't know how to fix it. Please help me. Thank you very much. tnn __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:Link err, please help --> solved. Thankssss.
Hi Ben, I got both of the errors that you mentioned. Shame on me !!! >Do both of your source files have a .cpp extension? If you built one as >a C file and the other as a C++, they won't link together by default. >My other suspicion is that you've declared your functions as static. The first time, I build the project as C project and the file I add in is .cpp. So, they didn't link together. I tried again, and the second time, I declared my functions as static :( By the way, if I have some C files and some C++ files. How can I put them together in a project? Should I just name them with .cpp extension? Thanks again for your help. tnn __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Re:Trapping Sony Jog Dial Push
Hi there, I use this code inside my program and it works. I don't know anything about hack, so... Somewhere I read, they said that we should check when jog dial is released, not when it is pushed. Can you use vchrJogRelease or you have to use vchrJobPush ? Those are defined in SonyChars.h ... snip code ... if (EvtKeydownIsVirtual(eventP)) { switch (eventP->data.keyDown.chr) { case vchrPageUp: // do something handled = true; break; case vchrPageDown: // do something handled = true; break; case vchrJogUp: // do something handled= true; break; case vchrJogDown: // do something handled= true; break; case vchrJogRelease: // do something handled = true; break; default: break; } // end switch statement } // end virtual key Hope this helps. tnn __ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:creating and accessing PDB file
Hi Low Pui Kuen, >how to deal with the a PDB file? You can find a lot of threads about PDB in this forum... You can find the PDB format from this link: http://www.palmos.com/dev/support/docs/fileformats/PDB_PRCFormat.html There is a lot of programs to make and view the PDB files on PC. John Walker has 2 very nice programs to make PDB file and view the content of the PDB file. http://www.fourmilab.ch/palm/pdbmake/ http://www.fourmilab.ch/palm/palmdump/ You can use PDBMake to make a PDB file, you may want to read the source code of PDBMake to see how he made the PDB file. When you make the PDB file on PC, just be careful about Big Endian (PalmOS) and Little Endian (Windows). Once, I read from this forum, the max size of a record is 65505 and the max number of records in a db is 65535. If you use the same creatorID for the PDB and your Palm program, when you delete the Palm progam, the data will be deleted, too. After you make the PDB file, if you can install it to you emulator, then the PDB file may be good :) If you can access it in your Palm program, then it must be good :) If you can :access it in your Palm program, then it should be good :) I have problem (don't remember exactly) with PDB with only one record. So, I always make the PDB files with more than 1 record. Hope that helps. tnn __ 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/
Re:creating and accessing PDB file
Hi there, >I am able to create the pdb file in the desktop platform, when I installed >the application and the pdb file, I able to view the records of the pdb just >once. You mean you view it on the Palm? How do you view the records? And the whole pbd disappears so you can't view it again? If you want to view it, then you have to install it again? >But the regarding about the Data Manager APIs which I have used earlier, >do I replace them with File stream API (like FileOpen) instead? Or what >should I do to able to read and write the pdb file instead of putting into >the storage memory. No, you don't need to use File stream API. I only use File stream API when I need a big buffer ... The PDB file that you create on PC and you install it in the Palm is the database on the Palm. PRC file is the PC format of the application on the Palm (resource database) PDB file is the PC format of the database on the Palm (record databse) You can use the data manager to access the database (or the pdb file that you install to the Palm). You create the pdb, so you know the dbname, creatorID, dbtype, you can open, read, write, delete records and close it at the end. On the emulator, "Export database" menu allows you to put the database on the PC (will show up as pbd file) that you can view on the PC to see what you do with it. tnn __ 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/
Re: FrmReturnToForm(0) crash
Hi Jason, >FrmPopupForm(myForm); >{Do some stuff} >err = DmDeleteRecord(validDBRef, validRecordIndex); >{Do some stuff} >UInt16 formID = FrmGetFormId(FrmGetFirstForm()); >FrmReturnToForm(0); I suppose, the form that you return to would have st to do with the db validDBRef. If not, the order of the code shouldn't be a matter, I think. Once, I did st similar to what you did in the above code and it didn't work (I still don't know why), so I changed the order (as you did). Now, what I always do is going back to the form with the db, mofidy the db, then update the form. FrmPopupForm(...); {Do some stuff} FrmReturnToForm(...); {the form that I return to have a table associated with a db ... I do something with that db (remove, add, change record(s)), then call } FrmUpdateForm(...); // or add the update event to the event queue as you do... // In FormHandleEvent(), case frmUpdateEvent, I call TblEraseTable(tableP); TableViewLoadRecords(tableP); TblRedrawTable(tableP); FrmDrawForm(frmP); tnn __ Do You Yahoo!? Yahoo! Greetings - send holiday greetings for Easter, Passover http://greetings.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:Changing button fonts
>At run-time I need to be able to switch the text on a button >between a symbol and a regular text string, You can make button with no text, no frame. Use bitmaps, place each bitmap at the same place at the button, each bitmap should be associated with a bitmap family that has the same size as the button. Set the bitmap to be disable. At runtime, use FrmShowObject() to show the coresponding bitmap. By doing this, you can show bitmap with different depths and colors. Hope that helps. tnn __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:menus and VFS mount notifications
> There are no glue routines to determine if a menu is visible. Have you try: MenuBarPtr menuP; menuP = MenuGetActiveMenu(); if ((menuP == NULL) || (menuP && (!menuP->attr.visible))) { // no menu, popup the alert that VFS is mounted... } Hope that helps. tnn __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Chunk overlocked.. any help ? (not that easy :-)
Hi, As what Paul Gibson said, I suggest: TimSecondsToDateTime (TimGetSeconds (), &dateTime); todayInt = ( ((Int32) dateTime.year-1904) << 16) + ( ((Int32) dateTime.month) << 8) + ((Int32) dateTime.day); // do you have the right number of records in the DB? if not sure, then // umRecordsNeu = DmNumRecords(gVeranstaltungNeuDB); // start from the last record because after we delete // a record, the record num will be changed // I use DmRemoveRecord(), so I am not sure if // you use DmDeleteRecord() the record num get changed or not for (recordNeuNum = umRecordsNeu - 1; recordNeuNum >= 0; recordNeuNum --) { // why do you need to seek the record when you look for record in "All" category //DmSeekRecordInCategory(gVeranstaltungNeuDB, //&recordNeuIndex, 0, dmSeekForward, dmAllCategories); //recordH = DmQueryRecord (gVeranstaltungNeuDB, recordNeuIndex); recordH = DmGetRecord(gVeranstaltungNeuDB, recordNeuNum); if (!recordH) { FrmCustomAlert(MyAlert, "Problem beim Auslesen der neuen DB!","", ""); err = DmGetLastErr(); break; } else { pointer_auf_neue_v = (Veranstaltung_neu *)MemHandleLock(recordH); if (!pointer_auf_neue_v) { // proper error message ... :-) FrmCustomAlert(MyAlert, "Problem with DB!","", ""); err = DmGetLastErr(); break; } else { //if not, then continue ... // do you need this? //neueVeranstaltung = *pointer_auf_neue_v; // ### Position 1 for ### MemHandleUnlock(recordH); // can't unlock here because if you unlock, you may not // have the right value in // pointer_auf_neue_v // delete all old records. dateInt = ( ((Int32) pointer_auf_neue_v->datum_jahr) << 16) + ( ((Int32) pointer_auf_neue_v->datum_monat) << 8) + ((Int32) pointer_auf_neue_v->datum_tag); if (todayInt > dateInt) { MemHandleUnlock(recordH); err = DmDeleteRecord(gVeranstaltungNeuDB, recordNeuNum); deletedOldRecordsNum ++; } else { // so now, every record is in the future.. // do some stuff with this record MemHandleUnlock(recordH); } } } } // next in loop //If you don't need to sort other field of the records, //you can sort by date, then you don't have to go thru all the records... Hope that helps. tnn __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Handle user events, please help.
Hello all, In my Palm program, I have 5 forms A, B, C, D, E. The user can move between forms. The main loop is as below: static void AppEventLoop(void) { UInt16 error; EventType event; do { EvtGetEvent(&event, evtWaitForever); if (! SysHandleEvent(&event)) if (! MenuHandleEvent(0, &event, &error)) if (! AppHandleEvent(&event)) if (!AppHandleUserEvent(&event)) FrmDispatchEvent(&event); } while (event.eType != appStopEvent); } //snip code static Boolean AppHandleEvent(EventPtr eventP) { UInt16 formId; FormPtr frmP; if (eventP->eType == frmLoadEvent) { // Load the form resource. formId = eventP->data.frmLoad.formID; frmP = FrmInitForm(formId); FrmSetActiveForm(frmP); // Set the event handler for the form. The handler of the currently // active form is called by FrmHandleEvent each time is receives an // event. switch (formId) { // ... case BForm: FrmSetEventHandler(frmP, BFormHandleEvent); break; } // ... } } The program generates some user events. I need to have each certain form handles some specific events. For example, I need to have form B handles user event X and Y. So, I put to code to handle event X and Y in BFormHandleEvent(). To prevent the events from not being handled when user go to other form, I also put the code to handle event X, Y (do some general things but not update the active form B) in AppHandleUserEvent(). I did set handled to true after I handle an user event and the event should be out of the queue event after it is processed. Is that right? As the flow of the program, I think that the code inside BFormHandleEvent() will be called first if form B is the active form, if user goes to other form, the events will be handle in AppHandleUserEvent() but it doesn't happen that way. The event X and Y are "always" handled in AppHandleUserEvent() no matter which form is actived. If I want Form B handles the events X and Y, I have to take out the code in AppHandleUserEvent(). If I do that, and if the event occurs when Form B is not actived, then there is no code to handle those events. Please tell me what I did wrong. How can I make a form handles certain events? Should I put all the code to handle user events in AppHandleUserEvent() and check for active form to do proper things? Thank you for any help or suggestion. tnn __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
old and new serial mgr, SrmOpen() question.
Hi all, When I use old serial manager, before beaming, I have to close the serial port and open it again after that. What do I have to do when I use new serial manager? Do I have to close the serial port, open it using the logical portID 'serPortIdPort' SrmOpen(serPortIrPort, baudrate, portIDP); then after beaming, I have to close it and open again using the logical portID 'serPortCradlePort' SrmOpen(serPortCradlePort, baudrate, portIDP); Thanks for any help. tnn __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: digitizer problem ...
Hi there, > Does anybody face the problem as a digitizer problem occurred when our palm > software installed. I have a similar problem. I have a Palm V and the digitizer doesn't work. I run the Welcome (build in) program to calibrate the screen again (or Pref -> digitizer) and the Palm seems to work OK until the next hot sync. Then, I have to calibrate again. I think, OK, not too bad, just have to do it once but I was wrong. Once, I try to play a game and the digitizer doesn't work... Now, I think it is the hardware problem. If this problem happens on one Palm device, I think it is not your software problem. If it happens on every Palm that your software is installed, then I don't know :( Hope that somebody would know. tnn __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: An application is closed, a blank screen is shown.
You could try to queue an appStopEvent to exit your program. I call this function. HTH, tnn void ExitProgram() { EventType event; MemSet(&event, sizeof(EventType), 0); event.data.frmLoad.formID = FrmGetActiveFormID(); event.eType = appStopEvent; / Get out on stop event. EvtAddEventToQueue (&event); } -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: How to get group of push ctl
Hi there, I would think a quick and easy way is keeping a table (array) in your program. Since you make those push buttons, you know which group they belong to. Just wonder why you need the group number... tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Check which Graffiti 2 Version is running
Hello, I don't know the answer of your question. I think may be you can have the list of devices which support Graffiti 2 and check which device the program is running on. Please post the answer when you know it. Thanks. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Need help to change system time
Hello there, May be you use TimSetSeconds(). You can get the date & time and use TimDateTimeToSeconds() to convert to the # of seconds then use TimSetSeconds(). HTH, tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Convert Int16 to UInt32?
I believe you (that it works before and doesn't work now)... I think it should work. May be try to cast it. Int16 num_bytes_read; num_bytes_read = NetLibReceive(..); // If you need the variable new_buffer_size for anything then // do UInt32 new_buffer_size = (UInt32)num_bytes_read; // otherwise ... UInt8 *buf = NULL; if (num_bytes_reads > 0) { buf = (UInt8 *)MemPtrNew((UInt32) num_bytes_read); // type cast to (UInt8 *) or to whatever you define buf if (!buf) { // error } else { // use buf } } Hope it works, tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Drawing bitmap from external card
Hi there, > Has anyone drawn a bitmap bigger than 64k > from an external card before? I was able > to get the image from the card and allocate > enough memory for a MemPtr to hold it by > using MemGluePtrNew. After casting the > MemPtr as a BitmapPtr, I called > WinDrawBitmap(someBitmap,0,0) in the > frmOpenEvent event handler, but nothing > showed up... Can somebody help? Can you draw a smaller bitmap from the external card? If not, try that first. > WinDrawBitmap(someBitmap,0,0) Input data someBitmap (of WinDrawBitmap()) is in the Palm bitmap format (bitmap family, check the "Palm OS Programmer's Companion"). It is a lot different than the format of images (.bmp,.gif, .jpg, etc...) If you can load the image in advanced, cut the image to smaller size imagees and put them in the resources (using Constructor). If you have to load the image at runtime http://flippinbits.com/twiki/bin/view/Main/DevelopmentToolsList has links for some image related libraries. I tried to show images at run time on the Palm but I couldn't get the right color table (color pallete) and I gave up. If you find out how to draw bitmap from external card, let me know too, please. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
How can I run my application from the "Send Contact" menu of the Contact program ?
Hello there, I am using CW 9.3 and writing a program for Treo 650. I try to run my application from the "Send Contact"/"Send Task"/"Send Event" menu of the PIM application. I would like to receive the PIM record and use it in my application also. Is there any way I can put my application in the list of the send dialog, along with Versa mail and Bluetooth? I read the exchange manager, read the Palmsource recipe "How can I have my application called by the Send menu?", and other related docs but still don't know how to do it. I think I have to register data, install the local exchange library,... , use exchange manager to receive data... I try and nothing happens. Am I in the right path? Could anyone please tell me what I should do, what should I try first, any suggestion? Many thanks. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: table - why it changes when i press on it
you wrote: > I draw i table which is not editable. But every time pres on it, > it starts > to show some strange > chars and it draws the line below the field... Why is that? > You could set a breakpoint in the formHandleEvent to see where to code jumps to when you press on the table. Do you have code to process any table related event? If you do, my guess is you forget a break statement so instead of getting out of the switch statement, it goes to the next case ... just a guess. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
What is the 1st param in SysLibInstall( , ) ? How to use SysLibInstall()
Hello everyone, First, I am sorry for the long email. I don't know how to write it shorter. I want to run my application from the "send contact" menu in the contact (address book app). I read the recipe in Palmsource about running the application from the send menu, The recipe said Begin quote ... Check that the library is not already installed: ... if (! SysLibFind(kSmsLibName, &refNum)) return; Then install the library. This sets up the dispatch table and registers the exchange library with the Exchange Manager: if (!SysLibInstall(MyInstallDispatcher, &refNum)) ... End quote I need to check and install the local exchange library, not the Sms lib After checking the lib if (SysLibFind(exgLocalLibName, &refNum)), how can I install the library using SysLibInstall()? I don't know how to get dispatch table (MyInstallDispathcher). The recipe makes me think it is simple to use SysLibInstall() I follow the function AESLib_LoadLibrary() in AESLib_inline.h and do this Err LoadLocalExchangerLibrary() { Err err; MemHandlecodeRscH = 0; SysLibEntryProcPtr codeRscP = 0; UInt16 cardNo = 0; LocalID dbID = 0; DmSearchStateType searchState; DmOpenRef dbR = 0; SysLibTblEntryPtr entryP = 0; Boolean libInROM = false; UInt16 refNum; DmGetNextDatabaseByTypeCreator(true, &searchState, sysFileTExgLib, sysFileCLocalLib, true, &cardNo, &dbID); if (!dbID) return sysErrLibNotFound; libInROM = (MemLocalIDKind(dbID) != memIDHandle); if (0 == (dbR = DmOpenDatabase(cardNo, dbID, dmModeReadOnly))) return sysErrNoFreeRAM; if (0 == (codeRscH = DmGet1Resource(sysResTAppCode, 1))) { // I got stuck in this line, codeRscH is 0 // what should be the value of the 2nd param // in DmGet1Resource() in this case? ErrNonFatalDisplay("Can't get library rsrc"); err = DmGetLastErr(); err = sysErrLibNotFound; } else { codeRscP = (SysLibEntryProcPtr)MemHandleLock(codeRscH); err = SysLibInstall(codeRscP, &refNum); if (!err && !libInROM) { DmDatabaseProtect(cardNo, dbID, true); } } DmCloseDatabase(dbR); dbR = 0; if (err) { refNum = sysInvalidRefNum; if (codeRscP && !libInROM) { MemPtrUnlock(codeRscP); DmReleaseResource(codeRscH); } } else { entryP = SysLibTblEntry(refNum); entryP->dbID = dbID; if (libInROM) { entryP->codeRscH = 0; } else { entryP->codeRscH = codeRscH; } } return err; } Could someone please tell me what I do wrong. Also, in the recipe, toward the end, it said "If the application has multiple segments, you have to load and lock each segment that contains a part of the Exchange Library." My application has multiple segments, which segment will contains a part of the Exchange Library? How do I know? Could you explain to me, please. Many thanks for reading my email and for your help. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: test .net app on the web with simulator?
> Can one use the simulator to connect to the web? Yes, I think so. I check on Settings -> Communication -> Redirect NetLib calls to Host TCP/IP HTH, tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Codewarrior/Table/MultipleColumns
In the Contructor, If you click on Columm, then use Ctrl-K to add more columm (Ctrl-K to add more of the items...) HTH tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
reset message on Treo650 simulator, how to run simulator again?
Hello all, I am using Treo 650 Sprint CDMA (build 6025) debug simulator on Win XP Pro. One time the simulator crashes, so I close it.When I open it again, I got the empty message screen with the buton "Reset" on it. I tab the "reset" button, nothing happens. I close the simulator and now, everytime I open it, I got that same "reset" screen. I try hard reset, nothing happens. I try to delete the simulator folder, delete the "simulator", "palmsim", "rom" and "ssf" in the registry, unzip the simulator zip file again but still have the same problem after the system asking me to choose the ROM file. I can run other simulators (5.0, 5.2) but can not run the Treo650 simulator anymore. Could anybody tell me what to do so I can run the Treo650 simulator again, please. Many thanks tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: reset message on Treo650 simulator, how to run simulator again?
Hello Aaron, I delete Palm\SimSlotDriverVolume and the simulator is working again. Thank you so so much. Somehow I "managed" to make the simulator not working on either my laptop and desktop and I was stuck. Thanks again. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Palm One Calendar Creator ID
Hi there, > I am using Tungsten T5 device (Palm OS 5.4). > I need the creator ID of Calendar Application I think it is kPalmOneCreatorIDCalendar If you download the PIM header from PalmPlugin. You have info about Calendar, Task and Event applications. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Proper sequence for resizing record?
I do, DmGetRecord check size, if insufficient DmResizeRecord ... DmWrite DmReleaseRecord and it works. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Compiles but won't run
Hi there, I didn't look very carefully the 2 files. I think, at least you miss this case in AppHandleEvent HTH, tnn You would need the prototype extern Boolean SecondaryFormHandleEvent(EventPtr eventP); static Boolean AppHandleEvent(EventType * eventP) { UInt16 formId; FormType * frmP; if (eventP->eType == frmLoadEvent) { /* Load the form resource. */ formId = eventP->data.frmLoad.formID; frmP = FrmInitForm(formId); FrmSetActiveForm(frmP); /* Set the event handler for the form. The handler of the * currently active form is called by FrmHandleEvent each * time is receives an event. */ switch (formId) { case MainForm: FrmSetEventHandler(frmP, MainFormHandleEvent); break; case SecondaryForm: FrmSetEventHandler(frmP, SecondaryFormHandleEvent); break; default: break; } return true; } return false; } -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: what headers do I include to get IsFiveWayNavEvent()?
It is defined in PalmNavigator.h or PalmOneNavigator.h HTH, tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
OT-Job in Phillip Medical (NY)
Hello there, I am sorry. I know it is very OT. I got this email. May be someone can use the information. tnn I work for Philips Medical and am in the process of finding candidates for a few different PalmOS related positions we have open in New York City. The group that is hiring is responsible for creating applications to support a global sales team (account reps and technician) equipped with Palm Treos. I am hoping to do a little networking to locate folks that might be interested. If you know anyone who might be want to consider the openings (including you) just drop me a line. My contact information is below. To see the job descriptions, please go to www.philips.com/careers and check out the following requisition numbers: Software Development Engineer 4 (#28088) Sr. Handheld Software Engineer (#28095) Project Manager IV (#28079) Sr. Programmer/Analyst (#28093) Thanks for helping to get the word out! Beth Dion Recruitment Account Manager Philips N.A. Recruitment Services Direct Tel: 425-487-7415 Cell: 206-618-3588 [EMAIL PROTECTED] www.philips.com/careers -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Storage data without using ordinary database ways
Hi there, I use file stream or put data in a binary file and load the bin file to the resource. File stream is actually palm database with 4K record each and each record has a header. You can read file stream using filestream API, and you get the data from a resource using DmGetResource and such. HTH, tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Handle incoming calls and other Palm events on a hi-res program?
Hello there, In my program, I call WinSetCoordinateSystem(kCoordinatesDouble); and display graphic in high resolution (320x320 for Treo 650). When the program is running, if there is an incoming phone call, the screen is messed up, part of a message text box is showed in the top left quarter of the screen. What do I need to do to handle switching betweeen hi-res and low-res? Other than incoming call, which event do I have to handle the switching (between hi-res and low-res)? Thanks in advances for your help. tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Handle incoming calls and other Palm events on a hi-res program?
Hi Ben, > You should only switch to high resolution mode when you're > actually doing your drawing, and you should switch back to > standard resolution at all other times. At the least, make > sure you're in standard before you exit from your event handler. My program is similar to the media player program, it draws hi-res graphic all the time, so I only want to switch back to standard resolution when there is a Palm event (incoming call, SMS message, alarm, etc...). I just can not catch the Palm event :( tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:How to change the Title of Alert Message box dynamically?
FrmCustomAlert() will do it. > How to change the Title of Alert Message box dynamically? __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Why LstGetSelection() doesn't return noListSelection? Please help
Hello all, Please tell me what I do wrong. I am using CW 8 (update to 8.2) on the POSE ver 3.5 (m505 skin). I have a dialog form that has a popup trigger associated with a list. Content of the list is dynamically created inside the program. If user selects the 1st item in the list, LstGetSelection() return 0 If user doesn't select any item in the list, LstGetSelection() also return 0 while I think it should return noListSelection. Do I have to try to catch lstSelectEvent? Since this is a dialog form, I just want to get out of it when user press a button. I don't want to check any other event. How do I know that the list is no selected??? Thanks a lot for any help. tnn __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Why LstGetSelection() doesn't return noListSelection? it works, thanksss.
Hi John, > When you initialize your list, did you use LstSetSelection() and > initialize the selection to noListSelection? I didn't do it before. I do it now and it works fine. Thank you so much. tnn __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Transffer of the .PDB files...
Hi there, > I need know any manner of send a .PDB file to a Server via Socket. I tryed > File Streaming API, but this not work, Do you know other manner ? Have you tried Exchange manager? I use that for transfering files between Palm and PC. Exchange manager converts between the file format on PC and the database on Palm. I only use File Streaming as a very big buffer on Palm. tnn __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Transffer of the .PDB files...
Hi Aaron, On Fri, 5 Jul 2002, ThuNguyet Nguyen wrote: > > I need know any manner of send a .PDB file to a Server via Socket. I tryed > > File Streaming API, but this not work, Do you know other manner ? > Have you tried Exchange manager? I use that for transfering files between > Palm and PC. Exchange manager converts between the file format on PC and > the database on Palm. I only use File Streaming as a very big buffer on Palm. this probably wouldn't help unless the PC understands the exchange manager. what needs to happen here is that the PDB needs to be "mirrored" piece by piece over a simple byte transmission (ie: ftp). on way to do this (as a hack) is to get the address of the pdb file and copy byte for byte, or, manually generate the .pdb file in a raw stream which is sent to the "receiving" client. :) One way to "manually generate the .pdb file in a raw stream" would be taking the data from Exchange manager, is that right? I use ExgDBWrite with the callback function to write the data to a file stream (as a buffer), then I use YModem to transfer the data to our device (removable hard drive when PC looks at it) For me, I think if we know what is in the database in Palm, then we can generate the .pdb file. Otherwise, I don't know what else I can do except using the exchange manager. Am I missing something? Could you explain it for me, please. > > I need know any manner of send a .PDB file to a Server via Socket. I tryed > > File Streaming API, but this not work, Do you know other manner ? Does he mean that when the data is in a file stream, he can't use fpt to transfer to PC? Thanks a lot. tnn __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
dynamic heap chunk corrupted when calling FldDrawField()
Hello all, I get this error message when I call FldDrawField() after setting a new text in a field. "During a regular checkup, Palm OS Emulator determined that the dynamic heap chunk with header address 0x5058 got corrupted. The "hOffset" field of the chunk header did not reference a memory location within a master pointer block." The "Continue" and the "Debug" buttons are gray out, so the only thing I can do is "Reset". This is the snip code to set new text field, do you see anything wrong in the code? Any idea or suggestion is very appreciated. tnn /***/ /* */ /* FUNCTION:SetFieldText, taken from utils.c in SimpleScan example*/ /* */ /* DESCRIPTION:Perform all necessary actions to set a Field control's */ /* text and redraw, if necesary. Allocates a text handle.*/ /* */ /* */ /* PARAMETERS: nFieldID(in) - The resource ID of the field. */ /* pSrcText(in) - The text to copy into field.*/ /* nMaxSize(in) - Max size that the field can grow*/ /* including nullChr */ /* bRedraw(in) - Should the text be redrawn now? */ /* */ /* RETURNED: None */ /* */ /***/ void SetFieldText(UInt16 nFieldID, const Char* pSrcText, Int16 nMaxSize, Boolean bRedraw) { MemHandle hFieldText; Char* pFieldText; FieldPtr pField; Int16 len; UInt32 curSize; pField = (FieldPtr)GetObjectPtr(nFieldID); if(!pField) return; hFieldText = FldGetTextHandle(pField); if(!hFieldText) { hFieldText = MemHandleNew(nMaxSize); // If already allocated, make sure it can handle nMaxSize already. // If not, realloc that buffer } else { curSize = MemHandleSize(hFieldText); if(curSize < nMaxSize) MemHandleResize(hFieldText, nMaxSize); } if( hFieldText ) { len = StrLen(pSrcText); pFieldText = (Char*)MemHandleLock(hFieldText); if (len > nMaxSize - 1) { StrNCopy( pFieldText, pSrcText, nMaxSize-1); pFieldText[nMaxSize-1] = nullChr; } else { StrCopy(pFieldText, pSrcText); } MemHandleUnlock(hFieldText); FldSetTextHandle(pField,(MemHandle)hFieldText); FldSetTextAllocatedSize(pField,nMaxSize); FldSetMaxChars( pField, nMaxSize-1); FldRecalculateField( pField, true ); if(bRedraw) FldDrawField( pField ); } } In the contrustor, the text field is set usable editable underline single line not dynamic size left justified max characters: 64 This is the function call Char authorstr[41] = "Thunguyet nguyen"; SetFieldText(RecordAuthorField, authorstr, 41); Do I have to set dynamic size for the field because I have to set different text (with different length) for the field? Is that my problem? __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: dynamic heap chunk corrupted when calling FldDrawField():SOLVED
Hello Keith, Thank you so much for pointing out to me what happens. >>"During a regular checkup, Palm OS Emulator determined that the dynamic >>heap chunk with header address 0x5058 got corrupted. The >>"hOffset" field of the chunk header did not reference a memory >>location within a master pointer block." The "Continue" and the >>"Debug" buttons are gray out, so the only thing I can do is "Reset". >I know of no way to get this error message without first disabling >facilities in the Debug Options dialog. If you have disabled those, >then you are depriving yourself of valuable information -- in >particular, notification at the exact point where the memory is >getting corrupted. Yes, that is my problem. All of the options in my Debug Options Dialog were disable. I don't remember that I would do such thing and when I did it. By enabling them again, the debugger shows me the code where I overwrite the memory and it has nothing to do with FldDrawField(). Thank you thank you so much. tnn __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
[OT] trip to Europe
Hi everyone, I am sorry for the "very off topic" question. Palm news groups are the only groups that I join. So, I have no place else to turn to. My sister plans to go to Europe with her friend next week for 3 weeks. Today, her friend called and said she couldn't make it. They don't have friends in Europe. My question is "Is is safe and fun for a girl to travel to Europe by herself for 3 weeks?" I am really appreciated if you could tell me st about this. Please email your opinion/suggestion to me at [EMAIL PROTECTED] tnn __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
sample sound on Tungsten T?
Hi there, I'm trying to add voice recording and playback from a memory card to some applications using the OS5 sound API's. It appears that the buffer passed to the callback routines is not correct. It never changes even though audio is supposed to be double buffered, and whatever data is written to it does not have any effect on the sound coming from Tungsten T (OS 5.0). On the record the buffer contains random stuff, including some ASCII strings. If I use the SndPlayResource function to play audio then my sampled sound functions appear to play back a buffer from the resource audio over and over again. Anyone know how to get sampled sound API's to work on a Tungsten T? Also, the SndPlayResource with the Async flag appears to lock up the unit, but the Sync playback works OK. Is OS 5.1 the only answer? Also, does anyone know how to find and use the sound API on the Sony NX60 and NX70 devices? It appears they didn't implement the sampled sound API either. Thanks in advance for any help! tnn __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Sampled Sound on Tungsten: SOLVED
Hi Daniel, Just a question : when you create a sound stream, are you using sndInt16 ( or sndInt16Big which is the same ) ? I was having the exact same problem, until I try to use sndInt16Little. I didn't get any answer on this one from Palm, but as it does not involve big changes in your code ( except having sound data swapped ), just try using sndInt16Little and your problem will be solved ! Yes, it works, : I used sndInt16 before and use sndInt16Little and it works. Thank you so so much. tnn __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:Tungsten Serial Comm
Hi Matt, >My company wrote an app for one of our clients that uses Serial >communication. Now, someone is trying to use it with a tungsten and >they say it's not working. Has anything changed in the Tungsten or Palm >OS 5 that might affect this? >Do you use old serial manager on your program? > My program used old serial manager (so it works with the old Palm) and it didn't work with the Tungsten. Last week, I changed it to use the new serial manager (if new serial mgr is supported, use it, otherwise, use the old one), then it works fine. If you use the new seial mgr, it should work. hope that helps. tnn __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to get the size of palm free memory?, link to sample code
Hi there, This is the link to the sample code from Palmsource. http://kb.palmsource.com/cgi-bin/palmsource.cfg/php/enduser/cls_adp.php?p_sid=4HEOqCug&p_lva=&p_li=&p_sp=cF9zcmNoPTEmcF9ncmlkc29ydD0mcF9yb3dfY250PTAmcF9zZWFyY2hfdGV4dD1nZXRvc2ZyZWVtZW0mcF9zZWFyY2hfdHlwZT0zJnBfcHJvZF9sdmwxPTImcF9jYXRfbHZsMT0xNyZwX3NvcnRfYnk9ZGZsdCZwX3BhZ2U9MQ**&p_cluster=20046|30051&p_faqid=291&p_created=1032309756 If the link doesn't get you there, then go to knowledge base in Palmsource, then search for "free memory and total memory". I can also send you that sample code (GetOSFreeMem()). Hope that helps. tnn __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:missing object in form
missing object in form From: Max Bian (view other messages by this author) Date: Tue, 26 Nov 2002 08:00:57 Hello. I just picked up the palm programming again and I got a problem I cannot solve. Pose reported the following message: MyApp (2.0) called SysFatalAlert with the message: "Form.c, Line:1762, Object #3401 in form #3600 is missing". I am not sure what happened. The object #3401 is a popuptrigger. I am sure it is in the resource and I have not touched the code that deals with it. All I did was spliting some other codes into several segments. What's the best to find out the cause? I am using prc-tools with pilrc 2.9.9 __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:missing object in form
Sorry for my last email, wrong key stroke :(( >MyApp (2.0) called SysFatalAlert with the message: >"Form.c, Line:1762, Object #3401 in form #3600 is >missing". I use Contructor to generate the UI of the program and if the form is XY00 then every object in the form will be XY??. So, for me, I think that object #3401 is not in the form #3600. Please tell me that I am wrong. Sometimes, I have the error message "Object #2024 in form #2000 is missing" and when I check the src.h file, it is in there. So I just close everything and reopen again and it works. Other time, I set a breakpoint and see what the active form is, it may be an alert form or a menu form, etc... Please post the solution when you have it fixed. Thank you so much. tnn __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
How to detect when the side button (record button) on Tungsten T is released?
Hi everybody, I try to detect when the side button (record button) on Tungsten T is pressed and released. I get the keyDownEvent (vchrHard5) when the button is pressed and another keyDownEvent (vchdHard5, autoRepeatKeyMask) when the button is hold. No matter how long it is hold, I get only 1 keyDownEvent (vchdHard5, autoRepeatKeyMask). Please tell me which event I should get when the button is released. Thanks in advances. Thunguyet Nguyen __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:Fatal Exception - HELP
Hi there, > The problem is that the code below gives me a >"Fatal Exception". The problem that I am encountering is that this error is >not consistant in any way. Some times it will happen when I input a number >once, other times it takes 20 or more tries to break it. > I suppose your function SetFieldText() is a good function. There are some similar versions of this function out there and I use one of them, with 4 parameters as you have, too. Plus you said that the error is not consistant, I think the error is somewhere else, not in the code you post. That happens to me before and usually, I write pass the memory of a string or st. BTW, do you call SetFieldText() in frmOpenEvent, before FrmDrawForm() and call FreeFieldText() in frmCloseEvent? I can send you the functions that I have. If you comment out all the code about the text field(s), do you get the fatal error? Can you try a very small program with just 1,2 text fields and try to input data, retrieve data to see if the error happens? Hope that helps. tnn __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
CW9, add segment 3 -> Tungsten is frozen when I kill the debugger, why?
Hi all, I am using CW9 on Win98. I debug my program on the real device (Tungsten). My program works fine until I add segment 3 to it then the program works fine in the debugger until I exit the program. At this time the palm still OK. When I kill the debugger, then the Tungsten resets and and stay in the Palm logo screen forever until I do a hard reset. When I try to install the program to the Tungsten, the HotSync process seems to be OK until the end, the Palm stays at the HotSync screen which says "Clean up - please wait". It just stays there untils I do a hard reset. This first happens a week ago. I try to go back to my older code, double check to see if I have done something wrong, haven't found anything yet :( Does anybody have this same problem? Do you know what I may have done wrong? What can I do? Please help. Thank you in advances. tnn __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: CW9, add segment 3 -> Tungsten is frozen when I kill the debugger, why?
Hi Ben, >I am using CW9 on Win98. I debug my program on the real device (Tungsten). >My program works fine until I add segment 3 to it then the program works >fine in the debugger >until I exit the program. At this time the palm still OK. When I kill the >debugger, then the >Tungsten resets and and stay in the Palm logo screen forever until I do a >hard reset. Ben wrote: What happens when you drag the app's PRC file to POSE or PalmSim? --> When I drag the PRC to PalmSim. It is OK, I run it, it is OK, actually it doesn't do much because I need the SD card to work with my program so the program just display an error message and tapping OK exits the program. Then, I try to run the debugger, exit the program on PalmSim OK but when I try to kill the debugger, I get this error "I:\DoghouseII\ARM\Core\Emul68K\SrcSlowEmu\Run68K.c, Line:3109, Invalid read from FF28" in the message window, there are also 3 buttons "Reset", "Ignore" and "Quit" on the next line, then button "Debug" on another line. The last line has 3 checkboxes "Break in Native" (uncheck), "Break in 68K" (check), and "Break in Native then 68K" (uncheck). When I hit "quit" button, this message window disappear, so does the PalmSym. I open the PalmSym again and try to debug again but I get the message saying that it can not down load the database because the database may be protected by DmDatabaseProtect(). Ben wrote: What happens if you do a no-notify reset -- reset the device with the up part of the d-pad held? This resets the device without sending out notifications to the installed applications. --> IF I do a no-notify reset, the Tungsten goes to Prefs (back to normal). Now, I can run my program normally (not in debug mode). Ben wrote: When you look at your map file for your project, how large is the third segment? Does it exceed 64K? --> I don't know if I look at the right place. Segment 1:41K, segment2: 32K, segment 3:26K. The program always gets to the point that I have the linker errors "16 bit out of range..." before it reachs 64K. I will contact tech support, I think it is bugs in my program ... Thank you so much for the quick response. tnn __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:FrmPopupForm???...
Hi Dan, What I did is In frmUpdateEvent, I call FrmDrawForm(), then do all the custom draw for your form after that. Sometimes, I have to erase the whole window, then draw the form, then do all the custom draw. Hope that helps. tnn __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Little Help, memory error
Hi Al, This is the prototype of StrPrintF Int16 StrPrintF(Char *s, const Char* formatStr, ...); Do you forget to define the string that you will put your format string in (1st parameter). It should be big enough to hold the time string and the number of seconds, at least 14 characters, I think. tnn StrPrintF(" %s:%02d",timeAsString ,dateTime.second); From: Al Smith (view other messages by this author) Date: Tue, 11 Feb 2003 08:53:08 I try fixing it , but now im getting a low memory error.. __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: CW9, add segment 3 -> Tungsten is frozen ...- Solved (to: Ben Combee)
Hi Ben, I found out that all the strange things happened when I add another segment to my app because I drap my file with the PilotMain() function to the 2nd segment. I forgot that rule. My mistake. I fix it and it works OK now. Thanks again for your help and the help from MW tech support. tnn __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:color labels or buttons?
Hi Tina, >Can I put two labels on one form -- one label text is red, and the other > To draw a color text, I use the Win...() functions. I am sure there must be other way to do it. This is what I did: Save the draw state Save the font (if you want to change the font) Set your font Set the text color that you want (Erase the erea) draw the text Restore the font Restore the draw state >How about buttons? > If 2 buttons are different (in position), I use graphic buttons or buttons with bitmap for PalmOS before 3.? (not support graphic button). I guess you are asking in the case 2 buttons are in the same position: I do either 1 or 2 depending on my program. 1. I have 2 graphic buttons, I show or hide them whenever I need to. 2. I have 1 button with no frame, no text and 2 bitmaps (2 bitmap families), I show and hide the bitmaps when I need to. 1 I have to use 2. for PalmOS that not supporting graphic button. Hope that helps. tnn __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: FrmPopupForm???...
Hi Dan, I remember people said st about FrmReturnToForm(0) before. (Search the forum for FrmReturnToForm :) ) So, I never use it. What I did is: Let say you are in FromA, you will show FormB (modal form), then you go back to FormA. I only use the pair FrmPopupForm() and FrmReturnToForm() for modal form. UInt16 backFromFormB = 0; ... backfromFormB = FrmGetActiveFormID(); // I call this right before FrmPopUpForm() FrmPopUpForm(FormB); ... //When you are about to go back to FormA FormBExit(); // do anything you want to do in frmCloseEvent of formB if (backFromFromA) { FrmReturnToForm(backFromFormB); } else { FrmReturnToForm(FormA); } I guess you can always call FrmReturnToForm(FormA); if you are sure about that. One thing to remember is FrmReturnToForm() doesn't generate frmCloseEvent for FormB, so you want to do whatever you need to do before you go back to FormA in FormBExit(). Also put FormBExit() in frmCloseEvent of FormB because it will be call when you are in FormB and the user exits your program. In debugger, when you are in FormB, if you set a break point in FormAHandleEvent(), as soon as FrmReturnToForm() is called, I think it will hit the break point. If after FrmReturnToForm(), your program doesn't go to handle the event for FormA, where does it go? You can try this, after FrmReturnToForm(), call FrmGoToForm(FormA), if you do that, even you don't have any code to update FormA, FormA still gets update OK, just the screen is flicking. I did tell you that last email because I think that is the quick and dirty way to do it but I had to do that before. Hope that helps. tnn __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re:Emulator that suports Memory Sticks?
Hi there, As I remember, the Sony emulator for N710/N760 supports MF (supports VFS). When you create a section, you tell it the size (16, 32, 64, 128 ?), then you can drap whatever you want to put in the MS to folder MS128 (or MS64, etc...). It has been a while so I don't remember if the emulator for NR70 support MS or not, it should and so should the later Sony Emulators. To obtain the Sony emulator I had to register as Sony developer, I think. tnn __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/