Loading List Items Dynamically and Dilplaying it as a PopUpList
Hi I have a popup trigger which should show a dynamically loaded list. I get lot of errors when trying to display the list. Note : List visible items are set by the code. So initially visible items are zero. How can i stop the list dispalying when form loads up. It should only show when poptrigger is clicked. Pls help .. Thanks in advance Dhanushka -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Horizontal Scrollbar???
I think it could be hard, but not impossible. I would try to turn the columns usable or unusable, as my HScroll goes left and right. For example, when my app comes at first time, I can see my first column. If user clicks at right arrow of the HScroll, I turn my first column unusable (TblSetColumnUsable with false), and I can see only the second one, and the others. Of course I must have an int variable keeping the column number that apears at left first. I hope be helpful. I gonna tell you that I never did it before. Can you tell us if it works well? Fabrício de Paula - Original Message - From: Oliver Steinmeier [EMAIL PROTECTED] To: Palm Developer Forum [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 2:46 AM Subject: Re: Horizontal Scrollbar??? From the UI Guidelines document, section on scroll bars: Look and Feel Follow these guidelines for implementing a scroll bar. Vertical Scroll Bars Only Palm OS only provides support for scrolling vertically. Horizontal scrolling is not supported. (http://www.palmos.com/dev/support/docs/) If you still want to do it, check out the archives, e.g., http://groups.yahoo.com/group/palm-dev-forum/message/66911 __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Basic C question
Try replacing Char *encDate = 34857384573498573498; with Char encDate[] = 34857384573498573498; Also, have you try the following before? StrCopy(record.Date, 34857384573498573498); On 1 Apr 2002 at 19:02, Ed wrote: With the code below, I get the following error: just read from memory location 0x003CD32, which is in the unused portion of the stack. The stack range is ... - ... and the stack pointer is ... This does not happen everytime. Any ideas? Thanks, Ed. Borislav Kolev wrote: The I can only assume what you have left out of your example, but with these assumptions it is correct it should be typedef struct RecData { Char Date[256]; } RecData; void AddToDateDatabase(RecData* v); void foo() { RecData record; Char *encDate = 34857384573498573498; StrCopy(record.Date, encdate);// Generally better use StrNCopy() and clear out the last Char (not byte!) error = AddToDateDatabase(record); } And this seems to be fine. - bobby -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ John Leung [EMAIL PROTECTED] http://persweb.direct.ca/jleung -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
I have installed all the stuff..
But when I run make from the example 'multiapp sdk can't be found ? is there a special variable setting on w2k ? can someone give me a web site which is up to date and efficient ? Because there is a lot of good web sites about palm but out of date or working with IDE but not with prc ! regards :) Henri ___ Do You Yahoo!? -- Une adresse yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Cradle event
Subject: Re: Cradle event as a custom notification From: Dave Lippincott [EMAIL PROTECTED] Date: Mon, 1 Apr 2002 13:58:28 -0500 Run the Prefs app, select buttons from the drop down list then tap the button labeled 'Hotsync...' - Original Message - From: Jatin Sethi [EMAIL PROTECTED] Sent: Monday, April 01, 2002 12:40 PM Subject: Cradle event as a custom notification Hi Everyone: Is there a way to detect the cradle event and launch an application with it? I have been able to trap the cradle event when my application is running. I want my application to be launched with the cradle event whenever the unit is cradled. Dave's advice is correct. The only drawback is your application doesn't know how it was launched. The Launch codes that would seem to be applicable to the HotSync buttons aren't passed through to applications. So you don't get the cradle event. I don't know of any way to get that, even after substantial investigation. Roger Stringer Marietta Systems, Inc. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE:How much it's take for XTNDConnect server
Subject: How much it's take for XTNDConnect server From: Pham Nguyen Tung [EMAIL PROTECTED] Date: Fri, 8 Mar 2002 08:51:46 +0700 I try installing and using XTNDConnect server. I think that I need it for my work. Can you tell me how much it's take? Thank you very much. A lot of time and money, plus ongoing support effort. It can be worth it it you are rolling out several thousand units in an enterprise siituation, but is decidedly a non-trivial series of tasks and license fees. Roger Stringer -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Cradle event as a custom notification
Go to http://www.peekpocket.com/article.php?sid=162mode=order=0 I think you could find how to do it. Jatin Sethi [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] Thanks Dave: I am aware of this. The problem in doing this is that the application would not get the event. It would be launched but the event would not be passed to it. I am looking to invoke the application with the cradle event. Thanks, Jatin Sethi. Dave Lippincott [EMAIL PROTECTED] wrote in message news:82270@palm-dev-forum... Run the Prefs app, select buttons from the drop down list then tap the button labeled 'Hotsync...' - Original Message - From: Jatin Sethi [EMAIL PROTECTED] Newsgroups: palm-dev-forum To: Palm Developer Forum [EMAIL PROTECTED] Sent: Monday, April 01, 2002 12:40 PM Subject: Cradle event as a custom notification Hi Everyone: Is there a way to detect the cradle event and launch an application with it? I have been able to trap the cradle event when my application is running. I want my application to be launched with the cradle event whenever the unit is cradled. I looked at the sysAppLaunchCmdNotify launch code but I have not been able to figure out how to launch my application with the cradle event as a custom notification. Any help will be appreciated. Thanks, Jatin Sethi -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Cradle event as a custom notification
You could always write a small stub program who's only job is to launch your app with a custom launch parameter. Then link the stub to the cradle button. Thanks Dave: I am aware of this. The problem in doing this is that the application would not get the event. It would be launched but the event would not be passed to it. I am looking to invoke the application with the cradle event. Thanks, Jatin Sethi. Dave Lippincott [EMAIL PROTECTED] wrote in message news:82270@palm-dev-forum... Run the Prefs app, select buttons from the drop down list then tap the button labeled 'Hotsync...' -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Loading List Items Dynamically and Dilplaying it as a PopUpList
Hi I have a popup trigger which should show a dynamically loaded list. I get lot of errors when trying to display the list. Of course, no one can help you with those without more details. How can i stop the list dispalying when form loads up. It should only show when poptrigger is clicked. Uncheck the Usable attribute in Constructor, or do the equivalent in your tool of choice. Oliver __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
[repost] wireless: Detect radio strenght?
hi there, this is a repost from handspring-forum, sorry for this but it seems not to be used so much. :-\ I'm interested on Treo developing and I'm currently working on a freeware app. what I need is in one word: *documentation* I'm studying the Handspring headers, I finally got some GSM events as well as battery power infos, I succesfully let the system draw radio and battery icons for me but I definitely lack a very important information for me: radio antenna strenght. AFAIK, HS' headers lacks this information, or I should really let doctors to adjust my eyes... :) have you got such information? is anyone at Handspring watching this forum and let me know? email to [EMAIL PROTECTED] if possible, thx. MATRO RealPopup, the freeware winpopup replacer http://www.realpopup.it -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Palm PDB Database Help
I am trying to write my first Palm application. I am having some trouble with reading values from a PDB file I created from a database. I have 7 Fields and they are all character strings in the database. Every time I try and read one I get a bad memory reference error. I am getting the memory address of the record into a MemHandle variable. Then I am setting the memory reference = my struct for a database entry. My struct looks like this: typedef struct MLSDB { Char* date;/* Date of Game/Event */ Char* away;/* Away team name, 51 characters allowed */ Char* home;/* Home team name, 51 characters allowed */ Char* time;/* Time of Game/Event */ Char* TV;/* TV Station of Game, 51 characters allowed */ Char* results;/* Results of Game, 51 characters allowed */ Char* attendence;/* Attendence of Game, 51 characters allowed */ } MLSDB; The problem is that I can not figure out how to compute the StrLen or length of the character strings in the database so I can initialize the struct members to the correct sizes. Can anyone out there help me with this? Thanks for your time. Please let me know if I need to post more info. Thanks, Kade P. Cole [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: internet connection HotSync
Petr, 1) May I something simulate internet connection over Palm Emulator? Yes, you can tell the emulator to use your desktop's network connection. Select Settings-Properties and make sure the Redirect NetLib calls to host TCP/IP checkbox is checked. 2) How can I control data which come to the palm over HotSync for all applications? Not sure what you mean -- each application's conduit (if it has one) decides about the data that gets synchronized. What do you want to achieve? Oliver __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://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: Palm PDB Database Help
Kade: You have a basic C misconception here. A DB record should (can only) contain that actual strings themselves, NOT pointers to them. -bob mckenzie, palmsource pdx. -Original Message- From: Kade P. Cole [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 7:35 AM To: Palm Developer Forum Subject: Palm PDB Database Help I am trying to write my first Palm application. I am having some trouble with reading values from a PDB file I created from a database. I have 7 Fields and they are all character strings in the database. Every time I try and read one I get a bad memory reference error. I am getting the memory address of the record into a MemHandle variable. Then I am setting the memory reference = my struct for a database entry. My struct looks like this: typedef struct MLSDB { Char* date;/* Date of Game/Event */ Char* away;/* Away team name, 51 characters allowed */ Char* home;/* Home team name, 51 characters allowed */ Char* time;/* Time of Game/Event */ Char* TV;/* TV Station of Game, 51 characters allowed */ Char* results;/* Results of Game, 51 characters allowed */ Char* attendence;/* Attendence of Game, 51 characters allowed */ } MLSDB; The problem is that I can not figure out how to compute the StrLen or length of the character strings in the database so I can initialize the struct members to the correct sizes. Can anyone out there help me with this? Thanks for your time. Please let me know if I need to post more info. Thanks, Kade P. Cole [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
fonts
Is it possible to create a font resource and not have it connected to a certain project? Can I have an independant resource on the palm device that can be accessed from several different apps? If this is possible, how could it be accomplished? Lance Gregory -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Palm PDB Database Help
I must not have explained it well. The Databse record in the PDB DOES contain the character strings. The struct that I am using to access the DB record is the one with the pointers in it. Kade On 4/2/02 9:51 AM, Robert McKenzie [EMAIL PROTECTED] wrote: Kade: You have a basic C misconception here. A DB record should (can only) contain that actual strings themselves, NOT pointers to them. -bob mckenzie, palmsource pdx. -Original Message- From: Kade P. Cole [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 7:35 AM To: Palm Developer Forum Subject: Palm PDB Database Help I am trying to write my first Palm application. I am having some trouble with reading values from a PDB file I created from a database. I have 7 Fields and they are all character strings in the database. Every time I try and read one I get a bad memory reference error. I am getting the memory address of the record into a MemHandle variable. Then I am setting the memory reference = my struct for a database entry. My struct looks like this: typedef struct MLSDB { Char* date;/* Date of Game/Event */ Char* away;/* Away team name, 51 characters allowed */ Char* home;/* Home team name, 51 characters allowed */ Char* time;/* Time of Game/Event */ Char* TV;/* TV Station of Game, 51 characters allowed */ Char* results;/* Results of Game, 51 characters allowed */ Char* attendence;/* Attendence of Game, 51 characters allowed */ } MLSDB; The problem is that I can not figure out how to compute the StrLen or length of the character strings in the database so I can initialize the struct members to the correct sizes. Can anyone out there help me with this? Thanks for your time. Please let me know if I need to post more info. Thanks, Kade P. Cole [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
converting Access db to Palm
Can somebody please shed some light on the subject of converting an MSAccess db to Palm. What I'm trying to implement is hot syncing my palm to read a calendar db I made in Access on the web. Any ideas? Ed. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Palm PDB Database Help
Your structure uses char pointers. You can't do that and load/unload the structure directly into the PDB. You're only saving the address of the Char* in the PDB file which will become invalid as soon as you release the memory they use. If you plan to load/unload the structure directly, try: typedef struct MLSDB { Char date[MAXDATESIZE];/* Date of Game/Event */ Char away[MAXAWAYSIZE];/* Away team name, 51 characters allowed */ Char home[MAXAHOMETEAMSIZE];/* Home team name, 51 characters allowed */ Char time[MAXTIMESIZE];/* Time of Game/Event */ Char TV[MAXSTATIONSIZE];/* TV Station of Game, 51 characters allowed */ Char results[MAXRESULTSSIZE];/* Results of Game, 51 characters allowed */ Char attendence[MAXATTENDENCESIZE];/* Attendence of Game, 51 characters allowed */ } MLSDB; - Original Message - From: Kade P. Cole [EMAIL PROTECTED] To: Palm Developer Forum [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 11:13 AM Subject: Re: Palm PDB Database Help I must not have explained it well. The Databse record in the PDB DOES contain the character strings. The struct that I am using to access the DB record is the one with the pointers in it. Kade On 4/2/02 9:51 AM, Robert McKenzie [EMAIL PROTECTED] wrote: Kade: You have a basic C misconception here. A DB record should (can only) contain that actual strings themselves, NOT pointers to them. -bob mckenzie, palmsource pdx. -Original Message- From: Kade P. Cole [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 7:35 AM To: Palm Developer Forum Subject: Palm PDB Database Help I am trying to write my first Palm application. I am having some trouble with reading values from a PDB file I created from a database. I have 7 Fields and they are all character strings in the database. Every time I try and read one I get a bad memory reference error. I am getting the memory address of the record into a MemHandle variable. Then I am setting the memory reference = my struct for a database entry. My struct looks like this: typedef struct MLSDB { Char* date;/* Date of Game/Event */ Char* away;/* Away team name, 51 characters allowed */ Char* home;/* Home team name, 51 characters allowed */ Char* time;/* Time of Game/Event */ Char* TV;/* TV Station of Game, 51 characters allowed */ Char* results;/* Results of Game, 51 characters allowed */ Char* attendence;/* Attendence of Game, 51 characters allowed */ } MLSDB; The problem is that I can not figure out how to compute the StrLen or length of the character strings in the database so I can initialize the struct members to the correct sizes. Can anyone out there help me with this? Thanks for your time. Please let me know if I need to post more info. Thanks, Kade P. Cole [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Palm PDB Database Help
Kade: Perhaps the following snippet will give you some ideas: // note that this function leaves the record locked // if and only if it returns 0 (no err) Err YourUnpack( DmOpenRef pDb,// IN database reference UInt16 index, // IN record index MLSDB * pRec) // IN/OUT pointer to struct, to be filled in { Char* p; MemHandle h; Int32 len; h = DmQueryRecord(pDb, index); if (h) { MemSet(pRec, sizeof(MLSDB), 0); p = MemHandleLock(h); // date len = StrLen(p); pRec-date = p; // away p += len; len = StrLen(p); pRec-away = p; // etc., etc. } else { return -1; } return 0; } -Original Message- From: Kade P. Cole [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 8:14 AM To: Palm Developer Forum Subject: Re: Palm PDB Database Help I must not have explained it well. The Databse record in the PDB DOES contain the character strings. The struct that I am using to access the DB record is the one with the pointers in it. Kade On 4/2/02 9:51 AM, Robert McKenzie [EMAIL PROTECTED] wrote: Kade: You have a basic C misconception here. A DB record should (can only) contain that actual strings themselves, NOT pointers to them. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
hi joe,same old errorsaddress error and bus error
hi , i tried aking changes you suggested. but it gives the same old errors . i.e.bus error and address error.sometime it gives errors likethe application just wrote to an unallocated chunk of memory my code is 39k. so i made a sample code with these functionalities which is only 11k. still the same old errors. my modified code is as below: CODE: case savebutton: { Err err; Char *textp; FieldType *fldp; UInt16 objindex,len; FileHand streamsave; FormType *frmp; frmp=FrmGetFormPtr(1000); objindex=FrmGetObjectIndex(frmp,1004); fldp=FrmGetObjectPtr(frmp,objindex); textp=FldGetTextPtr(fldp); len=FldGetTextLength(fldp); streamsave=FileOpen(0,filename,filetype,filecreator,fileModeAppend,err); ErrAlert(err); FileWrite(streamsave,textp,(StrLen(textp)+1),1,NULL); FileClose(streamsave); handled=true; break; } case showbutton1: { char *buffer; FileHand streamshow; FieldType *fldp; UInt16 objindex; FormType *frmp; Int32 count; frmp=FrmGetFormPtr(1000); objindex=FrmGetObjectIndex(frmp,1004); fldp=FrmGetObjectPtr(frmp,objindex); streamshow=FileOpen(0,filename,filetype,filecreator,fileModeReadOnly,NULL); while(! FileEOF(streamshow)) { count=FileRead(streamshow,buffer,sizeof(Char),1,NULL); buffer+=count; FldInsert(fldp,buffer,sizeof(buffer)); FileClose(streamshow); handled=true; break; } } pls reply. bye, siddharth For live cricket scores download Yahoo! Score Tracker at: http://in.sports.yahoo.com/cricket/tracker.html -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: fonts
--- Lance Gregory [EMAIL PROTECTED] wrote: Is it possible to create a font resource and not have it connected to a certain project? Yes Can I have an independant resource on the palm device that can be accessed from several different apps? Yes If this is possible, how could it be accomplished? Store your font in a PDB. FontBucket (http://www.handshigh.com/fontbucket/) is an example of a program that does this. __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://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: hi joe,same old errorsaddress error and bus error
--- siddharth saxena [EMAIL PROTECTED] wrote: i tried aking changes you suggested. but it gives the same old errors . i.e.bus error and address error. ... case showbutton1: { char *buffer; ... while(! FileEOF(streamshow)) { count=FileRead(streamshow,buffer,sizeof(Char),1,NULL); You did not allocate any space for the buffer! How can it take bytes from the filestream and put them in the buffer if the buffer doesn't have any space allocated to it? (It can't, so you get errors.) __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
ROM Images 3.0 and 3.1
Hello, I am quite new in Palm programming. I have tried to build a small application to be familiar with the platform. The application runs OK with Rom Images from 3.3 to 4.0. I tried to run it with Rom Image 3.0 or 3.1 and I have problem. I got a warning as the following: The application called SystFatalAlert with the message: MemoryMgrNew.c, Line: 4128, Invalid handle. I went though the debugger and realized that whenever frmDrawForm(pt) tries to draw the main form then I have the error message. I am not clear about the cause of the problem. Maybe these old Rom need some modification or I can not use some gadgets in my form. Please let me know the cause of the problem. Thanks in advanced. Nhuan -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Palm PDB Database Help
This is what you are supposed to do, as long as you realise that the pointers in your struct point to memory in the database record. If you do a MemHandleUnlock in the //etc etc, then your struct will no longer point to valid memory. You can use StrLen on the pointers to find the length of the strings (assuming you have packed them properly with NULL terminators which should be evident during unpacking). Also, care must be taken when modifying the strings and repacking them, since you may have to allocate new (dynamic) memory temporarily for the modified fields. Matt At 08:35 AM 2/4/2002 -0800, you wrote: Kade: Perhaps the following snippet will give you some ideas: // note that this function leaves the record locked // if and only if it returns 0 (no err) Err YourUnpack( DmOpenRef pDb,// IN database reference UInt16 index, // IN record index MLSDB * pRec) // IN/OUT pointer to struct, to be filled in { Char* p; MemHandle h; Int32 len; h = DmQueryRecord(pDb, index); if (h) { MemSet(pRec, sizeof(MLSDB), 0); p = MemHandleLock(h); // date len = StrLen(p); pRec-date = p; // away p += len; len = StrLen(p); pRec-away = p; // etc., etc. } else { return -1; } return 0; } -Original Message- From: Kade P. Cole [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 8:14 AM To: Palm Developer Forum Subject: Re: Palm PDB Database Help I must not have explained it well. The Databse record in the PDB DOES contain the character strings. The struct that I am using to access the DB record is the one with the pointers in it. Kade On 4/2/02 9:51 AM, Robert McKenzie [EMAIL PROTECTED] wrote: Kade: You have a basic C misconception here. A DB record should (can only) contain that actual strings themselves, NOT pointers to them. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Can you run an app with the LCD turned off?
Does anybody know if there's a way to run an application with the LCD (display) turned off to conserve power? I've heard that the LCD drains a lot of power and the application I'm writing doesn't need any interaction from the screen and may be up and running for a long period of time. I know there are procedure alarms that can be set that will run library code without turning on the display (AlmSetProcAlarm) , but the documentation seems to imply that you can't run a full-on application as a callback to one of those alarms. Has anyone ever tried this? I would assume I have no globals available to me but I could easily allocate those on the heap and pass a pointer to them around to the various function in my app. Any restrictions on running an event loop within a ProcAlarm? Thanks in advance, Scott Schoen -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
beaming
Hello, I am wondering if there is a way to lock applications so that they can't be beamed, or unlocked by Beam Crack. I know there is a security bit in codewarriour that locks the application, but it seems that Beam crach will unlock it and it will be able to be beamed. is there any other tricks?? also, how would you develop your application so that it does not get erased when you take the battery out of your palm, I know it gets removed since it resides on RAM but how can you get around that? any input is appricated. thanks Rania. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: beaming
Rania Saymeh [EMAIL PROTECTED] writes: is there any other tricks?? No. You have to assume that if someone has full access to a device, they will be able to circumvent any kind of protection you can conceive. The copy prevention bit is pretty easy to circumvent, but even if PalmOS had a stronger protection mechanism, it wouldn't take much to come up with a way to circumvent that either. also, how would you develop your application so that it does not get erased when you take the battery out of your palm, I know it gets removed since it resides on RAM but how can you get around that? Store it in flash memory, assuming that the device has enough free flash memory. -- Dave Carrigan ([EMAIL PROTECTED])| Yow! Mr and Mrs PED, can I UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | borrow 26.7% of the RAYON Seattle, WA, USA| TEXTILE production of the http://www.rudedog.org/ | INDONESIAN archipelago? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Getting the event number
Joe - Thank you for your response. First, let me say that I am quite new to the Palm, so I do not have a great depth in knowledge about the inner workings. What I have created is a dynamic Popup List. That is, I get data from a DB and populate the list. +++ procedure ListFromDBCallBack(ItemNum: Int16; Bounds: RectanglePtr; var Items: PChar); var RecordHandle: MemHandle; RecordPtr: PChar; begin // TextPtr contains Edit and is placed at the end of the List // The global var, PSCurrentDB has to be used inside the CallBack if ItemNum = RecordCount(PSCurrentDB) - NumRemovedRecords(PSCurrentDB) then begin WinDrawChars(TextPtr, StrLen(TextPtr), Bounds.topLeft.x, Bounds.topLeft.y); end else begin // Place the items in the DB onto the List RecordHandle := DmQueryRecord(PSCurrentDB.Db, ItemNum); RecordPtr := MemHandleLock(RecordHandle); WinDrawChars(RecordPtr, StrLen(RecordPtr), Bounds.topLeft.x, Bounds.topLeft.y); MemHandleUnlock(RecordHandle); end; end; +++ This works like a champ. However, if I select any area *except* one of the items on the list, the List disappears leaving behind a blank area (no repainting of the Form). Todd -- Dr. Todd Cary Ariste Software 2200 D Street Extension Petaluma, CA 94952 707-773-4523 [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Can you run an app with the LCD turned off?
Does anybody know if there's a way to run an application with the LCD (display) turned off to conserve power? A search of the archives for procedure alarm turned up this post by Jim Schram: http://www.escribe.com/computing/pcpqa/m12458.html I would add another option to Jim's list: lock (one of) your app's code resource(s) and protect your app's database. This will prevent your callback from being moved. It will also prevent your app from being deleted, but that's pretty much a given with any procedure alarm. I've heard that the LCD drains a lot of power ... See Peter's post on this subject: http://www.escribe.com/computing/pcpqa/m44248.html I would assume I have no globals available Correct: your callback won't necessarily have access to globals. Your app may or may not be the current UI app at the time the callback is invoked. Any restrictions on running an event loop within a ProcAlarm? For non-procedure alarms (ie. using a launch code), there are two launches, one for trigger and one for display. The former isn't allowed to do UI (ie. run an event loop). The latter is. A procedure alarms only gets the equivalent of a trigger invocation. You're not allowed to do UI in a procedure alarm. You can use another (non-procedure) alarm if you needed to do UI. Or you could use the Attention Manager on Palm OS 4.0 and later. To summarize, what you're trying to do isn't easy, but is possible. :) -- Danny PalmSource -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: beaming
I always was under the impression that flash memory is part of RAM? please correct me. I tried to search for anything on flash memory on the palmOS website, no luck, any documents or manuals around I can read about this? about the locking of application. does that mean there is no way this can be done reliably, or at least more secure than the basic security bit in codewarriour? thanks for your help! - Original Message - From: Dave Carrigan [EMAIL PROTECTED] To: Palm Developer Forum [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 2:17 PM Subject: Re: beaming Rania Saymeh [EMAIL PROTECTED] writes: is there any other tricks?? No. You have to assume that if someone has full access to a device, they will be able to circumvent any kind of protection you can conceive. The copy prevention bit is pretty easy to circumvent, but even if PalmOS had a stronger protection mechanism, it wouldn't take much to come up with a way to circumvent that either. also, how would you develop your application so that it does not get erased when you take the battery out of your palm, I know it gets removed since it resides on RAM but how can you get around that? Store it in flash memory, assuming that the device has enough free flash memory. -- Dave Carrigan ([EMAIL PROTECTED])| Yow! Mr and Mrs PED, can I UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | borrow 26.7% of the RAYON Seattle, WA, USA| TEXTILE production of the http://www.rudedog.org/ | INDONESIAN archipelago? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Pbms with using Netlib on POSE
We are trying to develop an application where we would like 2 POSES running on two different machines to talk. These machines are on a network,and we have created sockets using Netlib. But seem to be getting errors with the Serial Manager like SlkReceivePacket. (The redirect netlib calls to tcp/ip is checked.) Is there an explanation/solution for this? Thank you Regards, Dharini -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Leftovers from deleting applications
If I set an alarm using AlmSetAlarm() and then the user deletes the application before the alarm is triggered, does the alarm manager handle this gracefully? If I create a feature using FtrPtrNew() and then the user deletes the application, does the feature manager clean up the feature automatically? Bob Whiteman -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
dynamic UI inconsistencies
Hi, I have been developing an application which dynamically constructs its UI based on passed in data. I have been developing with POSE 3.4 with the 3.5 color debug ROM and with the ROM from my Visor Neo. I dynamically create a popup trigger along with a list. This works fine on both ROMs ... but displays nothing on the actual device. It seems like the list gets created, but the popup does not. (I will keep digging, but I wondered if anyone else had encountered this.) Also, I am having to cheat and directly set usable to 0 on the list. I cannot find an API for this. On a slightly different topic - I also dynamically create bitmaps. When I do this, I use WinDrawPixel. This works fine on the device, but doesn't show anything in POSE. I haven't seen this problem reported before. Anyone else found this to be true? So... inconsistencies in behavior in both directions. Any thoughts are appreciated. Thank you, Ellen _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: beaming
Its not perfect, but have your app check the beam bit on startup, set it if its been cleared. It won't prevent them from clearing the bit and immediately beaming it but it would make it more annoying. If the device has Flash ROM (not an expansion card) copy your app into Flash. It will survive a hard reset (although you data won't fare too well). Units like the Handera have built-in utilities to copy apps to Flash. The same apps support most Palm hand helds with Flash. You could also consider distributing your app on a SD card. - Original Message - From: Rania Saymeh [EMAIL PROTECTED] To: Palm Developer Forum [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 1:05 PM Subject: beaming Hello, I am wondering if there is a way to lock applications so that they can't be beamed, or unlocked by Beam Crack. I know there is a security bit in codewarriour that locks the application, but it seems that Beam crach will unlock it and it will be able to be beamed. is there any other tricks?? also, how would you develop your application so that it does not get erased when you take the battery out of your palm, I know it gets removed since it resides on RAM but how can you get around that? any input is appricated. thanks Rania. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Getting the event number
Also, have you made your list popup save behind itself? This should redraw the hold in your form, and suppress the update event. However, a robust app does not rely on this. Do you really need to do this? Can you even? In Constructor, the Save Behind checkbox only exists for forms, not for list objects. At least in my version. Oliver __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Opening database as file.
Hi all Is it possible to open an existing palm database file?? I tried this code... fileHandle = FileOpen (0,addressdb.pdb,sysFileTFileStream,sysFileCAddress,fileModeReadOnly ,errp); and fileErrNotFound is returned. thanks rayesh _ Do You Yahoo!? Get your free yahoo.com address at 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: Cradle event
I like Dave's second suggestion i.e. of a small application that monitors the cradle and launches the application with a custom launch code. Thanks, Jatin Sethi Stringer [EMAIL PROTECTED] wrote in message news:82403@palm-dev-forum... Subject: Re: Cradle event as a custom notification From: Dave Lippincott [EMAIL PROTECTED] Date: Mon, 1 Apr 2002 13:58:28 -0500 Run the Prefs app, select buttons from the drop down list then tap the button labeled 'Hotsync...' - Original Message - From: Jatin Sethi [EMAIL PROTECTED] Sent: Monday, April 01, 2002 12:40 PM Subject: Cradle event as a custom notification Hi Everyone: Is there a way to detect the cradle event and launch an application with it? I have been able to trap the cradle event when my application is running. I want my application to be launched with the cradle event whenever the unit is cradled. Dave's advice is correct. The only drawback is your application doesn't know how it was launched. The Launch codes that would seem to be applicable to the HotSync buttons aren't passed through to applications. So you don't get the cradle event. I don't know of any way to get that, even after substantial investigation. Roger Stringer Marietta Systems, Inc. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Getting the event number
At 11:56 AM 2/4/2002 -0800, you wrote: Also, have you made your list popup save behind itself? This should redraw the hold in your form, and suppress the update event. However, a robust app does not rely on this. Do you really need to do this? Can you even? In Constructor, the Save Behind checkbox only exists for forms, not for list objects. At least in my version. Oliver Oops, you seem to be right. Anyway, the point was that one should code for the update... Matt -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Leftovers from deleting applications
Good questions... If I set an alarm using AlmSetAlarm() and then the user deletes the application before the alarm is triggered, does the alarm manager handle this gracefully? The docs don't say; they probably should. When your app is deleted, the system automatically deletes any alarms that were registered by the app. For this to work, your app must pass its card number and LocalID to AlmSetAlarm(). There is no card number or LocalID parameter to AlmSetProcAlarm, so this doesn't apply to procedure alarms. You don't have much choice, really. You can't, generally speaking, register to be notified when your app is deleted. So you don't have an opportunity to unregister your alarms before you're deleted. The exception is if your database is protected, and only on Palm OS 4.0 and later. Then you can register to be notified before you're deleted; see sysNotifyDeleteProtectedEvent. This enables you to unregister your procedure alarm, unlock your code resource, and unprotect your database, allowing the delete to proceed without error. Note that the cleanup must occur when the database is deleted. There is no way to validate a LocalID. If I create a feature using FtrPtrNew() and then the user deletes the application, does the feature manager clean up the feature automatically? This question's been asked before, but I don't see any answers: http://www.escribe.com/computing/pcpqa/m22746.html The docs don't say one way or the other. I would have thought the answer was yes, both for regular features and for feature pointers, but I don't see this in the code. It's probably worth doing some experiments with various versions of Palm OS to confirm this behavior. Of course both features and feature pointers are deleted on reset. Again, generally speaking, you don't have an opportunity to delete your features before you're deleted, so you don't have much choice. -- Danny PalmSource -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Basic C question
This works StrCopy(record.Date, 34857384573498573498); This fails = StrCopy(record.Date, encDate); It says that Application just read from memory location X which is the unused portion of the stack. The stack is the area of RAM used to contain function parameters and local variables. Applications may access the area of the stack above the stack pointer, but not below it. All I want to to is get the value of encDate into record.Date. I cant see why this is failing unless I am missing something. Any ideas? Thanks, Ed. John Leung wrote: Try replace the following line Char *encDate = 34857384573498573498; with Char encDate[] = 34857384573498573498; Also, have you ever tried the following before? StrCopy(record.Date, 34857384573498573498); The I can only assume what you have left out of your example, but with these assumptions it is correct it should be typedef struct RecData { Char Date[256]; } RecData; void AddToDateDatabase(RecData* v); void foo() { RecData record; Char *encDate = 34857384573498573498; StrCopy(record.Date, encdate);// Generally better use StrNCopy() and clear out the last Char (not byte!) error = AddToDateDatabase(record); } -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Basic C question
Ed == Ed [EMAIL PROTECTED] scribbles: Ed This works StrCopy(record.Date, Ed 34857384573498573498); This fails = Ed StrCopy(record.Date, encDate); It says that Application just Ed read from memory location X which is the unused portion of the Ed stack. The stack is the area of RAM used to contain function Ed parameters and local variables. Applications may access the Ed area of the stack above the stack pointer, but not below it. What is the real declaration of Record? Sounds like you are writing off the end of the array, and hence the stack. Jake -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Basic C question
Looks like you are passing the variable instead of its address for the second parameter. StrCopy expects a src and dst string address. Try passing (Char *)encDate. Regards, Charu -Original Message- From: Ed [EMAIL PROTECTED] To: Palm Developer Forum [EMAIL PROTECTED] Date: Tuesday, April 02, 2002 4:00 PM Subject: Re: Basic C question This works StrCopy(record.Date, 34857384573498573498); This fails = StrCopy(record.Date, encDate); It says that Application just read from memory location X which is the unused portion of the stack. The stack is the area of RAM used to contain function parameters and local variables. Applications may access the area of the stack above the stack pointer, but not below it. All I want to to is get the value of encDate into record.Date. I cant see why this is failing unless I am missing something. Any ideas? Thanks, Ed. John Leung wrote: Try replace the following line Char *encDate = 34857384573498573498; with Char encDate[] = 34857384573498573498; Also, have you ever tried the following before? StrCopy(record.Date, 34857384573498573498); The I can only assume what you have left out of your example, but with these assumptions it is correct it should be typedef struct RecData { Char Date[256]; } RecData; void AddToDateDatabase(RecData* v); void foo() { RecData record; Char *encDate = 34857384573498573498; StrCopy(record.Date, encdate);// Generally better use StrNCopy() and clear out the last Char (not byte!) error = AddToDateDatabase(record); } -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Can you run an app with the LCD turned off?
Danny, Thanks for the great references. It seems the easiest and (unfortunately) sneakiest approach would be to call the (undocumented) sysTrapHwrDisplaySleep which before OS 3.5 was sysTrapHwrLCDSleep. This way I wouldn't have to change the overall way my application runs. I'm using alarms to automatically start and stop my app, so the more supported route is using procedure alarms (even though its in a way they were probably not originally intended to be used.) From reading the articles you referenced it occurred to me that to get around the potentially tricky issues of locking and protecting my databases and resources I could instead briefly wake up with a non-procedure alarm, SysUIAppSwitch() to my app, register a procedure alarm with a pointer to one of my app's functions to trigger immediately, and then power the device off programmatically. When the procedure alarm triggers I could then be assured that my function pointer is still valid (since my app's code resource is currently loaded) and my globals are available. Is that right? When I'm done running in my ProcAlarm routine, I set another non-procedure alarm to wake up my app again so that it can continue where it left off and shut down (which may entail restoring whatever app was running before mine came up). This way I avoid loading and unloading entire applications during the procedure alarm (though I'm not sure if I should worry about this or not.) This approach requires that the device fully power up briefly once when the app starts up, and once again when it shuts down. I know alarms deliver 2 launch codes: Does the device power up fully before either is delivered, or only for the latter? If so, would it be dangerous to do my start-up and shut-down when the first alarm launch code triggers? The documentation says you should do very little when the first alarm launch code is triggered. I would normally wait for the second launch code, make sure my app is loaded (or launch it if it is not) and then do my work. Should I assume a SysUIAppSwitch() is too much to perform on the first alarm launch code? Thanks again for your help, Scott Schoen Danny Epstein [EMAIL PROTECTED] wrote in message news:82466@palm-dev-forum... Does anybody know if there's a way to run an application with the LCD (display) turned off to conserve power? A search of the archives for procedure alarm turned up this post by Jim Schram: http://www.escribe.com/computing/pcpqa/m12458.html I would add another option to Jim's list: lock (one of) your app's code resource(s) and protect your app's database. This will prevent your callback from being moved. It will also prevent your app from being deleted, but that's pretty much a given with any procedure alarm. I've heard that the LCD drains a lot of power ... See Peter's post on this subject: http://www.escribe.com/computing/pcpqa/m44248.html I would assume I have no globals available Correct: your callback won't necessarily have access to globals. Your app may or may not be the current UI app at the time the callback is invoked. Any restrictions on running an event loop within a ProcAlarm? For non-procedure alarms (ie. using a launch code), there are two launches, one for trigger and one for display. The former isn't allowed to do UI (ie. run an event loop). The latter is. A procedure alarms only gets the equivalent of a trigger invocation. You're not allowed to do UI in a procedure alarm. You can use another (non-procedure) alarm if you needed to do UI. Or you could use the Attention Manager on Palm OS 4.0 and later. To summarize, what you're trying to do isn't easy, but is possible. :) -- Danny @ PalmSource -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Opening database as file.
Is it possible to open an existing palm database file?? In Palm OS, we use different terminology. A database is not a file. In fact, it's sort of the other way around. A file stream is a kind of database. Both are completely different than VFS files which live on expansion cards. I tried this code... fileHandle = FileOpen (0,addressdb.pdb,sysFileTFileStream,sysFileCAddress,fileModeReadOnly ,errp); and fileErrNotFound is returned. You're trying to open Address Book's database as if it was a file stream. See my answer to a similar question (or search for open database file): http://www.escribe.com/computing/pcpqa/m55408.html The reason you're getting a different error code from FileOpen is that you're including an extension in the file/database name and you're using the wrong case. Database names (and, by extension, file stream names) don't generally have extensions. The exception is PQAs. Database names (and, therefore, file stream names) are case sensitive. If you used AddressDB for the second parameter to FileOpen, you'd get fileErrorInvalidDescriptor instead. Not much of an improvement, really. :) If you want a flattened version of AddressDB, use ExgDBWrite to stream it out. There is an example of using this function to beam a database in the Knowledge Base. If, on the other hand, you're trying to read individual records in Address Book's database, use the Data Manager. How to read Address Book's database has been discussed on this forum; search the archives for info on the database format. Beware that PalmSource or any of our licensees could change this format in the future. I think David Fedor announced that we (PalmSource) wouldn't make any changes to the PIM app data formats in Palm OS 5, but probably would in the next version of Palm OS. -- Danny PalmSource -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Basic C question
I can see why Char *encDate = 34857384573498573498; might fail. Because you're assigning a pointer to some temp variable. It depends on when that temp variable decides to go out of scope, that pointer may no longer be valid. (Although I could be wrong. I'm not a C expert.) However, I'm not sure why Char encDate[] = 34857384573498573498; fails. Because this time you're actually creating a variable on the stack and initialize the content with the indicated string. I'm sorry I couldn't help you further. At 01:54 PM 02/04/2002 -0800, Ed wrote: This works StrCopy(record.Date, 34857384573498573498); This fails = StrCopy(record.Date, encDate); It says that Application just read from memory location X which is the unused portion of the stack. The stack is the area of RAM used to contain function parameters and local variables. Applications may access the area of the stack above the stack pointer, but not below it. All I want to to is get the value of encDate into record.Date. I cant see why this is failing unless I am missing something. Any ideas? Thanks, Ed. John Leung wrote: Try replace the following line Char *encDate = 34857384573498573498; with Char encDate[] = 34857384573498573498; Also, have you ever tried the following before? StrCopy(record.Date, 34857384573498573498); The I can only assume what you have left out of your example, but with these assumptions it is correct it should be typedef struct RecData { Char Date[256]; } RecData; void AddToDateDatabase(RecData* v); void foo() { RecData record; Char *encDate = 34857384573498573498; StrCopy(record.Date, encdate);// Generally better use StrNCopy() and clear out the last Char (not byte!) error = AddToDateDatabase(record); } -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ John Leung EMail: [EMAIL PROTECTED] Web: http://persweb.direct.ca/jleung/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Basic C question
Jake == Jake Donham [EMAIL PROTECTED] asserts: Jake What is the real declaration of Record? Sounds like you are Jake writing off the end of the array, and hence the stack. Um, retract :). Jake -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: dynamic UI inconsistencies
Ooops... resolved the popup trigger problem. (Don't ask.) Still have the pixel problem though. Can anyone use WinDrawPixel in POSE? Ellen From: Ellen Dash [EMAIL PROTECTED] Reply-To: Palm Developer Forum [EMAIL PROTECTED] To: Palm Developer Forum [EMAIL PROTECTED] Subject: dynamic UI inconsistencies Date: Tue, 02 Apr 2002 14:51:13 -0500 Hi, I have been developing an application which dynamically constructs its UI based on passed in data. I have been developing with POSE 3.4 with the 3.5 color debug ROM and with the ROM from my Visor Neo. I dynamically create a popup trigger along with a list. This works fine on both ROMs ... but displays nothing on the actual device. It seems like the list gets created, but the popup does not. (I will keep digging, but I wondered if anyone else had encountered this.) Also, I am having to cheat and directly set usable to 0 on the list. I cannot find an API for this. On a slightly different topic - I also dynamically create bitmaps. When I do this, I use WinDrawPixel. This works fine on the device, but doesn't show anything in POSE. I haven't seen this problem reported before. Anyone else found this to be true? So... inconsistencies in behavior in both directions. Any thoughts are appreciated. Thank you, Ellen _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
problem with windrawbitmap
hi guys i am having trouble using this function. the program runs properly on the emulator but hangs on palm as soon as this function is executed. can anyone suggest what may be the problem? thanks, amit __ 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: dynamic UI inconsistencies
--- Ellen Dash [EMAIL PROTECTED] wrote: Still have the pixel problem though. Can anyone use WinDrawPixel in POSE? I can, so I assume many others can, too. WinDrawPixel, which works only on 3.5 and later (3.5 New Feature Set), draws in the current draw window using the current foreground color. So, make sure that the ROM is for 3.5 or later, the current draw window is the one you think it is, and that the current foreground color is something you can see in that window. __ 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: Basic C question
From: Ed [EMAIL PROTECTED] This works StrCopy(record.Date, 34857384573498573498); This fails = StrCopy(record.Date, encDate); It says that Application just read from memory location X which is the unused portion of the stack. The stack is the area of RAM Need to know a little more to comment usefully. Are you using encDate in the function it's declared in or returning it from another function? Generally stack-based problems are caused by returning a pointer to a local variable which will then cause any access to that pointer to fail because the stack area that it was defined at has been unstacked. Chris Tutty -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
ASCII Value
Is there a function that takes in an ASCII value and spits out the character? Sort of like the Chr$() function in VB... Maybe I missed it. Ed. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: ASCII Value
Is there a function that takes in an ASCII value and spits out the character? Sort of like the Chr$() function in VB... Ed, Assuming we're talking about C here, check out the char datatype in any C programming book. If by spit out you mean printing on screen, check out, for example, the WinDrawChar() API. Oliver __ 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: ASCII Value
--- Ed [EMAIL PROTECTED] wrote: Is there a function that takes in an ASCII value and spits out the character? Sort of like the Chr$() function in VB... Maybe I missed it. In C there isn't much difference between an int and a char, so you can do something like this: int i = 80; char c = (char)i; StrPrintF(msg, int %i is char %c, i, c); WinDrawChars(msg, StrLen(msg), 20, 65); Note, however, that the character set used on Palm OS devices is not exactly the same as ASCII. See AsciiChart.prc at PalmGear (http://www.palmgear.com/software/showsoftware.cfm?sid=50267020020402181508prodID=217) or Handango for a program that displays the character sets on your handheld. __ 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: Gotcha's for custom launchers?
Are there any things that a replacement launcher app has to do that may not be obvious? These may be obvious, but I'll let you decide... Register for and handle incoming beamed databases. You'll need to register for extensions prc, pdb, pqa, and oprc, as well as MIME types application/x-pilot and application/vnd.palm. Or you can let the built-in launcher handle these. If you decide to take over this responsibility, you should set your launcher as the default for all these extensions and MIME types. (This is only possible on Palm OS 4.0 and later.) If a database already exists with the same name, ask the user if it's okay to delete it. Ideally, avoid losing the original if the user cancels an overwrite. Expect to receive multiple databases in a single session on Palm OS 4.0 and later. The first will be the app; the rest will be the overlay and bundled databases. Don't ask the user if they want to accept each of these individually. Handle the subsequent goto launch, switching categories and scrolling if necessary to make the received app's icon visible. Support beaming apps. Beam overlays and bundled databases in the same session on Palm OS 4.0 and later. Don't beam copy-protected databases (apps, overlays, or bundled databases). Support beaming apps directly from a card. If the user's preference for the Ronamatic stroke is beaming, this stroke should bring up the Beam dialog in your launcher. Support Send, as well as Beam, on Palm OS 4.0 and later. On a Palm VII, handle the antenna raised launch command and switch to the wireless category. Register for and handle card inserted and card removed events. Support launching from a card. Delete the app from main memory when it quits, but keep its databases and preferences around in case the user runs it again. Rotate through the categories when the silk-screen Home button is tapped repeatedly. -- Danny PalmSource -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Comparison Commentary?
Greetings, Before I get too involved with my development project(s) would anyone like to share their opinions or experiences when dealing with CodeWarrior versus the other 'free' choices for application tools? -Pete -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
menus and VFS mount notifications
I've written a simple application that views some files on mounted VFS volumes. It registers callbacks for the sysNotifyVolumeMounted and sysNotifyVolumeUnmounted notifications. When the memory card is inserted, it shows appropriate widgets; when the card is removed, it hides all of the widgets and displays a Please insert a memory card. label. Unfortunately it seems that things go awry when a menu is visible. The system does not dismiss menus automatically when issuing mount/unmount notifications (why not?), so when my application hides/unhides its widgets with FrmHideObject and FrmShowObject, all the drawing gets done in the menu's window. Here are some problems I've noted: * There does not seem to be a direct way to dismiss a menu manually using the public API. * There are no glue routines to determine if a menu is visible. If I can determine if a menu is visible, then I can issue a vchrMenu keyDownEvent to dismiss the menu. * Always calling MenuEraseMenu first in the mount/unmount callbacks works and seems to be the simplest solution, except that its interface is not publicly documented. (Again, why not?) * Following the SDK reference's suggestion of monitoring winEnter and winExit events would work, but this seems a bit convoluted to me, especially since I'm not calling any drawing routines explicitly. Does anyone have any other suggestions about how to go about avoiding this issue, or is checking winEnter/winExit really the best thing to do? Thanks, - James -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
saving Bitmaps to resources
What is the proper way of saving a Bitmap to a resource? I remember someone from PalmSource mentioning that one can't copy the Bitmap directly, because the bitmap header and the bitmap data may not be contiguous in memory. I've looked in the eScribe archives, but I guess my search-fu is lacking. My guess is that I should do something like: UInt32 dataSize; UInt32 headerSize; BmpGetSizes(bmpP, dataSize, headerSize); resH = DmNewResource(dbP, bitmapRsc, id, dataSize + headerSize); resP = MemHandleLock(resH); DmWrite(resP, 0, bmpP, headerSize); DmWrite(resP, headerSize, BmpGetBits(bmpP), dataSize); (I haven't tested the above code, and it obviously skips a lot of steps.) One problem I foresee with the above, however, is that if the header and data are not contiguous in memory, then the bitmap will have the indirect bit set in the bitmap header. After I copy the data into a resource, however, the header and data WILL be contiguous. How can I turn off the indirect bit? The SDK reference discourages changing the bit manually, and it's inaccessible without diving into the Bitmap internals anyway. If I create a new bitmap with BmpCreate or WinCreateOffscreenWindow, is there any guarantee that the header and data will be contiguous? Thanks, - James -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Syncing Address Book
Hi, Can someone explain me how to configure the Syncing of Palm Address book with Desktop? I mean, how to specify which records from Address book to Sync? I dont want to completely sync the complete Address book. In other words, I want to apply filters while Syncing address book. Please help. Regards, - Rakesh. ~~~ Rakesh D. V Member of Technical Staff, Persistent Systems Pvt Ltd, Pune - INDIA. Phone: +91-20 5678900 ext 159 Email ID: [EMAIL PROTECTED] ~~~ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
popUp List Problem - Please help!
Hi, I have a dynamically generated list which is assigned to a popUp trigger . This is the way how i display the list . // The ListID is attached to the PopUpTrigger at Design time. case MyPopTrigger: InitMainForm(); // This func populated the list dynamically. frm = GetActiveFrom(); list = FrmGetObjectPtr(frm,FrnGetObjectIndex(frm,DynamicList)); LstPopUpList(lst); break; This draws the List when i click on the PopUpTrigger. But I cant select it again only once i can do it. Also I dont know how to get the the text of the selected item fom the popup list (is it lstSelectEvent/PopSelectEvent with some func() to retrieve the value). Can some one tell me which is the best way to dynamically load the list and get the selected item text on to another variable. Thanks in Advance Dhanushka. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/