Usign a CF WLAN adapter on a Visor
I was wondering if anyone had the chance to connect a SpringBoard CF adapter to the Visor (e.g., PITECH's MemPlug CF) and then a WLAN (802.11b) adapter (e.g., DLINK's DCF-660W)? Does it work? Are there other CF WLAN adapters suitable for the Palm OS platforms? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: symbol sdk
The Symbol 1700/1800 SDK (3.10 is the latest, I think) seems to include the types that were discontinued in the Palm OS SDK from version 3.5 onwards (e.g. DWord, Word, SWord etc). Is it possible to include the Symbol SDK in a project that uses the latest Palm OS SDK? Do you use the PalmCompatibility header file? Currently I'm being very silly and dividing my application among two projects, one using the latest Palm SDK and the other using a version of the Palm SDK compatible with the Symbol SDK. Regards, Ger ps Sorry for hijacking the thread. From: "John E. Christ III" <[EMAIL PROTECTED]> Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Subject: Re: symbol sdk Date: Mon, 3 Mar 2003 10:54:13 -0500 > i want to build an application that has symbol sdk > and ultralite support. I can do one thing at a time > either have symbol sdk by using application wizard > or using stationary for ultralite but how do i include both. Open one of the Symbol samples, for example SscanDemo. Make note of the Access Paths, ScanMgr*.* files and add those to the project you create. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: something wierd !
Thanks Chris ! I'd noticed the same thing, viz the hostname being returned by gethostbyname was a different value for load balancing purposes. Anyways, I tried using the second value in the list testHostentP->h_addr_list[1] & it worked just fine ! Guess I'll have to loop through the list & use the first not null value. This is really strange though ! The Netlibrary seems to be messing up somewhere. Could something be done about this ? Does anyone know why this happens ? Thanks again. "Chris Faherty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On Monday 03 March 2003 05:33 am, sylBEERt wrote: > > > I'm making a call to gethostbyname on the Palm & it seems to be failing > > ONLY for a particular hostname. I use exactly the same code .. with the > > same hostname in a c++ program on linux & it works just fine !! Ofcourse > > I'm using Berkley Sockets. What is wierd is that this bit of code was > > working perfectly well until a week ago!! > > > > the hostname for which my code is failing is: 'toc.oscar.aol.com' > > (snip) > > > I get success, but testHostentP->h_addr holds a NULL value. As a result of > > which, connect fails ! > > > > Can't see what I'm doing wrong. Any solutions, suggestions anyone ? > > This may not be related, but I noticed a strange thing like that on a > particular host as well. It was a particular DNS entry which returned > different values to balance the load, and it began freaking out my Palm > applications. What I found was needed was to enumerate the list provided > within the returned NetHostInfoPtr, as sometimes the first entry would be > blank -- which is I believe the same value as ->h_addr. > > NetSocketAddrINType saddr; > NetHostInfoPtr phe; > NetHostInfoBufType AppHostInfo; > > if ((phe = NetLibGetHostByName(AppNetRefnum, host, &AppHostInfo, > AppNetTimeout, &errno)) != 0) { > /* > * Sometimes the first address in the list is zero. This > * makes me have to search through them to find the first > * non-zero address. > */ > for (i1=0; i1 < netDNSMaxAddresses; i1++) { > if (phe->addrListP[i1] != NULL) { > if (*phe->addrListP[i1] != '\0') { > MemMove((char *) &saddr.addr, > (char *) phe->addrListP[i1], phe->addrLen); > nameresolved = true; > break; > } > } > } > } > > -- > /* Chris Faherty <[EMAIL PROTECTED]> */ > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Clarity over %, %% in asm() with .c and .cpp (PRC tools)
Thus you've run into a bug in the 2.95.x C++ parser. Bad luck. I have 2.95.3-kgpd on Mac, Windoze and Lunix so at least my environment is consistent! Dare I say that I thought it might be a bug, but having read all the 'docs' about casting aspersions elsewhere before getting your own house in order, one does not make such accusations lightly! That and years in the job have always led me to believe it's all my fault. *8-) That's why I asked for guru level feedback. I became *very* suspicious about it when adding "g"(0) made it 'go away'. As if it were 'the other style' The *only* other time I've ever found a bug in a compiler was with Visual C++ a few years back. It was to do with C++ namespaces and basically the compiler just plain hung up! I got the expected level of response from MS as well. Zilch. Thanks for your very clear and detailed reply. It's never ceases to amaze me just how useful these list thingies are at times. People should appreciate them more then they do. I've yet to meet *any* commercial support scheme that has so much breadth and variety. Yes, it's a pain to decide whether your asm() for today is going to be old-style or extended and thus how many percent signs to put in it. I have taken the 'obvious' way out, for me anyway, and moved it all into .S files and put m68k-palmos-as into the food chain! At least I know where I am! The parameter passing has obv. taken a dive in readability but no more hassles! Therefore in practice what I do is always use extended asm()s and always list some clobbers and usually operands too. If you're not listing any operands or clobbers, 99% of the time it's because you're lying to the compiler. You don't want to do that. Agreed! Was it Lincoln who said: "You can fool some of the compilers all of the time and all of the comilers some of the time, but you can't fool all of the compilers all of the time"? Actually, I think it was me. For example, your POPALLNOTA7 #define POPALLNOTA7 asm("movem.l (%%sp)+, %%d0-%%d7/%%a0-%%a6" : : ) clobbers practically all the registers, but you haven't told the compiler that. If you do bother to tell the compiler, then (1) it will be able to generate correct code around your asm() instead of potentially generating broken code [1]; (2) you will have no "is this old or extended" syntactic problems. In practice what I also find is that my inline asm() template texts don't contain many explicitly named registers. Rather, they're full of %0, %1, etc, and I let the compiler take care of the boring work of allocating and loading the registers. It's the computer, after all. If you are writing great screeds of entire asm subroutines with explicit hand-allocated register manipulation, probably you want to be using a separate assembler source file (foo.s) rather than inline asm. I did end up doing that. Basically, I've written the mother of all blitters and some special effects routines, fire effects etc etc. They now sit happily in .S files. I have learned! I am going to bone up on 'clobbers' once and for all!!! You owe the Oracle one lightly roasted parsnip. No problem. Honey roasted to be precise. You can either have the low calorie (as a PNG file attached) version or, provide me with a snail mail address and I'll send you some in the post with a special Guru Style sauce, secret ingredient is mashed GCC manual pages reduced with red wine. Sean Charles. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: symbol sdk
> The Symbol 1700/1800 SDK (3.10 is the latest, I think) > seems to include the types that were discontinued in > the Palm OS SDK from version 3.5 onwards (e.g. DWord, > Word, SWord etc). Is it possible to include the Symbol > SDK in a project that uses the latest Palm OS SDK? I'm using the Symbol SDK which comes with CW 9, which *appears* to be 4.10 > Do you use the PalmCompatibility header file? No. John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Usign a CF WLAN adapter on a Visor
Handera 330 - been using one with the Symbol CF WiFi card (rebranded Sockets card I believe) for over a year. Symbol SPT1840 - built-in WiFi - Original Message - From: "Gabriel Rymberg" <[EMAIL PROTECTED]> Newsgroups: handspring-forum,palm-dev-forum,comm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 3:03 AM Subject: Usign a CF WLAN adapter on a Visor > I was wondering if anyone had the chance to connect a SpringBoard CF adapter > to the Visor (e.g., PITECH's MemPlug CF) and then a WLAN (802.11b) adapter > (e.g., DLINK's DCF-660W)? > Does it work? > Are there other CF WLAN adapters suitable for the Palm OS platforms? > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Usign a CF WLAN adapter on a Visor
> Does it work? Using a generic CF card adapter on a Visor, you are unable to use any card save storage. All complex CF cards (such as modems, wireless, cameras, sensor packages, etc.) require driver software and/or electrical connections that are not made. > Are there other CF WLAN adapters suitable for the Palm OS platforms? You could likely develop your own driver software, if given the complete spec. Also, you would need a device capable of using non-storage cards. These systems are rare, as the drivers are as well. It would be much simpler to simply buy a hand-held with built-in wireless. A more complex solution, if you are bent on using CF cards, is the Sharp Zaurus. Using the Zaurus and an emulated Palm device, you could redirect Palm TCP/IP to the CF card's network connection. A much more expensive solution, however. -- Matthew (Darkstorm) Bevan [EMAIL PROTECTED] Margin Software, NECTI. http://www.marginsoftware.com Re-inventing the wheel, every time. - Boston, n.: Ludwig van Beethoven being jeered by 50,000 sports fans for finishing second in the Irish jig competition. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Datebook crashes (occasionally)
Hi there, I successfully inserted a datebook entry (directly into the database not usinf vCal) in the right format (even checked with hex editor). Starttime 2 bytes, Stoptime 2 bytes, Date 2 bytes, flags 1 byte set to 0x14 (description & note) alignment 1 byte set to 0, description (cstring zero terminated) note (cstring zero terminated) All the entries appear correctly in the datebook application with the correct description, time, date and note. But in certain situations (OS 3.5 and OS 5.0) the datebook application crashes with "DateDay.c, Line:4448, Record not on day". or "DateDay.c, Line:4373, Wrong record". Did I miss something ? Michael -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Converting doubles to strings
All, A long time ago I posted a question about an algorithm that converts floating point/double values to strings. I got one, but it does not work all to well. I am using the float manager to convert strings to double. That works perfectly. Can someone suggest a recommended method for converting doubles to strings? I don't need the string in exponential format, I just need the string to have 1 or 2 places precision. An example of the problem I am seeing is the following. User enters a number 1.2 I convert that to a double using the float manager. I get 1.2 I multiply that by 1000 to get 1200. I store it in the database. I read it back out. Divide it by 1000 and get 1.2. In my double to string conversion I get the integer portion using the following code. long iValue = ( long )1.2;// Gives me a 1. I then subtract out the 1, i.e 1.2 - 1.0 to get .2 I then multiply that by 10 and get 2.0 (at least that's what the debugger says I have!); I then have the following code. long dValue = ( long )2.0; // Gives me a 1. <-- This is the problem I did not write this algorithm, I just used it! Is there a better way to do this? The numbers I will need to convert will be in the following range 0.5 to 999.9. Thanks, Brad -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Modal dialog problem
Hi I came across a problem, which I could (hopefully) solve with some workaround, but I am unhappy because I don't see the real reason of the trouble. In short: The function bellow is run from AppStart() prior to starting AppEventLoop(). It displays a dialog requesting an user answer, which is in turn tested and - if not approved - the dialog is displayed again. The user can abort the loop by pressing Cancel. The function NonWorkingFunction() worked for a while, but after some changes done in another part of the program it started to show an attempt to read an unlocked chunk of memory. It was after displaying FormOK dialog and after the function exited. I vaguely remember that the CW debugger pointed to processing winExitEvent. (As a rule the debugger crashes or freezes in situations like that so I cannot repeat it so easily.) After I moved code displaying FormOK dialog past destroying UserForm (WorkingFunction()) everything started to work again. The funny thing is that the NonWorkingFunction() failed even if I replaced FormOK dialog by AlertFailed - the same that is shown anyway when the user answer is wrong. (I used really AlertFailed just to test whether the alert could work.) Can somebody explain what happened? Thanks in advance Jan Slodicka Boolean NonWorkingFunction() { FormPtr frmP = FrmInitForm( UserForm ) ; Boolean success = false ; while( FrmDoDialog( frmP) == IDOK ) { UInt16 fldCodeIndex = FrmGetObjectIndex( frmP, fldCodeID) ; FieldType *fldCode = (FieldType*)FrmGetObjectPtr( frmP, fldCodeIndex) ; const Char *code= FldGetTextPtr( fldCode ) ; if( IsCodeCorrect( code) ) { FormPtr frmOkP = FrmInitForm( FormOK ) ; FrmDoDialog( frmOkP ) ; FrmDeleteForm( frmOkP ) ; success = true ; break ; } else FrmAlert( AlertFailed ) ; } FrmDeleteForm( frmP ) ; return success ; } Boolean WorkingFunction() { FormPtr frmP = FrmInitForm( UserForm ) ; Boolean success = false ; while( FrmDoDialog( frmP) == IDOK ) { UInt16 fldCodeIndex = FrmGetObjectIndex( frmP, fldCodeID) ; FieldType *fldCode = (FieldType*)FrmGetObjectPtr( frmP, fldCodeIndex) ; const Char *code= FldGetTextPtr( fldCode ) ; if( IsCodeCorrect( code) ) { success = true ; break ; } else FrmAlert( AlertFailed ) ; } FrmDeleteForm( frmP ) ; if( success ) { FormPtr frmOkP = FrmInitForm( FormOK ) ; FrmDoDialog( frmOkP ) ; FrmDeleteForm( frmOkP ) ; } return success ; } -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: string and constructor
> >Hi, > > > >I try to create a string in constructor with hex values : > >00 05 28 00 00 96 08 > >but when i compile, i have > >00 05 28 00 00 D0 08 > >instead, do you know why ? is this a bug ? > > No idea, but it is likely a Constructor problem due to the embedded NUL > character. > > If you're using the new 5.0 68K SDK R2 that's in beta, there's a new "raw > data" type in Constructor that would be a better choice. You can either > import raw data from a file or directly specify it using hex characters. > Ok it seems to work with the Custom Data resource type, but how can i retreive data from my Custom Data resource ? thanks Chris -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: string and constructor
Forget my question :o) > > >Hi, > > > > > >I try to create a string in constructor with hex values : > > >00 05 28 00 00 96 08 > > >but when i compile, i have > > >00 05 28 00 00 D0 08 > > >instead, do you know why ? is this a bug ? > > > > No idea, but it is likely a Constructor problem due to the embedded NUL > > character. > > > > If you're using the new 5.0 68K SDK R2 that's in beta, there's a new "raw > > data" type in Constructor that would be a better choice. You can either > > import raw data from a file or directly specify it using hex characters. > > > > Ok it seems to work with the Custom Data resource type, but > how can i retreive data from my Custom Data resource ? > > thanks > Chris > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
the 5-way selector and the "OK" button
Tungsten W and Tungsten T... I noticed that if there is an "OK" button in the current form then I can't override the the 5-way selector's action of "pressing OK" since no event is generated when doing a 5-way select job. Instead, the OS automatically "presses" the "OK" button. If I change the label to "OK." etc then I can be in charge. I am familiar with the material in FiveWaySDK but I couldn't find any reference to this behavior. The "Done", "Cancel", etc. are discussed, and, according to the documentation, they are overrideable. What about the "OK" button? Any advice/insight? /Paul N. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Datebook crashes (occasionally)
The full source for DateBook is in the SDK. Look up the line number that reported the fatal error, and see what it's complaining about. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Hi there, > > I successfully inserted a datebook entry (directly into the database > not usinf vCal) in the right format (even checked with hex editor). > Starttime 2 bytes, > Stoptime 2 bytes, > Date 2 bytes, > flags 1 byte set to 0x14 (description & note) > alignment 1 byte set to 0, > description (cstring zero terminated) > note (cstring zero terminated) > > All the entries appear correctly in the datebook application with the > correct description, time, date and note. > > But in certain situations (OS 3.5 and OS 5.0) the datebook > application crashes with > "DateDay.c, Line:4448, Record not on day". > or > "DateDay.c, Line:4373, Wrong record". > > Did I miss something ? > > > Michael > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Help with Palm app that receives file then need to Hotsync to the PC
I have a Palm application that receives mutiple files via IR onto the Palm. Then I would like to Hotsync these files to the PC and have these files be an exact replicate of the file that was sent to the Palm. What I have tried so far is that the Palm applciation that I wrote uses the exchange manager to register for the type of files that I want to receive, so for example I register for the extensions .d20, and .ecz. When a file is beamed to the Palm my application uses the Exchange manager to receive the file and then I use File streaming to store the files on the Palm. I have used the Debug Console to verify that the files are indeed on the Palm and that the filenames are as I expected along with the correct creator Id. So I next used the DmSetDatabaseInfo() and set the dmHdrAttrBackup bit to see if I could have the files Hotsync to the PC. Well this uses the Backup Manager to Hotsync the file over to the PC. Sure enough the files are backedup to the PC in the backup directory on the PC but the file name have been changed from abc.d20 to abc_d20.PDB, etc. Also the file is not identical to the file that was sent to the Palm. It looks like it now contains a Palm file header and then the contents of my file. The next thing I tried was to write a conduit using the Conduit Wizard, since the Backup manager didn't seem to get the file to the PC in exactly the same form as the original file. When I run the conduit that I created it it seems to have a problem with the call SyncReadDBAppInfoBlock() when it is doing the synconization part of the conduit. My guess is that since the file is a file stream type instead of a palm database it isn't quite right, so the information passed back from the SyncReadDBAppInfoBlock() call isn't a return value of 0 which allow the conduit to call retrieveDB. Does anyone have some sugguestions on what is the right approach. Do I need to use databases on the Palm instead of file streams, or is it possbile to write a conduit that can take the file stream on the palm and upload it to the PC so it looks exactly like the file the Palm received. Thanks, Stephen -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
A quite complicated problem
I would like to let the user to select a particular area in a graph screen (The graph screen is now exists). Now I have made a feature that enables the user to "drag" a dotted rectangle using WinDrawGrayRectangleFrame(), like the one in windows for selecting icons. I tried to use WinSaveBits() when penDownEvent occurs to save the whole screen and draw the screen back when penMoveEvent occur by WinRestoreBits(). However, when I run it in my Palm m515, It complains with a fatal alert: MemoryMgr.c, Line:4475 Invalid chunk ptr and require me to reset. It merely makes my PC hang when I run it in POSE. :( I tried to use WinEraseRectangleFrame() when penMoveEvent occur to erase the previous rectangle. It seems works but the graph is spoiled. The WinRestoreBits() only works when penUpEvent occur. As a result, when user is selecting the graph, the graph will be spoiled. Fortunately, it can be restored back to the original one when the stylus take off from the screen. But I hope to make it looks like the Windows one, that means the dotted rectangle won't spoil the background graph. Could anybody teach me how to achieve that? Sorry for my poor English. Here is what I have written: switch (eventP->eType) { case penDownEvent: if (RctPtInRectangle(eventP->screenX,eventP->screenY,&gDrawRect)){ SavedRegion = WinSaveBits(&wholeScreenRect, &rectErr); gX =eventP->screenX; gY =eventP->screenY; gPenDown =true; handled =true; } break; case penMoveEvent: if (RctPtInRectangle(eventP->screenX,eventP->screenY,&gDrawRect)&&gPenDown){ WinEraseRectangleFrame(rectangleFrame, &dottedRect); WinRestoreBits(SavedRegion, 0, 0); //fatal alert occurs when this line exists newX =eventP->screenX; newY =eventP->screenY; dottedRect.topLeft.x = gX; dottedRect.topLeft.y = gY; dottedRect.extent.x = newX - gX; dottedRect.extent.y = newY - gY; WinDrawGrayRectangleFrame(rectangleFrame, &dottedRect); handled =true; } break; case penUpEvent: if (RctPtInRectangle(eventP->screenX,eventP->screenY,&gDrawRect)&&gPenDown){ newX =eventP->screenX; newY =eventP->screenY; gX =gDrawRect.topLeft.x; gY =gDrawRect.topLeft.y; gPenDown =false; handled =true; } break; } -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: string and constructor
At 17:58 2003-3-4 +0100, you wrote: Ok it seems to work with the Custom Data resource type, but how can i retreive data from my Custom Data resource ? How do you retrieve data from other resources? DmGetResource, MemHandleLock, read. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Palm OS programming help @ www.palmoswerks.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: A quite complicated problem
On Tuesday, March 4, 2003, at 05:43 PM, liuchoi wrote: I would like to let the user to select a particular area in a graph screen (The graph screen is now exists). Now I have made a feature that enables the user to "drag" a dotted rectangle using WinDrawGrayRectangleFrame(), like the one in windows for selecting icons. Try using WinSetDrawMode( winInvert ) and WinPaintRectangleFrame(); for an easier life. You *may* need to set the color to black or white before drawing. The advantage is that, being XOR based, you only have to draw the rectangle again to remove it from the screen. This means that you should be able to have your selection rectangle and not have to save the current state of the window. As we couldn't see the initialisation of wholeScreenRect it's hard to say about what might be causing your problems. Sean Charles. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Datebook crashes (occasionally)
Thanks that helped (even though I had to download the SDK andsearch , as I am programming with Jump). In case somebody has the same problem: The error "DateDay.c, Line:4448, Record not on day" is caused by exceeding the maximum appointments that are allowed/can be shown per day. The variable used for this is NumAppts (default set to 11=DayEndHour-DayStartHour+1). The value depends on the system's preferences. I hope the second error is just a follow-up. Michael --- In [EMAIL PROTECTED], "Chris Antos" <[EMAIL PROTECTED]> wrote: > The full source for DateBook is in the SDK. Look up the line number that > reported the fatal error, and see what it's complaining about. > > > <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > > > > Hi there, > > > > I successfully inserted a datebook entry (directly into the database > > not usinf vCal) in the right format (even checked with hex editor). > > Starttime 2 bytes, > > Stoptime 2 bytes, > > Date 2 bytes, > > flags 1 byte set to 0x14 (description & note) > > alignment 1 byte set to 0, > > description (cstring zero terminated) > > note (cstring zero terminated) > > > > All the entries appear correctly in the datebook application with the > > correct description, time, date and note. > > > > But in certain situations (OS 3.5 and OS 5.0) the datebook > > application crashes with > > "DateDay.c, Line:4448, Record not on day". > > or > > "DateDay.c, Line:4373, Wrong record". > > > > Did I miss something ? > > > > > > Michael > > > > > > > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: A quite complicated problem
Good advice. Also, I don't see you checking the return value or error code of: SavedRegion = WinSaveBits(&wholeScreenRect, &rectErr); so my guess is that SavedRegion is NULL, hence WinRestoreBits() fails. Dennis Leas --- [EMAIL PROTECTED] - Original Message - From: "Sean Charles" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 1:28 PM Subject: Re: A quite complicated problem > > On Tuesday, March 4, 2003, at 05:43 PM, liuchoi wrote: > > > I would like to let the user to select a particular area in a graph screen > > (The graph screen is now exists). Now I have made a feature that enables > > the > > user to "drag" a dotted rectangle using WinDrawGrayRectangleFrame(), > > like the one in windows for selecting icons. > > > Try using WinSetDrawMode( winInvert ) and WinPaintRectangleFrame(); for an > easier life. You *may* need to set the color to black or white before > drawing. The advantage is that, being XOR based, you only have to draw the > rectangle again to remove it from the screen. This means that you should > be able to have your selection rectangle and not have to save the current > state of the window. > > As we couldn't see the initialisation of wholeScreenRect it's hard to say > about what might be causing your problems. > > Sean Charles. > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Calling Web Services? - newbie
Dear Friends, Good morning! I am new to the world of Palm development, so please forgive any crazy questions I may ask. I presume a number of developers in this forum are well aware of the world of Web Services. For example, Amazon has a Web Service developers can plug into to perform searches, retrieve book prices, even purchase an item. Is there a current method of implementing Web Services (SOAP) under the Palm OS? If so, any ideas how this is currently done? I also heard that BEA were working on something: anyone know if this is correct? If there _isn't_ a method of doing this right now, presumably a library to encompass this could be written easily? Thanks for all your help, gang! Mark, Senior Projects Manager White Clif Computing Ltd -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Converting doubles to strings
On Tue, Mar 04, 2003 at 09:15:41AM -0700, Brad Figler wrote: > Can someone suggest a recommended method for converting doubles to > strings? It's quite hard in general. The canonical reference IMHO is Steele and White, "How to print floating-point numbers accurately", SIGPLAN '90. That was a both Google URL and a library URL :-). > I don't need the string in exponential format, I just need the string > to have 1 or 2 places precision. But, happily enough, that much is ridiculously easy. > long iValue = ( long )1.2;// Gives me a 1. > I then subtract out the 1, i.e 1.2 - 1.0 to get .2 > I then multiply that by 10 and get 2.0 (at least that's what the > debugger says I have!); > I then have the following code. > long dValue = ( long )2.0; // Gives me a 1. <-- This is the problem So of course what printed as 2.0 was in fact 1.99 or so, and truncation gave you just 1. Here is the trick: (Pretending for now that everything is positive,) if you have a downwards-rounding truncation function and you'd like to use it to "round" everything in the range [1.5, 2.5) to 2, and so on, you should do it with (long) (x + 0.5) I thought everyone learnt this trick in primary school? Or at home, while programming in BASIC as a child? John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Web Services...?
Dear Friends, Good morning! I am new to the world of Palm development, so please forgive any crazy questions I may ask. I presume a number of developers in this forum are well aware of the world of Web Services. For example, Amazon has a Web Service developers can plug into to perform searches, retrieve book prices, even purchase an item. Is there a current method of implementing Web Services (SOAP) under the Palm OS? If so, any ideas how this is currently done? I also heard that BEA were working on something: anyone know if this is correct? If there _isn't_ a method of doing this right now, presumably a library to encompass this could be written easily? Thanks for all your help, gang! Mark, Senior Projects Manager White Clif Computing Ltd (this is a repost: I am unsure if first post was issued, please forgive me if this is a duplicate!) -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Serial comm problem in Sony Clie (PEG-SL10).
I am building an app which uses the serial port to interface to a simple, non-powered device which outputs pulses at a low frequency (less than 20Hz). On the Palm Vx and m100 that I have done my initial development on, it works to use a serial cable which uses only the RTS and RXD pins. It also works to attach these two inputs to the Palm serial HotSync cables. Last week, I started some "compatibility testing" and bought a Visor Deluxe and a Clie SJ20, as well as serial HotSync cables for each. I can't get either of them to input the serial pulses (using the inputs attached to the HotSync cables), even though the serial HotSync works for both. After researching the Visor, I can see that I need to supply power, and am trying to find a new cable that will do that. Do I need to do the same thing for the Clie? On the surface, my experience contradicts Dave's statement, since I can do the serial HotSync. As always, thank you for any assistance. Bill Heidler < [EMAIL PROTECTED] > a.. From: Dave Lippincott b.. Date: Fri, 7 Feb 2003 06:45:37 It should work. Are you using a Sony serial cable or your own? The reason I ask it that the Clie hand helds do not have a RS232 line driver. They output TTL logic levels and need a line driver chip to be RS232 compatible. If you can get your SL10 to perform a serial Hotsync, you should be able to talk to it with HyperTerminal. Also double check the port geometry on the PC and Clie (baud, stop bits, parity, etc) - Original Message - From: "Rangababu, TNV (IndSys)" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 7:24 AM Subject: Serial comm problem in Sony Clie (PEG-SL10). > Hi All, > I have one Sony Clie (PEG-SL10) device with OS 4.1 and also have a > M125 Palm with OS 4.0. Currently, I have an application, which transmits > data over RS-232 (Serial Communication) from Palm to PC. In M125, using my > application I can able to communicate to PC (Whatever be the data I am > sending from my application to PC, I could able to read on HyperTerminal of > PC (Windows 2000)) but Sony Clie (PEG-SL10) does not communicate. Do I need > to do some workaround, If any have any idea, Pl. lemme know. > > Thanks in advance & Regards, > Rangababu TNV. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Converting doubles to strings
> (long) (x + 0.5) > > I thought everyone learnt this trick in primary school? Or at home, > while programming in BASIC as a child? It is funny that you say that, because now that I see that, I cannot believe I did not remember it. Thanks for reminding me. Actually, what I did was re-write it from scratch using the float manager to return the base 10 info (mantissa, sign, and exponent) and constructed the string that way. It works great. ~Brad -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Converting doubles to strings
Use GetStringFromDouble. It's been posted here several times, and beleive me, it works 100%. I use it frequently. Here it is again, in case you missed it, along with it's partner GetDoubleFromString. // == void GetStringFromDouble(Char* str, double dblNum, Int16 numFractDigits) { double flpIP, zeros, round; Int32 remainder, longNumber; Int16 i, strLen; Char buffer[16]; str[0] = 0; if (dblNum < 0.0D) { dblNum = -dblNum; StrCat(str,"-"); } zeros = 1.0D; for (i = 0; i < numFractDigits; i++) { zeros *= 10.0D; } round = 0.5D / zeros; dblNum += round; flpIP = (Int32) dblNum; dblNum -= flpIP; StrIToA(buffer, (Int32) flpIP); StrCat(str, buffer); strLen = (Int16)StrLen(str); StrCat(str, "."); // put in the decimal point and terminate the string str[numFractDigits + strLen + 1] = '\0'; longNumber = (Int32) (dblNum * zeros); // fractional part for (i = numFractDigits + strLen; i > strLen; i--) { remainder = longNumber % 10; // convert the integer part str[i] = (Char) (remainder + 0x30); longNumber /= 10; } } // == double GetDoubleFromString(Char* s) { #define DOUBLE_STRING_BUFFER_SIZE 12 Char leftstr[DOUBLE_STRING_BUFFER_SIZE], rightstr[DOUBLE_STRING_BUFFER_SIZE]; double leftval, rightval, result; Int16 j=0, k=0; Boolean isNegative = false; if (*s == '-') { isNegative = true; s++; } // strip off LHS of number for(j = 0; (s[j] != '\0') && (s[j] != '.') && (j < DOUBLE_STRING_BUFFER_SIZE); j++) { leftstr[j] = s[j]; } if (j == DOUBLE_STRING_BUFFER_SIZE) { // ERROR - RETURN ZERO result = 0.0D; return result; } leftstr[j] = '\0'; // done, terminate it if (leftstr[0] == ' ') { leftstr[0] = '0'; } // strip off RHS of number if(s[j] == '.') { j++; } while((s[j] != '\0') && (k < DOUBLE_STRING_BUFFER_SIZE)) { rightstr[k++] = s[j++]; // get RHS } if (k == DOUBLE_STRING_BUFFER_SIZE) { // ERROR - RETURN ZERO result = 0.0D; return result; } rightstr[k] = '\0'; // done, terminate it // convert the two parts to floating point #s leftval = (double)StrAToI(leftstr); rightval = (double)StrAToI(rightstr); // convert RHS to proper fraction for(j = 1;j <= StrLen(rightstr); j++) { rightval /= 10.0D; } // combine and return results result = leftval + rightval; if (isNegative) result *= -1.0D; return result; } // == Alan "Brad Figler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > (long) (x + 0.5) > > > > I thought everyone learnt this trick in primary school? Or at home, > > while programming in BASIC as a child? > > It is funny that you say that, because now that I see that, I cannot believe > I did not remember it. Thanks for reminding me. Actually, what I did was > re-write it from scratch using the float manager to return the base 10 info > (mantissa, sign, and exponent) and constructed the string that way. It > works great. > > ~Brad > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
WAV compression used by tungsten voice app/conduit
Hi All, I'm capturing voice data on a tungsten T. When generating an uncompressed WAV file from the data I'm averaging somewhere around 950K/Minute for a 16 bit, mono, 8khz sample. When I record a sample on the palm and Hotsync it over, its averaging around 250k for the same sample params. Obviously palm is using some type of wav format that involves compression. Does anyone know what it is and if code is available for it? For that matter, I'll be happy to use any wav format to acheive decent compression. Can someone kindly point me to some code? Thanks, Mike Margerum -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Help with Palm app that receives file then need to Hotsync to the PC
>correct creator Id. So I next used the DmSetDatabaseInfo() and set the >dmHdrAttrBackup bit to see if I could have the files Hotsync to the PC. >Well this uses the Backup Manager to Hotsync the file over to the PC. Sure >enough the files are backedup to the PC in the backup directory on the PC >but the file name have been changed from abc.d20 to abc_d20.PDB, etc. Also >the file is not identical to the file that was sent to the Palm. It looks >like it now contains a Palm file header and then the contents of my file. You just said that you used the DmSetDatabaseInfo(), I would assume that would make your file a pdb? Most certainly it would create a heading since you are actually _telling_ the os to do that? - Veronica -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Palm Audio Patch
I heard that Palm has released their audio patch that drastically improves sound quality on the Tungsten T. Where can I find the details? Thanks _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
TimSecondsToDateTime: seconds exceed max value
When testing my app under Gremlins (m515 debug ROM), I sometimes encounter this error. However there is no limit to the seconds value suggested by TimSecondsToDateTime(). Has anyone seen this error? Dominique -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: GPL source code for Noah's Dictionary
>* From: Paul Pang (view other messages by this author) >* Date: Mon, 3 Mar 2003 10:40:45 > >Hi, > >I am trying to locate the source code for Noah's dictionary, released >under the GPL in 2000. The source code was removed from >http://sourceforge.net/projects/noah >and I was wondering whether anyone > >had a copy around. > I'm assuming that there was no filerelease of the source since once you release a file on sourceforge you cannot remove it yourself. You might want to contact the sourceforge staff, if you cannot get ahold of the author and have them send the source, and see if they know what happened with the source code? Obviously you are obliged to provide source with anything that you release or distribute under GPL, or any open source licence so the project should technically not be allowed on sourceforge if there was no sourcecode available along with the binary release. - Veronica -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Serial comm problem in Sony Clie (PEG-SL10).
Hi Bill! Regarding the Visor, you may find this link handy: http://www.pocketaprs.com/visor.html I used the last circuit on the page and it worked fine. Also, you need to be aware that the Visor, when placed in it's serial cradle, launches a keyboard reader/monitor that opens the serial port. Subsequently, if you launch your program after placing the Visor in its cradle, then your program's serial port open call will fail since it is already open. There's some info about a workaround on Handpsring's website. (The workaround works fine for me.) I can probably provide a link if you have trouble locating it. I haven't got or tried a Sony, yet. Best wishes, Dennis Leas --- [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bill Heidler Sent: Tuesday, March 04, 2003 6:38 PM To: Palm Developer Forum Subject: Re: Serial comm problem in Sony Clie (PEG-SL10). I am building an app which uses the serial port to interface to a simple, non-powered device which outputs pulses at a low frequency (less than 20Hz). On the Palm Vx and m100 that I have done my initial development on, it works to use a serial cable which uses only the RTS and RXD pins. It also works to attach these two inputs to the Palm serial HotSync cables. Last week, I started some "compatibility testing" and bought a Visor Deluxe and a Clie SJ20, as well as serial HotSync cables for each. I can't get either of them to input the serial pulses (using the inputs attached to the HotSync cables), even though the serial HotSync works for both. After researching the Visor, I can see that I need to supply power, and am trying to find a new cable that will do that. Do I need to do the same thing for the Clie? On the surface, my experience contradicts Dave's statement, since I can do the serial HotSync. As always, thank you for any assistance. Bill Heidler < [EMAIL PROTECTED] > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Converting doubles to strings
> (long) (x + 0.5) I am going to lose sleep over this one tonight. I am such an [EMAIL PROTECTED]@[EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Palm Audio Patch
http://www.palm.com/support/downloads/ Did you try looking before posting? "Johnson Z" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I heard that Palm has released their audio patch that drastically improves > sound quality on the Tungsten T. Where can I find the details? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: WAV compression used by tungsten voice app/conduit
For a start, I'd be using 8bit samples for voice. ADPCM codecs get good compression (about 4:1) for 8bit wav files, and they require very little CPU power to compress/decompress. I don't know what Palm uses however. Alan "Dawn Margerum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi All, > > I'm capturing voice data on a tungsten T. When generating an uncompressed > WAV file from the data I'm averaging somewhere around 950K/Minute for a 16 > bit, mono, 8khz sample. When I record a sample on the palm and Hotsync it > over, its averaging around 250k for the same sample params. Obviously palm > is using some type of wav format that involves compression. Does anyone > know what it is and if code is available for it? For that matter, I'll be > happy to use any wav format to acheive decent compression. Can someone > kindly point me to some code? > > Thanks, > Mike Margerum > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Palm Audio Patch
I know that I can download the patch there. But I still dunno what it does. Any documentations for that? Thanks --- In [EMAIL PROTECTED], "Alan Ingleby" <[EMAIL PROTECTED]> wrote: > http://www.palm.com/support/downloads/ > > Did you try looking before posting? > > "Johnson Z" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I heard that Palm has released their audio patch that drastically improves > > sound quality on the Tungsten T. Where can I find the details? > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Multithreading in Palm OS 5
I guess the instability should be the 68k's fault. If using an arm processor and Palm OS5, there are quite a few softwares available for playing mp3, like pocket tunes and aero player, both support background play. If the the application can be downloaded as prc file and hotsynced into the device, the application must be hardware independent. Or the application is using the APIs only, which are available for all. The newly released palm audio patch for TT did sth to support mp3 and background play as reported by some website, but I cannot find any details about it like documentation. --- In [EMAIL PROTECTED], "Aaron Ardiri" <[EMAIL PROTECTED]> wrote: > > Thank you for your reply. > > > > But I am a bit confused. Does you mean that this kind of application > > cannot be realised directly on the Palm OS platform, but have to dig > > into the ground like dealing with the drivers or even some of the > > hardware. > > SysTaskCreate et al - they are the API's you can use - but, dont expect > to find anything about them in the documentation :) they are system > only calls, and, if you found them - you knew what you were looking for > > on OS5 devices, there may be callback functions specific for the audio > playback, hence giving the notion of multi-threading :) we played a bit > with tasks on early units, but, due to its instability, we dropped it. > > --- > Aaron Ardiri [EMAIL PROTECTED] > CEO - CTO +46 70 656 1143 > Mobile Wizardry http://www.mobilewizardry.com/ > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Multithreading in Palm OS 5
At 06:29 2003-3-5 +, you wrote: I guess the instability should be the 68k's fault. If using an arm processor and Palm OS5, there are quite a few softwares available for playing mp3, like pocket tunes and aero player, both support background play. If the the application can be downloaded as prc file and hotsynced into the device, the application must be hardware independent. Or the application is using the APIs only, which are available for all. The newly released palm audio patch for TT did sth to support mp3 and background play as reported by some website, but I cannot find any details about it like documentation. Actually, background audio threads were a feature of the streaming sound manager added in Palm OS 5.0. You can setup a callback function that the OS will call from a separate thread to provide sound data to the mixer. It looks like Palm's TT audio patch helps fix some glitches with this mechanism, such as possible resource contention between the UI thread and the sound threads. The big thing the patch does is fix the sound output quality by removing a low-pass filter that that was in the DSP audio driver. This filter made sense for the voice recorder application, but really hurt the fidelity of other audio sources. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Palm OS programming help @ www.palmoswerks.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/