Re: Palm OS Plumbing: Key and Pen flushes don't flush
I recall having a similar issue. I created a loop to eat the events, but it didn't always work. I never found a solution that worked 100%. Bob. That's a nice idea. However, it didn't seem to work: PerformLongOperation(); do { EvtGetEvent(evt, 1); } while(evt.eType != nilEvent); I generated pen hits during the long opeartion, and they were still processed afterwards. Jonathan -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Flickering while draw image
Christian Giordano wrote: I'm trying to animate an image, so I'm drawing it every nilEvent with a different position. What I get though, is a very annoying flickering regardless the timeout of the EvtGetEvent (tried with short time). Mukesh mentioned locking the window, here's another way: Create an offscreen window, draw everything onto that window, then copy over the entire image to the screen when you are done. This will eliminate your flickering entirely. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to deal with 'Start-up codes is greater than 64 K' warning message ??
Remember that although the stated limit is about 64k the practical limit for randomly addressable code is 32k. This is because you have to be able to move forward AND back within that code block, and the address is 2-bytes, so this gives you +/- 32k. There are ways to get around this issue, but I understand that they are a PITA. Hi Manish, Is your file size is 54k or it is the size of the segment, if your single file size is 54k , than u require to divide ur some of the functionality to other files. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Flickering while draw image
Christian Giordano wrote: well, the flickering is almost entirely gone. But I wouldn't say entirely, but probably behaves like the screen of normal PC, so I reckon it is definitely acceptable. If done right there should be no flicker at all. But it depends on what you are calling flicker. Generally, the screen image is rendered in layers, with foreground bitmaps/text overlaying the background ones. Depending on how complex your rendering is (read: time-consuming) your elements may seem to flicker on/off as the layering cycle repeats each time you draw the screen. That's the flicker I'm talking about, and it will be entirely eliminated by using offscreen windows. The image will appear all at once, with no flicker from the beginning of the rendering to the end. But if you are talking about animation, and the smoothness of a graphic moving around the screen, then, yes, that kind of flicker will still exist, since the moving image must be drawn in discreet positions on the screen. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: .pdb - HotSync, 256 limit?
Hal Mueller wrote: How are you validating the PDB (that is, what makes you think the PDB meets the spec)? The file format specifications are published, so it's not like it is guesswork. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to create global variable more than 64K size
hvreddy wrote: Hi All, Is it possible to create a global variable of size more than 64K in palm os? I tryed to create more than 64K size of array but the linker is giving error.Even i tryed using memptrNew also .Here also it gives the same error. Is there a limitation for global variable size should not be more than 64K? If so how can i solve this problem? Is there any way to over come this? You should spend some time with the reference documentation. The docs are pretty clear that MemPtrNew() is limited to 64k, but that, if you want to allocate a chunk bigger than 64k, you can use MemGluePtrNew(). FtrPtrNew(), which will also allow you to allocate chunks 64k. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Found X memory leak for my program
Luca Bertoncello wrote: Hi, list! I have a little problem, with my program... I develop it with gcc on my Linux-PC and test it with POSE. I can start it and use it, without warning or error, but when I exit from this application, POSE say: Found X memory leak for SMS Pro (1.00). Information concerning the leak can be found in the log file. X depends on the action I did with my program... In the Log-File I see: snip What does it means? How can I find the code that generate this Memory Leaks? This means that you have allocated some memory in your program but have forgotten to clean it up. Every MemPtrNew() or MemHandleNew() statement should be matched by a corresponding MemPtrFree() or MemHandleFree() statement. You can sometimes figure out where the missing statement belongs by looking at the size of the memory leak. For instance, if you are leaking a 64byte chunk, you might try looking for any instances of New(64) in your code, and see if you have forgotten to Free those allocations. Also, normal troubleshooting comes into play, where you repeatedly run the program and exit, and try to spot a minimum number of repeatable operations in your program that cause the leak, and, thereby, spot which of your functions must be the culprit. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: 5 way navigation - Menu
Srdan wrote: I have implemented 5 way navigation into my app, but I can't use it with Menu or menu items. Is there any solution for this? Your problem description is not exactly clear. By implemented 5-way navigation you mean that you are manually handling the 5-way navigator button presses, instead of allowing the system to handle them, and are manually positioning the focus ring in your app? And by can't use it with Menu or menu items you mean that once the menu is open you cannot use the 5-way navigator to move around the menu items, while, presumably, you can still use the stylus? -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Load BMP from a specified location
Anoop wrote: We have posted this thread before , but then we had problem in getting a clear image.. The image seems to be blurred and inverted.. What could be the reason behind this... Is the bitmap that you are accessing from the folder a WinOS bitmap, and you are trying to display it on a PalmOS device? The structure of a PalmOS bitmap is not the same as a WinOS bitmap, and you have to convert it (either in your own program or using a 3rd party library) before it will dislpay correctly. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Dynamically drawing list
[EMAIL PROTECTED] wrote: I am dynamically drawing the list items from the database using callback function : LstSetDrawFunction The problem is, it displays the records in order which is been saved in Database (the first record that is saved first is displayed first). I want to display the latest record that is been saved in the first row so on. Any Help would be highly appriciated Thanks in advance Your are telling the list to display information from the entries in your database. Unless you specifically tell it otherwise, why would it NOT display the results in the same order that the records are found in the database? There should be no surprise here. There are lots of options. Here are 4: 1. Sort the records in the database, using the DmSort() function, into whatever order you like, before you display the list. 2. Leave the record order alone, but build a separate memory chunk that copies the desired info from the records, sort that, and point the drawfunction to that memory, instead of to the records themselves. 3. Build the list in reverse order. When you create a new record, give it index 0, so new records will always be added to the top. 4. Change your drawback function so that it switches the order for you. If you have 100 records in your DB, and your drawfunction is drawing the 10th element in the list, then, instead of displaying the data for record 10, display the data for record 100 - 10, and so on. Option 3 and 4 are, by far, the quickest to implement. I would probably choose number 4 if you have already gathered some data and would like to continue to do so without making any other changes. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Monitor Palm resets
Regis Melo wrote: case sysAppLaunchCmdSystemReset : // write my code here to write a PDB! My question is - Is it possible to write a PDB when a reset event occurs? Remember that that launch code is sent AFTER the reset has happened, and just as the device is starting up again. You can certainly access, and write to, database records in response to this launch code. And,... like Jeff said, globals will not be available. Trying to access globals at that time will most likely cause a crash, and probably a reset loop (nasty business that, for those who don't know how to break out). -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Problem: Adding Calendar items with Alarms
Ambrose Krapacs wrote: I know there are certain system events that trigger the Calendar to recalculate the alarms (like hotsync and soft reset) but we obviously do not want to do this every time we add a calendar item with an alarm. You don't actually have to do a reset. I think you could just manually send a 'reset' notification, and then the Calendar app will then do what it does by default, performing the recalculation for you. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Virtual key handling on 700p
Hi Folks, Is there an understood problem on the 700p with virtual key handling? I've gotten reports from 700p users that merely registering for the sysNotifyVirtualCharHandlingEvent event causes SIGNIFICANT system slowdowns. My app is only interested in one key code, and all others are ignored, but just the act of listening to the virtual keys seems to cause the slowdown. This listening is virtually instantaneous on any OS5 devices that I have tested previously (various Tungstens, Treo6xx, etc.). And, I don't know if this is ALL 700p devices, or just some; since some users don't report a significant problem. Any insight? TIA. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Device ID for Palm Zire 22
Tam Hanna wrote: Hi, I had a Z22 shortly for review a few days ago(raised this a few days earlier and I still had the loaner), and AFAIK, it returns a code beginning with D 'D051' -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Getting the processor temperature
Luc Le Blanc wrote: ...the processor temperature would be a good enough approximation to ambient temperature. What makes you say this? Ambient temperature is the temperature of the air surrounding... well... something. Computer processors tend to run quite hot (hence all those fancy heat sinks on processor chips) so they behave like heater elements. The processor temp will go up/down depending on how much it is running, and on its load when running. If you think of your kitchen oven set to 350 degF, the ambient temp inside the oven is 350, while the heater element, when running, glows red hot (I dunno, perhaps 1000 degF?). If it is really ambient temperature that you need to measure, then I believe that referring to the processor temp (if it is even avaliable) would not give you the info that you are looking for. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Is there any method for zoom in zoom out of bitmap images in palm
Kishor Bhushan wrote: Hi I am new to Palm os so i want to know, is there any method for zoom in and zoom out of bitmap images in palm os if yes plz give example thank you No, there are no system functions to do this. You either have to create your own functions or find a 3rd party library to do the work for you. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: FrmCustomAlert failure after SysAppLaunch
John Sutton wrote: Jeff I'm not sure if I'm dreaming this, but I think I once had a problem with empty strings. I recall something like that too. FWIW try putting something inside the two empty strings just to rule out my paranoia. ie. FrmCustomAlert( MessageAlert, whatever, should be empty, should also be empty ); Right. I started, some time ago, simply passing (a single space character string), for those parts of the FrmCustomAlert that should otherwise be blank.. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Help me. LstSetListChoices is not working..
Jinyoung Lee wrote: Function LstSetListChoices is not working.. It crushes the emulator without error message.. snip __ void FillLetsCookFormListWithData(ListType *titleLst, ListType *categoryLst, ListType *yieldLst) { What about those input parameters? Do they actually point to valid ListType objects? -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Help me. LstSetListChoices is not working..
Actually, on second thought, I'm thinking that the problem might not be the call to LstSetListChoices at all. The ListType objects may still be invalid, but the bigger mistake would be that you allocated memory for the list elements within your FillLetsCookFormListWithData function(). As soon as you exit that function those memory allocations become invalid, so, when the list tries to draw (not AT the LstSetListChoices command, but probably shortly thereafter) it will crash. Jinyoung Lee wrote: Function LstSetListChoices is not working.. It crushes the emulator without error message.. snip __ void FillLetsCookFormListWithData(ListType *titleLst, ListType *categoryLst, ListType *yieldLst) { What about those input parameters? Do they actually point to valid ListType objects? -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Help me. LstSetListChoices is not working..
Hi Dean, On Thu, 23 Mar 2006, Robert Moynihan wrote: Actually, on second thought, I'm thinking that the problem might not be the call to LstSetListChoices at all. The ListType objects may still be invalid, but the bigger mistake would be that you allocated memory for the list elements within your FillLetsCookFormListWithData function(). As soon as you exit that function those memory allocations become invalid, so, when the list tries to draw (not AT the LstSetListChoices command, but probably shortly thereafter) it will crash. This isn't correct; the memory allocations the OP did were done with MemPtrNew and MemHandleNew. Those don't become invalid on exit from the function where they were done. Dean But the OP declared them within the context of that function, so those variables (titleItemList, etc.) become invalid for use by the list after the function exits. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Help me. LstSetListChoices is not working..
Robert Moynihan wrote: Hi Dean, On Thu, 23 Mar 2006, Robert Moynihan wrote: Actually, on second thought, I'm thinking that the problem might not be the call to LstSetListChoices at all. The ListType objects may still be invalid, but the bigger mistake would be that you allocated memory for the list elements within your FillLetsCookFormListWithData function(). As soon as you exit that function those memory allocations become invalid, so, when the list tries to draw (not AT the LstSetListChoices command, but probably shortly thereafter) it will crash. This isn't correct; the memory allocations the OP did were done with MemPtrNew and MemHandleNew. Those don't become invalid on exit from the function where they were done. Dean But the OP declared them within the context of that function, so those variables (titleItemList, etc.) become invalid for use by the list after the function exits. Err I see what you are saying. The memory allocations themselves are not invalid after exiting the function, but the immediate reference to them (the variable declarations) are. So the OP would have to be careful to free that memory using pointers derived from the list itself. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Help me. LstSetListChoices is not working..
Dean Gahlon wrote: (I also suspect that Thomas Damme's message on this topic (to allocate StrLen(...)+1 rather than StrLen(...)) is more where the OP's problem lies.) I agree 100%. That is fundamental error that, really, couldn't help but crash. I didn't see that problem during my first quick glance at the OP's function. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: FatalAlert Problem
Daniel Seifert wrote: Hi, Am Freitag, den 17.03.2006, 10:30 +0530 schrieb sanjib mohanty: Hai all Thanks for replying As daneil suggest the solution, I checked all the MemHandleLock and corresponding Unlocks, DmReleaseRecord and DmGetRecord, all were matched properly. You should be matching more than just those. Something like: MemHandleNew with MemHandleFree MemHandleLock with MemHandleUnlock MemPtrNew with MemPtrFree DmGetRecord with DmReleaseRecord DmNewRecord with DmReleaseRecord etc... There are variations on these; for instance you could use a MemPtrUnlock after a MemHandleLock, unlocking the pointer instead of the handle, but I prefer to match the lock and unlock on the handle. There are any number of ways that you can mess up the memory. For instance, you can write to memory that doesn't belong to your app, in ways that the emulator or simulator won't catch. In such cases you might experience a crash after you exit your app and are accessing some other application. These can be very difficult to troubleshoot, and you will need to do extensive testing to locate a pattern, then disable parts of your code to try to make the error disappear/happen reliably. Then you will know that you have found the error, and you will have a way to test your fix. My suggestion would be to simplify your app, bypassing large parts of your code, until you can get it to run reliably with no crashes. Then enable sections at a time until the crashes start to reappear. Fix the problem in that function, and look for any other instances where you handle memory the same way, and fix those too. Then keep enabling more parts until the whole thing works properly. Yes, this can be a painful, time-consuming process. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How can I build a simple prc for weight calculations in the jet I fly?
[EMAIL PROTECTED] wrote: It would make my day easier if I could design a simple calculator for my treo that would be able to calculate the weight of the jet I fly. I have to do this with a calculator 6 times a day, and it's getting kind of old. snip I would suggest that you simply use a programmable calculator, and there are plenty of those for PalmOS. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: docs
[EMAIL PROTECTED] wrote: I had thought about docs to go, but I thought it might be interesting to look into creating the thing myself. Although I assume it would most likely take me longer to create it than I would save by having it to use. The programmable calculator method simply allows you to punch in a series of numbers and tap a 'run' button to see the result. The 'docs to go' type solutions will do the same thing, but they will probably take a extra keystrokes. I guess what people are saying is that you don't need to reinvent the wheel -- unless you want to. ;) -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: how to install my application to the palm?
Diana wrote: I'm really really new to all of this. I've created, tested and debugged my application on the simulators. But now that i'm finished...how do i put it on my treo650? Do i just install the .prc file to the palm and hot sync or do i need to create a make file? In need of help. Just upload the prc file to RAM on your Treo -- just like ANY application. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Time an application to run
Diana wrote: Hi, I'm new to developing on palm os. I have an application that I want to run 3 times a day but I'm unsure as how it would automatically launch. Can someone help me? Thank you. Set an alarm, and do whatever you want when your app wakes up to the alarm notification. Then set another alarm for 8hrs in the future. -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Timer
Nicolás Balparda Bossi wrote: Could anyone give me some advice on how to use a timer on palm? I really cant find anything useful :( Have you looked at the Alarm Manager part of the Palm OS Reference? You set an alarm (or we could say 'timer') using AlmSetAlarm() and then, when the time arrives, the system will send your app an alarm notification, at which point you can handle it however you want -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Problem to create the first record of my database
[EMAIL PROTECTED] wrote: Hello, I create a database and I want to store records in it. The problem is that when I want to create the first record, the function DmNumRecords returns 83 and not 0 ! If I create the first record with the index 0, everything seems good but the record is not created (I use the View databases tool of the emulator). After, if I add some other records, it works and they are well stored in the DB. Heres is an extract of my code : //Create the database DmCreateDatabase (0, cmlgaumontstatdb, 'CEDM', 'DATA', false); //Retrieve database ID DBId = DmFindDatabase (0, cmlgaumontdb); How come the name of the database that you 'create', and then the one that you 'find', are different? -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Problem to create the first record of my database
[EMAIL PROTECTED] wrote: In fact it is not normal and tht's why I have a problem. I must be blind !!! Thanks Just another example of how hard it is to proofread your own code. One other comment that I would have it that you don't test the return values to make sure that they are valid before using them. You'll run into touble, at some point, if you don't. I edited your code (below) so that it would avoid crashing if those calls failed. You might also consider adding error messages so that the user knows what happened when expected new records don't show up. DmCreateDatabase (0, cmlgaumontstatdb, 'CEDM', 'DATA', false); DBId = DmFindDatabase (0, cmlgaumontdb); if (DBId){ DBOpenRef = DmOpenDatabase (0, DBId, dmModeReadWrite); if (DBOpenRef){ index = DmNumRecords (DBOpenRef); pNewRecord = DmNewRecord (DBOpenRef, index, iRecordLength); if (pNewRecord){ pRecord = MemHandleLock (pNewRecord); DmWrite (pRecord, 0, pRecordContent, iRecordLength); MemPtrUnlock (pRecord); DmReleaseRecord (DBOpenRef, index, false); } } } -- Bob www.rmobile.ca -- Mobile software for handheld computers and smartphones -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Multiple Alarms on App
Chipp Jansen wrote: As it stands the Palm OS only supports 1 alarm pending per application at a time. Does anyone know of an approach or way of setting up multiple pending alarms on the application (i.e. a simple scheduler)? Think of it this way... you can have only one next alarm... by definition. When that alarm happens your simply calculates (by whatever methods you want) and sets the next one. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: High Density Screens
Tom wrote: Hello All, I have a Treo and want to be able to use the 320x320 screen so that it LOOKS like 320x320. Is it possible to do this with bulit in forms and routines Palm supplies? Sure. All you need to do is to provide double-density bitmaps in your bitmap families, and they will be used automatically, and they will look nice ;) . I want the form to be larger then the normal 160x160? If it is possible could someone point me in the right direction or give a little hand. You still work in a 160x160 grid. Your high-res bitmaps will render in high-res, but still in that 160x160 layout. If you REALLY need better resolution for rendering screen info (say you are creating a graphing or 'doodle'-type app) then you would want to change the screen coordinates before doing your graphics stuff, and change them back again after rendering. But, generally, you stay within the 160x160 framework at almost all times. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: (Sys 0505) (0, 841)
There have been other responses as to what that code means precisely, but have you been able to identify if this crash is actually related to your app or not? If you remove your app and do a soft reset (just for clean-up purposes) does the problem go away. If the problem only re-occurs once you install and run your app then you could be corrupting something in your app that doesn't show up right away. Buffer overruns can do this type of thing, as can some system function calls made under specific circumstances. Some of these can be a real bear to find. Bob. Jan Slodicka wrote: Hello, does anybody have any clue what does it mean the message Error (Sys 0505) (0, 841) ? I am getting it randomly on my T5 and I am not even sure whether it is caused by our SW (could be) or something else. Happens mostly in the system launcher, but also in another application. Everything seems to be working afterwards. I could not find any answer on the web. Than you, Jan Slodicka -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Linker Error
Jim Cooper wrote: It seems to be necessary if you don't have MFC on your system based on no install of VC++, because Builder won't compile with the indicated references in the .def file. I still say that's not necessary. I can call all these things from a different language that cannot possibly be using MFC. All these calls are just calls to DLL exported routines. You can call them from any almost any programming language capable of writing software for Windows. Hi Jim. I've never written a conduit, or a DLL for that matter, so I don't have any direct assistance to provide to Del. But he seems to be stuck on the requirement to use a prescribed environment to get his conduit built. I always had the idea that a Palm conduit is, really, just a DLL, and that you simply need to build a windows DLL, in whatever environment, that includes the appropriate functions and headers to interpret/read/write the respective database formats, and respond to the correct system calls. What you've said suggests that my hunches are correct: Del could use any of a number of Win compilers (there are free ones out there), use the info contained within the COM information that he already has, and he's away to the races. No? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Linker Error
Del Ventruella wrote: Rest assured that I am always grateful for the helpful suggestions that I get here. I am quite new to C or C++ for more than engineering computations and matrix manipulation, and am simply trying to approach PalmOS programming from a perspective that is realistic for me. Hi Del. I hope you didn't think that I was critisizing you in my note. I was just thinking that what you needed most was someone to reassure you that you DID have the tools necessary to get the job done. Often when someone tries something for the first time they encounter some road-blocks and it doesn't work out. Knowing that the tools are appropriate will prompt them to try harder, clean up some code, try to make sense of the previously-foreign concepts. If they KNOW that the tools will work, then it is often just a matter of persistence until the get a working solution. BUT, there is sometimes the question Is it even POSSIBLE with the tools that I'm using? What if the tools that I'm using will NEVER produce a workable solution, because they are fundamentally wrong. Given that last worry, it is very instructive for someone to lean over your shoulder and say Don't worry, you are on the right track, you'll get there. I would have liked to think that there was a hello world type sample conduit included with the COM documentation, which could be readily compiled without requiring specific build environments. That's the way that I learn start with a very basic functioning example, then build it up to do what I want. Like I said before, I haven't looked into conduits myself, so I can't offer much help. But I'm interested in the subject, so I'm following your progress. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Application compatibility with Palm OS Garnet v5.4.5
Regis St-Gelais wrote: Kyle Dorian [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hi all, I have an application created in Codewarrior that works beautifully on Palm OS v4.1. However when running the same application on Palm OS Garnet v5.4.5 I occasionally have fatal exceptions or memory error issues occur (generally during shutdown). Could this be something to do with some of the application's linker or processor settings not being compatible with Garnet's architecture? Kyle, Did you run your application on POSE with a debug rom? Its possible that you have some problems that only shows on OS5 devices put that can be catch by the debug rom. You can also try on a debug version of a OS5 simulator. Really, I think the problem is deeper than that. You CAN'T simply rely on one verification method, and assume that problems won't happen on other devices, even if he has all debugging flags turned on. In order to cover his bases, Kyle should be validating on multiple emulator ROM versions (if he is targetting more than one), on several OS5 debug simulator versions, and on as many h/w devices as he can get his hands on since each ROM, each simulator and each device is different. If he can run clean on all that stuff, then there is a good chance that he's caught most of the problems -- until the next device comes out. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Transparent bitmap color?
Gregg Woodcock wrote: If only I use cygwin/GCC and use flat bitmaps referenced from a .rcp file like this: BITMAP ID somenum mybitmap.bmp NOCOMPRESS Where mybitmap.bmp is a regular file that I open with paint (or whatever)... Then try something like this instead. Bob. BITMAPfamilyex ID bitmapID_exclaim compress begin BITMAP bitmaps/exclaim.bmp bpp 1 density 1 transparent 255 0 0 BITMAP bitmaps/exclaim-c.bmp bpp 8 density 1 transparent 255 0 0 BITMAP bitmaps/exclaim-c-hires.bmp bpp 8 density 2 transparent 255 0 0 end -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Checking for a camera
Eric Potter wrote: Is there any reason that this code wouldn't work? if (DmFindDatabase(cardNo,kCameraLibName) != 0 || DmFindDatabase(cardNo,kCamLibName) != 0) { hasCamera = true; } I realize that if the camera does need to be loaded, I've created extra work for the app. But the app will check for the camera every time, and only load it about 1/4 of the time. Is the DmFindDatabase call so costly that I'm still better off loading the library? I don't think that one call to DmFindDatabase() at the start of your app would be very noticeable, probably just a handful of milliseconds (you could check the number of ticks it takes if you are curious -- might be a really small number). Unless you are making this call numerous times in the middle of some other loop then I'd be disinclined to worry about it. Or maybe I missed some earlier chatter about what you were trying to do. Just my 2c. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: XML to PDB?
Lance Drake wrote: Write a conduit. That way you can skip two steps (no need to export anything from FileMaker and no need to convert that exported XML to a PDB file). You can read directly from the FileMaker database in your conduit and add records directly to a database on the device. Cheers, Jim Cooper Hi Jim, Boy!... does THAT sound intriguing! Can you please point me to a slightly more thorough explanation of how it is that FileMaker can know-about/make-use-of the conduit and can the database in the Palm be reduced/replaced with the contents of a FileMaker database? Actually, I don't think that Jim suggested that FileMaker would have anything to do with it. The CONDUIT would maipulate both the FileMaker and Palm databases, transparently to both the PC and the Palm apps. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Application not returning to Launcher following usage of SysUIAppSwitch
Keighley, Glenn wrote: All, I have two applications A and B A is launched by an alarm and presents a UI to the user. When the user selects a button in A it triggers an application launch to application B using SysUIAppSwitch. When the user is done with application B he can select a button to re-launch application A with SysUIAppSwitch. When the user is done with application A he can select a button to cause the application to exit. Note that the button selected to cause the application to exit is not the Home key but something provided within the application. Application A exits its event loop exits but rather than being returned to the Palm launcher as one would expect the system actually relaunches application B. So my question is why is this happening and what is going on here? Why does the system relaunch the previous application rather than reverting to the launcher. Is a reference to the previous application stored somewhere and if so is it possible to edit this value? FYI I know that I can force a launch to the Palm launcher by putting in explicit code to do this but I'm trying to avoid having to do that. This is the reason why most Palm apps don't have an exit button. The normal process is to never 'exit' an app, but rather to launch a different app. Once the command to launch another app is given, then the current app cleans itself up and allows the launch to happen. And by 'another app' I'm also talking about the laucher app, which is just an app like all the others. Without specifically launching an app first, the behaviour of the first app upon exiting can be a little undefined. You've found that it is returning you to the previously launched app, but I don't know that that would always be the case. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: return handled
Tony Janke wrote: What is actually happening when you say handled = true? Sometimes I get Form already loaded issues if I use it incorrectly. My latest issue involves setting a global variable in my closeEvent. If I use handled = true, it works OK the first time though, but the next time I come to this form, I get the error that the form was already loaded. When you return with a value of true, you are basically telling the system that you have fully handled the event, and that the system must not do any of its own processing to handle it. By returning true you can do things like block penDown and keyDown events from getting to the system. You can also block such things as SysHandleEvent(), MenuHandleEvent() or FrmDispatchEvent() from handling their events, and it sounds like this is what might be happening. You really only return true when you actually handle the event in your code, and the default return value should always be false, in my experience. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: deleting a program currenty on the palm
cbruner wrote: Yes there is a reset when someone pulls the card and the program can no longer access the files it needs, so what you are describing is what I'm seeing. So back to the original question, I guess the answer is that if it is not deleted from system memory then I must assume that it is the result of the above, and I should delete it. So to delete a file from system memory what API do I use? I believe that there is no magic applied to the RAM copy. It is just a database file, like all the others, except it is declared to be recyclable (or something like that), so I imagine that you might use DmDeleteDatabase(). Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Doubt on using HardKeys(vchHard1,..) in Treo 600 650.
babbu cathy wrote: Hi all, Can anyone clarify my doubts please.. In my project, vchrHard1 for Treo 600 650 device takes for Phone button. And vchrHard2 takes for Calendar. Is this correct? Or wrong? That sounds right. What are your doubts? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: deleting a program currenty on the palm
Ben Combee wrote: At 09:12 PM 11/7/2005, you wrote: Yes there is a reset when someone pulls the card and the program can no longer access the files it needs, so what you are describing is what I'm seeing. So back to the original question, I guess the answer is that if it is not deleted from system memory then I must assume that it is the result of the above, and I should delete it. So to delete a file from system memory what API do I use? DmDeleteDatabase is the usual API... however, you'll have a hard time doing that from your program, as you'll be trying to delete yourself. You'll need some sort of helper application... however, you'll have to figure out from your app whether you were run off the card or run from main memory, which can be done based on launch codes, but gets complicated. Couldn't he just use the recyclable bit in a fairly painless fashion? At runtime he could take a look in the Palm/Launcher folder on the SD card. If he finds his app then he presumes that the RAM version is only temporary, and should be cleaned up, so he sets the recyclable bit of the running version of his app. Before setting the bit he could explore the SD version a little, to make sure that the SD version is the same as the running RAM version. If there is a mismatch, he could ask the user what to do: overwrite the SD version, delete the RAM version, keep both...? Using the recyclable bit would clean it up as soon as the user switches to another app, or upon reset, right? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: deleting a program currenty on the palm
John Sutton wrote: Bob said... Using the recyclable bit would clean it up as soon as the user switches to another app, or upon reset, right? Just out of curiousity, if you did find a version mismatch and set this recyclable bit, would it clean it up and get the fresh version back from the sdcard if you were to relaunch yourself with SysUIAppSwitch? Hmm... I dunno, since I haven't tried it... I was just floating an idea. By setting the recyclable bit all I was suggesting was to force the RAM version to clean itself up, if the the default cleanup process was precluded by removing the SD card, or by resetting the device. SysUIAppSwitch is used to launch a prc database that exists in RAM already, so I don't see how it would involve the SD card at all, but there may be some underlying system intricacies that I'm unaware of, if an app has ALREADY been launched from SD, and you switch to it again. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: connect to Internet
chinmaya ku dalei wrote: I want to know the process to connect my PalmOS application to Internet. I wonder how many other Palm developers received numerous, identical, unsolicited requests directly to their own Yahoo! support sites: so far I've had 3. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: About webBrowser.h
chinmaya wrote: Hey can anybody tell about webBrowser.h header file? I am little bit confused about it whether it is exist or not? Honestly, have you tried doing ANYTHING yourself? If I google for webBrowser.h, the 3rd hit takes me to a PDF file entitled Integrating Palm OS® Applications with Web Browser. Perhaps you should spend some time reading that. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: About webBrowser.h
chinmaya wrote: Thanks Bob for to tell me. But it is not that. I have it, but the thing is that it is not supporting means, showing errors during the time of debugging. I want to know why it is occuring.The error seems to be No such header file; Bye Well, the problem would seem to be that your compiler cannot find the header file. After you d/l a new header file from somewhere, you have to save if somewhere on your PC, and then you ahve to tell your compiler where to find the new header file. You might store all the 3rd party, or supplemental header files in a folder called something like include, under, perhaps, a PalmDev folder. If you are using the GCC toolchain you would then have to run the Palmdev-prep command so that the references to the new header file could be established. In short, it is not as simple as just saving the header file to your PC. Now, if you are using CodeWarrior or PODS, then the initialization process will be different. Perhaps those development environments simply allow you to copy the header file to a SPECIFIC location, and it will be found automatically, but I imagine that you would have to put the header into a specific subfolder. I dunno. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Palm losing memory
Mark Chauvin wrote: Is there a way to make a Palm retain its loaded programs for an indefinite period of time? I don't know if they're all like this, but all the Palm's I've seen lose everything when the batteries die. Is there a model that does not do that, or is there a way that I could make the Palm retain its loaded programs data? RAM is volatile memory. If you lose power you lose the memory -- no way around that. So if you are storing your apps/data in RAM then you are vulnerable. What you want is non-volatile memory, so put your data/apps on an SD card, or an internal non-volatile SD or hard-drive. The newer devices T650, T5, TX, LD, all have both volatile (RAM) and non-volatile storage built-in. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: My project creates junk DBs - Urgent help with full details needed:
Logan Shaw wrote: babbu cathy wrote: Junk dbs are giving reset problem in some cases. reset problem isn't a very precise description. Also, how does babbu cathy come to the conclusion that these database are causing the reset problem? It is quite possible that these garbage databases are symptoms of the crash, not causes. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Palm Application Install
[EMAIL PROTECTED] wrote: Is it possible to install my application to the memory card instead of it insall on the Palm so if the palm loses power, the application stays installed? Of course. If you put hte application in the Palm/Launcher/ folder it will be found, and can be launched, but the default launcher application. If not, is it possible to have the data files my application uses stored on the memory card? Again, of course. You can put data files wherever you want. It takes a little more effort to keep them on the SD card, as you will probably need to move the database to RAM before using it, then put it away on SD card after you are done. That being said, it is more typical to keep the application and data in RAM, and rely on hotsync, or device-mounted backup applications, to keep on top of data safety. I wouldn't consider jumping through hoops to store the entire thing (application, data and preferences) on SD unless the data truly was critical and fluid, or the device was more-than-normally prone to battery failure because of high use demands. Just my opinion. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: I hate to ask
Del Ventruella wrote: This is basic C++. I could substitute an integer, but would like to understand how to make this work in the manner in which I originally intended. If anyone has a spare moment, please respond. Essentially, I have a structure that includes a char (char[1]). I assign it a value based upon the state of some device. In this case, s or u. I would like to then use this in a boolean expression, such as: if (aRecord-Ground==u) You are comparing aRecord-Ground to the pointer address for the string. You'll always get false, I should think. { FrmSetControlValue(frmP, FrmGetObjectIndex(frmP, UnGnd),1); } Unfortunately, aRecord-Ground==u, always returns false, even when I set its value equal to u. I seem to be dealing with some issue of accessing the zeroth character in the string within the structure, but I could be misinterpreting this. I'm simply not sure how to do this. The char was declared as: Ground[1]. Do it like this instead: if (aRecord-Ground=='u') So you are just looking at the value of that one character. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Picture - PDB File Palm OS
Deepak.MA wrote: Continuing with the same, i understand that ther is a difference between a BMP on the PC and what is called a PAlm BMP. Could someone throw more light on this? As a minimum, the file headers are different and the rows of bits are stored in the opposite order. They are totaly incompatible without conversion. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Bug in StrCat?
Ignazio Di Napoli wrote: Thank you to all. I simply thought standard strcat managed the overlaps. It's a little too tricky else... I had already solved my problem (with MemMove, which I knew handling overlaps), but I just was wondering how a so simple thing was not contempled... There are several ways to do what you want, and you are currently using one method -- MemMove with manual handling the trailing NULL. You could also simply create a new pointer that is large enough to hold your resultant string, then copy the string to it, cat the string to it again, then copy the result back to the string. I wouldn't say that concatenating overlapping strings is something that people want to do very often -- but I could be wrong -- so it wasn't built in. If they built-in extra capacity into a function, then it adds extra overhead for EVERYONE that wants to use that function, not just those that need that special handling. If you add a lot of special-case handling into all your functions, then eventually you end up with something like WinMobile, instead of PalmOS. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Query on PDA
Jim Cooper wrote: Can any one tell me that, is there any PDA Besides PALM M130 , which is USB Bus Powered, i.e. a PDA which recharged itself when doing USB Communication. Many, I would have thought. My old m505 does that too. Lots of PalmOS PDAs charge over the USB line. Often it depends upon the USB cable and port that you are connecting to. The cable has to include the connections for the charging power, and the port has to supply enough voltage. For instance, my T600 does NOT charge in its cradle when plugged into the USB, unless the AC adapter is plugged in. But you can get after-market USB cables that DO allow charging of the T600 over USB without the adapter. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: determining the foreground program
Andrew wrote: Is the only way to not bother a user while the phone app is open to watch every application that opens and take note of it and deal with it accordingly when the program is woken up I believe this is correct. There doesn't seem to be a good way to detect which app is in the foreground when your app becomes active by a non-normal launch code. So, if you want to know which app is current, you have to monitor all launches and keep a record of the last app to launch. A hassle, to be sure, but not overly difficult. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Tungsten Simulators crashing upon startup
Brian wrote: The T5 Simulator is crashing upon startup for me, with the following error: . i:\popm\arm\core\emul68k\srcslowemu\run68k.c, Line:3107, Invalid read from FFFA I'm using the Tungsten_T5_Update_Simulator_Debug_Build_6/PalmSim.exe Is there any kind of known issue with this? I can't get the Tungsten E2 Simulator going either, but I figured I'd start with focusing on just one for now. Thanks The simulators have some peculiarities that require you to know some workarounds. This one might be solved by resetting the simulator (right-clickreset, first soft, then hard if soft doesn't work). If that doesn't get it going then you should look for a file called something like C:\Palm\SimSlotDriverVolume, and simply delete that file. That will cause the simulator to do a hard reset, and it has never failed, in my experience, to get the simulator going again. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Help setting up Treo 650 emulator
David Horowitz wrote: Hi folks, Can anyone please help me make this somewhat confusing situation easy for me? I need to set up a Treo emulator (simulator?) Simulator. Emulators were never provided beyond PalmOS4. on my PC with the trial version of DataViz's Documents To Go so I can test the layout of some simple Word files for a client. Presuming that DTG doesnt need a specific hotsync name, and it doesn't intentionally try to avoid working on a simulator, then it should work, I think. And of course, how would I then send Word files to the emulator to test? Drag and drop onto the simulator to load into RAM, or copy into the desktop folders that simulate the SD card. These folders are created under the location where you install the simulator on your PC. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Tungsten Simulators crashing upon startup
Brian wrote: Thanks, that did it! I did notice one other odd behavior, though. I first tried the T5 and then loaded my app into it. Then I closed the Simulator, changed the debugger location (I'm using CW 8.3) to the PalmSim.exe in the Tungsten E2 Debug directory, and launched that one. It also launched the Simulator fine now (it was crashing previously), but I noticed that my application was also loaded! I thought I had only loaded it into the T5 Simulator - do they share data somewhere? Depends on the simulator. The T650 and T5 do share files (the same SimSlotVolume... file). The T600 and T3 work on their own, I think. Each sim seems to load, run and crash differently ;) Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Form Loading Problem
Del Ventruella wrote: The c file code follows. The rcp file code comes after that: snip FORM ID TransformerForm AT ( 0 0 160 160 ) NOFRAME MENUID DataEntryMenu BEGIN TITLE Transformer - PSEDAT BUTTON OK ID XFMROKButton AT (62 137 40 12) LABEL New Label ID kVA AT (57 58) END The first thing that stikes me is that you have no field defined on your TransformerForm form. You seem to be trying to apply the text to a label object instead of a field object. I'm surprized that you don't get errors, or crashes. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to create menu dynamically?
[EMAIL PROTECTED] wrote: Hi I want to create menu dynamically, in which i can put some menus depending on conditions. Also i want to chane the caption of one menu frequently. For ex. Current Date. How can i do it? You'll probably be wanting to look up the MenuAddItem() command in the reference docs. You can add items, and hide/show them. You can't simply go in and edit the contents of the menu items, but you can customize with these commands. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Form Loading Problem
Del Ventruella wrote: Thank you. (I somehow thought that was a field, but you were, of course, correct.) The compiler now requires a Graffiti state indicator for this editable field. I did read an article a couple of years ago on Palm programming that indicated that this was required if one wished to enable pen input to a field. It was supposed to be a simple matter to add it. I just can't recall how the article stated that one did that. No, you don't need the graffiti state indicator, but it's good practice, and you'll get the error message at compile time if you don't. There might be a way to suppress that message, but you could add some code like this just after the field definition in the rcp file to add the indicator: GRAFFITISTATEINDICATORat (145 prevtop) In its current state, if I click on the kVA FIELD, it now puts a graphic tab ending in .mcp in the field. It won't accept the character input I had specified of 2000. Remember that it you change the contents of a field then you need to 'draw' is afterwards to see the new text. The FrmDoDialog() or FrmDraw() commands should do this for you, but if you have already drawn the form then you need to use FldDrawField(). When you define the field make sure that you give it sufficient visible characters. Start with a large number so that you are sure to have enough room, then pare down from there once it's working. I also have added handlers for the about form. PILRC didn't seem to need them to put the about form on the screen from the main form, but I added them nevertheless. If you are still using FrmDoDialog then the default dialog handler will be used unless you specifically declare that your custom handler should be used instead. I am still not getting the about form when I click on the menu item. (I tried the form go to form code, but I believe that probably is intended if one already has a non-modal form open and simply wants it to be placed on top of the visible stack of forms. It didn't achieve the desired end.) FrmGotoForm() will load the form, and the form will be deleted when you FrmGotoForm() to some other form. When you use FrmGotoForm() you will need to respond to the FrmLoadEvent, so that you can tell the system which form handler to use for that form. In your event loop you could respond like so: if (event-eType == frmLoadEvent){ formID = event-data.frmLoad.formID; frmP = FrmInitForm(formID); FrmSetActiveForm(frmP); switch (formID) { case mainform: FrmSetEventHandler(frmP, MainFormHandler); return true; case otherForm: .. case ...and so on } Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: multiple segments - saga continues
Troy Lokitz wrote: I am still playing around with this. I can get it to compile fine (i setup an additional segment). But when one of the functions in the new segment are called, it crashes. Does this issue sound familiar to anyone? Are you calling that function in response to a 'sysAppLaunchCmdNormalLaunch' launch code? If you are responding to almost any other launch code then the functions in the extra segmants won't be available. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Form Loading Problem
Del Ventruella wrote: I have the about form loading now. I still need to know how to get a text string (char*) to load and display in a field on a form. This is what I use.. Bob void mySetFieldText(FormType *frmP, UInt16 fieldID, Char *st) { FieldType*fldP; MemHandletextH; Char*textP; UInt8fldLen=0; fldP = FrmGetObjectPtr (frmP, FrmGetObjectIndex (frmP, fieldID)); FldFreeMemory(fldP); FldSetTextHandle (fldP , NULL); fldLen=FldGetMaxChars(fldP); textH=MemHandleNew(fldLen+1); if (textH){ textP=MemHandleLock(textH); StrNCopy(textP,st,fldLen); textP[fldLen]=0; MemHandleUnlock(textH); FldSetTextHandle (fldP , textH); } //optional draw if the form is the current active form if (frmP==FrmGetActiveForm()) FldDrawField(fldP); } -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Form Loading Problem
Del Ventruella wrote: Thanks. I gave it a try. Still no success. What happens then? Does the form popup with nothing in the field, or are you saying that you get a crash? Try boiling down your function to just the bare essentials, and once you get it working you can add back in the other stuff. I've pared it down below... The following is my attempt to call your function from a menu (with a few artifacts from a prior attempt to call : SetFieldTextFromStr(field, pText, redraw)). This doesn't save anything, it is merely a placeholder for what I eventually hope to do, which also requires putting the text to the screen: edited case Save: { FormType * frmP; Char* pText = (Char*) MemPtrNew(5); // allocate 5 bytes MenuEraseStatus(0); frmP = FrmInitForm (TransformerForm); StrCopy(pText, 2000); mySetFieldText(frmP, kVA, pText); FrmDoDialog (frmP); FrmDeleteForm (frmP); handled = true; break; } /edited -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Form Loading Problem
Del Ventruella wrote: Basically, as far as I can tell (allowing for the fact that my emulator seems to produce some screen artifacts and to not update properly) the code does absolutely nothing. There is a screen response, but after the blurred area appears near the top, nothing. Is the TransformerForm correctly defined? Does it include the field that you want to target, and is the field usable? One othere question (please): I am still having trouble with another very basic activity. I can get a form to load, but only if I call it from the main menu (main form menu) response table. If I use the following code in the main menu, linked to an about form menu item, I get the about menu form. If I use this in a form that is called after the main menu, I get no response. The form I've called from the main menu remains where it was. I'm wondering if some of your trouble stems from the fact that you are trying to popup forms in direct response to menu activity. Have you tried simply executing a FrmGotoForm(TransformerForm) or FrmGotoForm(AboutForm) command instead, providing appropriate form handlers for each? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: italic fonts?
Paul Reger wrote: This is probably a very stupid question, but is there any way to get an italic font on palm? Italic fonts are not part of the default OS. You either have to create your own font, or get an italic set that someone else has created and made available. Also, you would have to manage a lot of the drawing yourself, in order to have the right character kerning. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: odd address error
cbruner wrote: I'm getting an Emul68KCommon.c, Line:839, Odd address I don't have any file called Common.c, so I'm at a bit of a loss as to how to debug this. The error is being DETECTED in that module, but it almost assuredly is coming from you code... somewhere. Also when I'm debugging I don't get this error, however the debugger will stop at places that I haven't set any breakpoints for. Are these related? You've probably corrupted some random memory location and are getting various errors. You are just going to have to troubleshoot this to find the cause -- probably comment out successive large blocks of code to detect where the bug is hiding. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: odd address error
cbruner wrote: The weird thing is that under the debugger it is able to run, although it stops at one point. When I try to just run it, it dies with the odd address error. Any ideas on how to understand where I went wrong? The thing is that the debugger, simulators, and h/w devices will all react differently to memory corruption. For example, some of these will populate new chunks with NULLs, others will just leave whatever memory is there. And when you tromp on a pointer, your code will say use whatever value is over there, and over there will be, basically, a random location. Reading or writing to a random location may cause a crash,.. or not... depending on where over there actually is. snip err = VFSFileOpen (volRefNum,Path, ro,Handle); Debugger stops on return of this call, as though an error occured in VFSFileOpen, with gray arrow. I'm guessing this is where the error is. So, if you comment out that line of code you can run fine without errors? Crashing upon a simple return from a function almost always, in my experience, means that you have made some bad memory calls within that function. Focus on that function and disable parts of it until you find the culprit. Look for anywhere that you read or write to memory, and check that you validate the handles/pointers, and don't overrun any memory allocations. For instance, if you do something like: char *st=MemPtrNew(20); StrCopy(st,Test); you'll get a big problem on some (most?) systems because you didn't manually zero-out the memory first. Where in memory will it write Test? It will write it to the first NULL character position AFTER st, wherever that is. It is quite likely more than 20 characters beyond the location of st, so it will probably be overwriting something else, and that something might be important. To avoid this problem you do this BEFORE writing to the memory pointer: st[0]=0; This is going to take a little sleuthing on your part to fix. Take it a bit at a time, and track it down methodically. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Structure of structures
Del Ventruella wrote: Thank you very much! Can anyone answer the second question regarding how to save and load one of these structures of structures? You don't save or load the structure, per se. The structure is simply declared in your application, and it tells your app how to interpret a block of data. You DO save and load the block of data. So, presuming that you have declared a structure called myStructType, and you have created a block of memory and have a pointer to it called myStructP, and you have an open db to write to, you would do it something like this... void SaveData(DmOpenRef db, myStructType *myStructP){ MemHandle recH=NULL; UInt8 *recP; UInt16 recIndex=-1; //will save the data in a new record at the end of the database RecH=DmNewRecord(db, recIndex, sizeof(myStructType)); if (recH){ recP=MemHandleLock(recH); DmWrite(recP,0,myStructP, sizeof(myStructType)); } } Remember that this will save all the contents of the structure, but if your structure contains pointers to other data (such as the 'name' part of my 'SoundDataType' structure) then that other data will not be saved. It will save the current pointer address, but that will almost assuredly be meaningless once you try to read the data again at a later time. You have to save those 'pointed-to' bits of data separately. Bob Bob - Original Message - From: Robert Moynihan [EMAIL PROTECTED] To: Palm Developer Forum palm-dev-forum@news.palmos.com Sent: Saturday, October 08, 2005 8:33 PM Subject: Re: Structure of structures Hi Del, sure you can include structures in structures. AFAIK, it's not a PalmOS thing, but rather a C thing. As an example, here's a quick sample from one of my apps, where I declare a couple of structs, then include them in another struct. Note that the large structure contains my own structures plus the TimeType structure as declared by the PalmOS headers. Bob FWIW. Bob typedef struct { Booleanon:1; Booleanoverride:1; BooleanoverrideV:1; Booleanvibrate:1; Booleanunused:4; UInt8soundType; UInt16vol; UInt16pause; UInt16speed; UInt16hz; UInt16stime; char*name; } SoundDataType; snip -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Structure of structures
Del Ventruella wrote: Is the corresponding load sequence: void LoadData(DmOpenRef db, myStructType *myStructP){ MemHandle recH=NULL; UInt8 *recP; UInt16 recIndex=-1; //will save the data in a new record at the end of the database RecH=DmNewRecord(db, recIndex, sizeof(myStructType)); if (recH){ recP=MemHandleLock(recH); DmRead(recP,0,myStructP, sizeof(myStructType)); } } ? Nope. You have to FIND the record first, and instead of the DmNewRecord (which CREATES a new database record) you will probably want to use a DmQueryRecord() command. When you save the record you will need to tag it with some kind of identifyer so that you can find it again. You could put an id field in your structure, or you could simply declare that 2 first bytes of the database record as an identifier (a UInt16 unique number), or you could just keep track of the record index in some other way (your preferences for the app?) Once you have found the record you will then access it (DmQueryRecord, or DmGetRecord). Like so: MemHandle recH=DmQueryRecord(db, recIndex); ... then read the data. You can read the data directly, by assigning a pointer, of the same structure type, to the memory location where the stored data is. Like this: myStructP=MemHandleLock(recH). now you can access the saved structure data directly using that pointer. One other question, the part about saving the pointer data. The pointer contains the address of the data. Under PalmOS, there is no hard drive where this data safely resides. Well, databases are in storage memory, where they are 'safely' stored unless your battery loses power. Pointers are in dynamic memory, where they can be easily overwritten, unless you have left them locked.. If the address is overwritten, you lose the data. Okay, that I understand. How does one store (and load) this pointer data in a manner that will insure that it is retained? You would store the pointed-to information in your database, perhaps at the end of the structure, or as a separate record. There is no hard-and-fast rule as to how to do this. I get the impression that what you need to do is to study some of the example code that is provided with the SDK and tools. These will be very instructive. Bob. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Structure of structures
Hi Del, sure you can include structures in structures. AFAIK, it's not a PalmOS thing, but rather a C thing. As an example, here's a quick sample from one of my apps, where I declare a couple of structs, then include them in another struct. Note that the large structure contains my own structures plus the TimeType structure as declared by the PalmOS headers. Bob FWIW. Bob typedef struct { Booleanon:1; Booleanoverride:1; BooleanoverrideV:1; Booleanvibrate:1; Booleanunused:4; UInt8soundType; UInt16vol; UInt16pause; UInt16speed; UInt16hz; UInt16stime; char*name; } SoundDataType; typedef struct { Booleanon:1; Booleanhrly:1; Booleanunused:6; UInt8days:7; UInt8unused2:1; } ChimeFlagsType; typedef struct { UInt16type; ChimeFlagsTypeflags; TimeTypestart; TimeTypeend; SoundDataTypedata[5]; } ChimeType; Hi, I am using Metrowerks Codewarrior. 1. Can I create a structure containing other structures that will describe a large group of engines AND a large group of transmissions? In other words. I want to describe both the engines and the transmissions with critical identifiers for inventory. Any chance someone might show me how to code this for PalmOS? I was thinking I might start with: Struct TransEng[200] { struct motor { unsigned hp, displacement, liter; char[20] manufacturer; bool works; } struct transmission { char[20] manufacturer, model; } } myinventory; (Pardon all errors, PLEASE.) 2. Once I create myinventory, how do I save it? Is it already saved once it is created because I am working directly on the memory it occupies under PalmOS? Thank you for any responses that serve to make this learning curve less steep than it feels like at present. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to Get PalmID?
Jeetu wrote: hi freinds, Can anyone tel me how to get PalmId of the device. Its urgent requjirement for me plz if any1 had implementd the same plz forward a small snipet of it. You mean the hotsync name? Do something like this... Bob. { Char *name=MemPtrNew(dlkUserNameBufSize); name[0]=0; //just in case, probably not necessary DlkGetSyncInfo(NULL, NULL, NULL, name, NULL, NULL); //do something MemPtrFree(name); } -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: relocation truncated to fit Error
[EMAIL PROTECTED] wrote: Thanks, Here is what I can see in the Sections.h file . 5. Annotate each function with a section define like so: void DoWork() EXTRA_SECTION_ONE; void DrawForm() EXTRA_SECTION_TWO; Notice that the annotations need to be visible at the function definition, and everywhere the function is used. Any function without an annotation will go into the default code section. . Does it means that the I need to write EXTRA_SECTION_ONE every time I call that function(... everywhere the function is used)??? or just at the declaration? Your prototype for the function carries that annotation in the *.h file, so you should not need to include it anywhere else but in that declaration. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: background process in palm os 5
[EMAIL PROTECTED] wrote: Hello, Is it possible to create a background process in palm os 5. Sort of... I need to run two applications (or two processes) simultaneously which need to communicate to each other. Any idea how it can be done? In palm if i open a second application (say a prc file) automatically it closes the current application. Means no minimize options. why its so? That's just the way it is. PalmOS version 5 and lower do not have multithreading. You CAN set up a quasi-background thread using a soundstream callback or notification/launch codes, but it takes some work to set it up. If all you want to do is to have your apps talk to one another then you could perhaps just have them send custom launch codes to each other. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Fixing records left locked in closed DB
What about any calls to DmNewRecord(). Do you release after those? Bob. snip To summarize: I call MemHandleUnlock for every record I call DmGetRecord or DmQueryRecord on. I also call DmReleaseRecord when I call DmGetRecord. I do a MemPtrUnlock on pointers I locked through MemLocalIDToLockedPtr (usually the AppInfo block). Anything else I shoud do in those cases? I call MemHandleUnlock for every resource handle I locked after a DmGet1Resource. Should I call a DmReleaseResource too? BTW, why isn't there a DmQuery1Resource? -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Global Find
Jay Lee wrote: Hi. When my application is running and I do a Find, FindLaunch(FindParamsPtr pFindParams) within my application is executed. When my application is NOT running, and I do a Find, FindLaunch(FindParamsPtr pFindParams) within my application is never reached. What do I need to do to activate FindLaunch(FindParamsPtr pFindParams) within my application when my application is NOT running? Is there some flag that needs to be set? I am using the Garnet simulator. Thanks in advance Are you handling the sysAppLaunchCmdFind launch code in your app? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Next Palm mobile using Windows? Palm press conf Sep 26 with Bill Gates
Tony Yat-Tung Cheung wrote: Will Palm's PluggedIn Developer program provides a Windows Mobile SDK for its Treo 7002? Probably, if it wants to and thinks that it is a good idea. Does that mean all existing 12,000 PluggedIn developers are automatically converted to Windows Mobile developers? No. I have been a Palm OS developer for many years. Am I switched to Windows Mobile developers by default? No. But, if you want to develop for a not-yet-released WinMobile device then I imagine you WILL have to become a WinMobile developer, by definition. Just wait to see what the announcement will be. Nothing will change so dramatically overnight, but it seems likely that there might be an official announcement about a WinMobile based Treo (or perhaps a new name?) from Palm in the near future. We've been hearing these rumours for quite a while. Bob. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Displaying Float Values in simple format
Jeetu wrote: Hi Folks, I have a problem regarding Float Values,i m storing float value into Database and Displaying it in the text Field,but it is showing me in exponential Format.I dont want to display it in exponential format. I have used Float Fn's Like:- FlpBufferAToF() for converting the Value into Float and then assingning it to FlpDouble type value. Ex.) if I enter the value in my TextField 123.45 it stores the value in PDB in exponential Format(i.e 1.23...e10-3 something). But while displaying i dont want to display the value in exponential format i.e i want to display the value as it was entered in the PDB. (i.e 123.45 only). Any suggestions how to exactly work on Float values or to display the exponential value in normal float Format. A floating number is just a number; no formatting information is stored with that number. There are a few functions for formatting numbers into strings, StrIToA() and FlpFToA() being a couple, but only a few. If you want to do something different from those generic fomats, then you often need to roll your own. It's your job to format the output for display, and you have to keep track in the app (or somewhere) of how the number should look (might be a user preference). To manually display the number as you mentioned above, you might convert it to Int32 and use StrIToA() to create a string for the left-of-decimal stuff. Then you could subtract that integer from the original to get the fraction, and use that to make a string for the right-of-decimal stuff. There's no normal display format, because who knows how many significant digits you'll want to have, or how many decimal places, or what thousands separator, or how big the number can be without switching back to exponential, and when it does switch to exp what should THAT format look like, etc. It could also be that someone has a library to do a lot of this formatting for you. Not sure about that. Bob. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Abacus WristPDA updaAppLaunchWatchDrawTime
John Powers wrote: The Fossil/Abacus WristPDA SDK states that a watch app is launched with the updaAppLaunchWatchDrawTime launch code once a minute to let the watch app update the time display. My app is getting 4 updaAppLaunchWatchDrawTime launch codes a minute snip That's normal behaviour if an alarm is active. snip In my case, an alarm is not active. Four updaAppLaunchWatchDrawTime launch codes are received within a second or two every minute. Ah, you mean that you get a bunch of those codes together on or around the minute mark. I've seen that too. I don't recall 100%, but I thought that it was related to the FossilUpdateDisplay() function, which, instead of refreshing the screen immediately like the docs suggested, just fire off another of those redraw launch codes. Not sure. Bob. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Problems with application launched via Launcher X
Steve Chaplin wrote: I tried my app with Facer and that also works. I only have a problem with Launcher X. Anybody have this problem Hi Steve. I don't have any personal experience to relate, since I don't use LauncherX. You've said that all launchers except LauncherX are launching your program correctly. So why do you think that you have to make any repairs to your code? It would seem that the bug is probably in LauncherX, no? You should probably try to contact their support and see if they can find a bug. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Abacus WristPDA updaAppLaunchWatchDrawTime
John Powers wrote: The Fossil/Abacus WristPDA SDK states that a watch app is launched with the updaAppLaunchWatchDrawTime launch code once a minute to let the watch app update the time display. My app is getting 4 updaAppLaunchWatchDrawTime launch codes a minute, some spanning a second. I had to add code to check to see if a minute has passed before updating the time. This should be unnecessary. Does anyone know what might be causing multiple launch codes when there should only be one? That's normal behaviour if an alarm is active. The watch seems to go into a more rapid refresh cycle if an alarm has gone off, and stays in that cycle until you enter PDA mode again. I don't recall if this is documented anywhere, or if it is a bug or a feature (my watch app uses this to allow less-than-1min autorepeat settings). I thought that it was every 10sec, not every 15, but I may be remembering incorectly. As a side note, I believe that this is part of, or all of, the reason why some Abacus users see drastically shortened battery life on occasion; because they neglect to respond to an alarm and the device begins to redraw much more frequently, consuming more power. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Calling SysReset under OS5
Vince Lee wrote: Is there any reason why SysReset() won't work under PalmOS5? I have some old code in a utility app that indicates that at least early OS5 versions didn't support this call properly. I don't remember how it used to fail, though. Is this still a problem, and if so, are there any workarounds? I've have this function in one of my apps, and I've tested it on several OS5 h/w devices. The only problem is that it causes a system reset every time it runs ;) ... so, in other words, no problems that I am aware of. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: how to popup menu
[EMAIL PROTECTED] wrote: I want to put an menu icon on screen. When tap at it, menu will pop up, just like the popping up menu when tapping at the Menu Icon on silkscreen. Can anybody tell me how to do it. Thanks. Here's one way... void PostMenuKey(void) { EventTypeevent; event.eType=keyDownEvent; event.data.keyDown.chr=vchrMenu; event.data.keyDown.modifiers=commandKeyMask; EvtAddEventToQueue(event); } Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Forced Initialization
Dave Mottorn wrote: Is there a calleable function that has the same effect as a warm boot? It depends on what you mean by 'warm'. SysReset() is PROBABLY what you are asking for. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to find a bug that crashes Simulator?
Luc Le Blanc wrote: I finally managed to fix the bug by simply removing the line that would cause the crash (...) It turned out to be redundant, so no functionnality is lost and everything else works fine beyond that. I still can't explain what was wrong, nor why it only crashes on a T3 (I suspected color, but I had no problem on a color Clié) nor why Simulator cannot debug this but only crash. But as I have many other things I can worry about, I'll just enjoy this magic ending. I would feel uncomfortable with that ending. If you have been having crashes, and you can't explain why they have disappeared, then the bugs are most likely just hiding, and will start acting up again when the time is right. You mentioned that other things were acting wrong (button mapping) and the simuator was crashing. This sounds like your app is overwritting some of its memory bounds, and walking all over other memory locations where it shouldn't. Such errors do not necessarily cause a crash, depending on what memory is being overwritten, and what you are mistakenly writing there. But there almost surely is a bug that needs squashing. As Roger (I think) suggested, you should use a debug version of the emulator or sim, as these catch more stuff. In my opinion, the Treo650 sim seem to be particularly unforgiving (as is the Tapwave), and I use that a lot. Its tendency to just pack up ship and disappear when it runs across a bug really is annoying, but you get used to that. When I'm chasing a bug that is too-often causing the sim to close, I might switch to a 4.1rom emulator, so that I can at least reset it without killing and reloading. My 3cents worth. Since you seem to have resolved it by removing one redundant line of code, perhaps you would tell us what that line said. Maybe there actually IS a reason why the crash stopped. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: 5-Way Navigator handling
Jim McGowen wrote: Well after much toil I'm back where I started, only even more confused than I was. What I want to do is handle 5-way navigation key down events. I don't need one-handed navigaion or focus rings ect... I simply want to handle scrolling and selecting in a custom list control I made. I got this working over a year ago with the Tungsten C but the new navigation features on newer devices boke it. Aren't you just looking for a keydown event, and comparing the keyDown data to either one group of values or another? Here's a snippit of what I've been doing for some while now, and I've not heard of any complaints. Of course, I don't have a physical T5 to test on... so maybe there are issues. I've certainly never bothered to concern myself with Interaction Mode at all thus far. Note that all return values are from a small custom enum that I created for my own purposes. Bob. if (key==vchrNavChange){ if (event-data.keyDown.keyCode (navBitUp | navChangeUp)) return key5wayUp; if (event-data.keyDown.keyCode (navBitDown | navChangeDown)) return key5wayDown; if (event-data.keyDown.keyCode (navBitLeft | navChangeLeft)) return key5wayL; if (event-data.keyDown.keyCode (navBitRight | navChangeRight)) return key5wayR; if (event-data.keyDown.keyCode (navBitSelect | navChangeSelect) !(event-data.keyDown.modifiers autoRepeatKeyMask)) return key5wayCtr; } else{ if (key==vchrRockerUp)return key5wayUp; if (key==vchrRockerDown)return key5wayDown; if (key==vchrRockerLeft)return key5wayL; if (key==vchrRockerRight)return key5wayR; if (key==vchrRockerCenter)return key5wayCtr; } -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: 5-Way Navigator handling
Jim McGowen wrote: Just tried your code on the T5 and bad news, no workie. I'm assuming key == event-data.keyDown.chr? Yes, key == event-data.keyDown.chr I wonder why it doesn't work for you. I have this code implemented in my app for quite a while, and I have T650, T5 and LifeDrive people among my user base, and they would have noticed not being able to switch events with the up/down buttons. Now, I didn't include ALL of the code in that module that processes the key codes, only those that appeared to handle the 5-way. But I also have such lines as if (key== chrVerticalTabulation) return keyU; if (key== chrFormFeed)return keyD; to handle the generic up/down on non-5-way devices. Bob Robert Moynihan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jim McGowen wrote: Well after much toil I'm back where I started, only even more confused than I was. What I want to do is handle 5-way navigation key down events. I don't need one-handed navigaion or focus rings ect... I simply want to handle scrolling and selecting in a custom list control I made. I got this working over a year ago with the Tungsten C but the new navigation features on newer devices boke it. Aren't you just looking for a keydown event, and comparing the keyDown data to either one group of values or another? Here's a snippit of what I've been doing for some while now, and I've not heard of any complaints. Of course, I don't have a physical T5 to test on... so maybe there are issues. I've certainly never bothered to concern myself with Interaction Mode at all thus far. Note that all return values are from a small custom enum that I created for my own purposes. Bob. if (key==vchrNavChange){ if (event-data.keyDown.keyCode (navBitUp | navChangeUp)) return key5wayUp; if (event-data.keyDown.keyCode (navBitDown | navChangeDown)) return key5wayDown; if (event-data.keyDown.keyCode (navBitLeft | navChangeLeft)) return key5wayL; if (event-data.keyDown.keyCode (navBitRight | navChangeRight)) return key5wayR; if (event-data.keyDown.keyCode (navBitSelect | navChangeSelect) !(event-data.keyDown.modifiers autoRepeatKeyMask)) return key5wayCtr; } else{ if (key==vchrRockerUp)return key5wayUp; if (key==vchrRockerDown)return key5wayDown; if (key==vchrRockerLeft)return key5wayL; if (key==vchrRockerRight)return key5wayR; if (key==vchrRockerCenter)return key5wayCtr; } -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: 5-Way Navigator handling
Jim McGowen wrote: Just tried it again and it DOES work... must have copied something wrong the first time, sorry bout that! Yeah, I thought that it had to work. Still seeing multiple key down events though. On that note, the Tungsten C always uses the first half of your if statement, the T5 always uses the else half. If there are 2 events, the first one isn't handled by your code, but the second one is, except on the Tungsten C the select key is processed twice for a single press. (that's debugging on the devices, not sims) This IS a hassle. I don't remember the particulars right now, but I know for sure that I have some ugly, special-case code in there so that it doesn't respond to the -- inevitable as far as I can tell -- double presses on some devices. I do return true after handling the keyDown events but the repeats don't seem to stop. I see this on my T3, but my T600 doesn't send those keys, IIRC. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Linker can't find MemGluePtrNew().
Hi folks. I'm having a little trouble with this glue function. I inlcude the MemGlue.h file in my project, and link libPalmOSGlue.a. The compiler is happy, finding the headers and such, but the linker says it cannot find that function, although I have already been successful in accessing several other glue functions in that library. I've never used MemPtrGlue before, so I've never had an issue with the glue functions yet. My version is like so: libPalmOSGlue.a, 79kb, 2002-09-03 Any thoughts? Bad library? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Linker can't find MemGluePtrNew().
Ben Combee wrote: You really should update to the Palm OS 68K API SDK (Fall 2004)... that was the one I put together last fall when I was at PalmSource, and it included a fresh build of the Palm OS Glue libraries with all the latest functions. You can get it from the PalmSource developer site. Thanks Ben. It was as easy as that. Sorry for not looking for an update first, but I couldn't see how a basic function would be simply not available. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Palm program dies on Tungsten T3
Mark Chauvin wrote: No, I haven't. I was going to find load the T3 ROM debug image into Emulator see what happens. Doesn't Emulator catch more errors than Simulator does? Is it worth it to do both? The emulators only work for OS less than 5.0. When you want to test out an OS5 app you have to use the simulator. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: user name of the handled
Danaé Castro Terán wrote: Hello: Please help me... I need the name of the handheld user in the user data store to synchronize with. Try this: { char*nameP=NULL; nameP = MemPtrNew(dlkUserNameBufSize); if (nameP){ DlkGetSyncInfo(NULL, NULL, NULL, nameP, NULL, NULL); //nameP now contains the user name //so do something with it. //now clean up MemPtrFree(nameP); } } Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: ASCII DIFFERENCES?
[EMAIL PROTECTED] wrote: Hi, Anyone else notice the ASCII representation differences between WINDOWS and PALM? Example.. £163 (on my desktop) £-93 (on the palm) ß223 (on desktop) ß -33 (on palm) You are confusing 'signed' and 'unsigned' data types. In terms of character codes, you would likely expect something between 0 and 255. So you should be using the type UInt8 on the Palm (or an equivalent), which will give you 163, instead of using Int8, which gives -93. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to copy data to PC?
Klemen Dovrtel wrote: Is it possible to open the database with excel? No. An Excel database has a specific format, which is definitely not the same as a Palm database. The Palm database has a special header, which is useless to Excel, and each record in the Palm database has a stucture that is defined by the individual Palm application. So different Palm databases could have completely different ways of storing data. Some use simple flat records, some use compressed, variable length records, some use encrypted records,... whatever the app developer wanted to do. There is absolutely no practical way that Excel can read PDB files in a generic sense. Before you can do anything with a Palm database on a PC you need to know the address for each of the database records, the number of records, and the structure of each of the records. There are only 2 options: do all the work yourself to understand the database structure and write an app to decode it, or find a utility that someone else has created to do just that. Tools that extract the information from a PDB file and present it as a csv file that CAN be read by Excel do exist, but only for databases for certain Palm apps. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: simulator and rotation?
Jeffrey Siegel wrote: you should get T5 simulator from palm pluggedin site http://pluggedin.palmone.com/regac/pluggedin/index.jsp , not generic OS 5.4 simulator. Am I the only one who can't seem to log onto the pluggedin pages at palmone.com or palm.com? When I enter my email address and password, it goes to a blank page and stays there...forever. ...Jeff I've seen this exact problem before too. I think my solution at the time was to try logging on using a different browser (IE instead of FireFox), but I can't recall precisely. Eventlually it began working again for me. Could have been just trial-and-error. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Free ptr / ptr is handle, after app?
I don't think it is just a memory leak. A memory leak usually fails silently on the h/w device, and only become obvious on the desktop sim/emulator (at least until you have leaked enough times that you cause a crash). Certainly there IS a leak that needs to be cleaned up, if the emulator is saying so, but that is housekeeping; a 'minor' problem. The free ptr and ptr is handle errors indicate that memory pointers are not being handled correctly in a couple of places at least, and those REALLY need to be cleaned up, as they WILL crash the device. These crashes would likely happen as the app runs. My guess is that the app has also overwritten the bounds of a memory allocation somewhere, corrupting something else (in another program), and that causes the error upon exit. If you don't know where to look, then my suggestion would be to comment out large blocks of code until the app becomes stable. Try commenting out almost everything at first, so that the app simply starts then stops, to see if whatever initial allocations (probably in 'ApplicationStart/Stop' functions) are made and cleaned up correctly. Then reactivate forms and functions gradually until the error happens, and track the bugs down that way. Bob This is simply a memory leak. The problem is not always easy to find. Somewhere in your code you are allocating memory (either with some type of MemPtrNew, or with a API call that returns a allocated pointer). The error only shows up when you exit the app since the program can only see such a problem when you are closing it out. My advice is find out the address of the memory that is causing the error (should be shown in the error box) and see if you can locate what variable this is. This can be hard to do in some cases since a given vairable doesnt always allocate the same memory in the same location. I have found it best to try to recreate this error a few times in a simulator and see if you can get the same memory location each time. This would be done by running your app in the same way from a hard reset of the simulator. if you can lock down a memory location, then you can search for that address in your allocated vairables while running the app. If this is not working, the next step is go through your code and find every place you allocate memory (a large pain if its a large app). Then make sure each allocated memory chunk is getting deallocated. In the end, there is no easy way to simply pin point the problem variable that is leaving allocated memory, since the app only checks for this on application exit. Ive run into this problem many times, and it can be very frustrating to fix it. hope this helps you out. -- Scott Erickson Software Engineer, FB-4, Inc. [EMAIL PROTECTED] Evan Ovadia [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey everyone. I'm getting a very strange error... Yesterday, I was exiting my program and up came this fatal alert, with a bunch of numbers. I had no idea what it means. I eventually found out that it happened after my PilotMain ended. I know this because right before the return statement I put a little flag there. My first thought was that maybe it was a destructor. Well, it couldn't have been any global object because I have no globals. And I looked for objects local to PilotMain but there weren't any. Just to be sure, I surrounded the contents of PilotMain in an artificial block. Still got the error after PilotMain. So there's only one possibility, as I see it. Palm OS is trying to do something after I exit, maybe its trying to free something that was allocated? Maybe its trying to free something that I already freed before, im not sure. I searched high and low for something like this but nothing was found. So my question is: What does palm os do after I exit the program? What does it try to wrap up? Is there something I'm doing wrong? A little more information about the bug... I ran it in the simulator and got free ptr, and then minor error while exiting app, unfreed chunk, size 320 or something along those lines. Someone on these forums said to try a hard reset, so I did. I ran it on my device again and then ptr is handle showed up, instead of all those numbers. Yeah, I'm totally lost O.o Thank you all for your help. I really appreciate it! -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: testing if the device is Handspring
Scott Erickson wrote: Is there a simple way to test if the device running an app is Handspring? Like so?... Boolean IsHS(void){ UInt32value; if (!FtrGet (hsFtrCreator, hsFtrIDVersion, value)) return true; return false; } ...and for the next question, perhaps... Boolean IsTreo600(void) { UInt32company = NULL UInt32deviceID = NULL; FtrGet (sysFtrCreator, sysFtrNumOEMCompanyID, company); FtrGet (sysFtrCreator, sysFtrNumOEMDeviceID, deviceID); if (company == hwrOEMCompanyIDHandspring){ if (deviceID == hsDeviceIDOs5Device1 || deviceID == hsDeviceIDOs5Device1Sim) return true; } return false; } Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: sending an SMS to/from a treo 600 simulator
Scott Erickson wrote: I take it my post never made it to the forum. Hopefully this one does. No. I've got your post of 2hrs ago in my inbox. I just checked my mail now, so it could have been queued for a while by the server and just dumped out recently. Is there a way, like a loopback address, to send a SMS from a treo 600 simulator so that it will be received by the same simulator. I need to test code that is executed when a device receives a SMS. Or is the only way to test this to make a driver that will launch my app with the right launch code and cmd block ptr??? As for this I dunno. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: A user that has a full mail box!
David Fedor wrote: At 03:54 AM 7/31/2005, Chris Tutty wrote: From: Luc Le Blanc [EMAIL PROTECTED] Regarding the full mailbox problem, shouldn't these messages be sent to the news mailer, not the poster? After all, to the mailer is the message origin (spreading the post), not to poster. I asked about this some years ago but the reply was that it's really out of their control because the mail arrives at that person's inbox with From=WhoeverPostedTheMessage so the mail reader does what it's been told and sends a reply to say that this person is out of the office and can't respond. I've checked the headers and, as far as my limited knowledge takes me, all of the other lists I'm on seem to run the same way. I think this list has this problem more frequently because it's huge and has a fair number of subscribers in corporate environments (where autoresponders are more common). Actually the problem is that the autoresponder should have the intelligence to notice that it is about to respond to a mailing list. There's a standard header which our list server adds (x-precedence:bulk) which autoresponders should look for. Some don't look, sadly, so they cause this problem. OK. But why cannot someone who manages the list simply disable [EMAIL PROTECTED] entirely, so there will not be any messages TO, and, thus, no autoresponses FROM there. That's the address that keeps bouncing back to me when I post something. It is obviously not a valid address, as the same error has been happening for weeks now. If the person at that address comes back to life eventually and wants back in, then just let them ask directly. I'm not really whining, 'cause it doesn't bother me THAT much, but wouldn't that be a relatively easy solution? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/