using va_list twice?
does C99 or MSL (either will do) allow me to pass through a va_list twice like below? CharArray(const char *format, ...) { va_list vargs; //get the length of the string va_start(vargs, format); uint32 size = vsprintf(NULL, format, vargs) + 1; va_end(vargs); //allocate the storage char *data = (char *)malloc(size); //print the string va_start(vargs, format); vsprintf(data, format, vargs); va_end(vargs); } KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Codewarrior & template friend class
no joy with your BBB sugestion because AAA is incomplete yes CCC should compile fine. KP "Brad Figler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Visual studio does not accept it either =). > > Try > template > class AAA > { > }; > > class BBB > { > friend class AAA; > } > > ...This compiles too. > > class CCC > { > friend class AAA< int >; > } > > > Brad > > > "Kristian Penno" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > I was under the impression that the following code was legal. > > Codewarrior gives me a "declaration syntax error" on the word friend. > > Any language options I might have wrong? > > > > template > > class AAA > > { > > }; > > > > class BBB > > { > > template friend class AAA; > > }; > > > > > > KP > > > > > > > > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Codewarrior & template friend class
I was under the impression that the following code was legal. Codewarrior gives me a "declaration syntax error" on the word friend. Any language options I might have wrong? template class AAA { }; class BBB { template friend class AAA; }; KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Unexplained Beep
Never mind The beep goes away if I set handled to true before returning from the form event handler KP "Kristian Penno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I currently have this code to show a form, the form does some stuff (stuff > currently commented out), and revert back to the calling form > > This code is executed in the calling form's event handler when it receives a > menuEvent. > After this code is executed and the form handler returns back to within > FrmDispatchEvent > > I here a beep sound. > > This beep occurs before FrmDispatchEvent return to my app event loop. > > If I execute this code from a button press, no beep. > > Anybody know why it should cause a beep, and only from a menu event? > > > FormPtr prevForm = FrmGetActiveForm(); > FormPtr frmP = FrmInitForm(formID); > FrmSetActiveForm(frmP); > FrmSetEventHandler(frmP, handler); > FrmDrawForm(frmP); > > /*will do something here when I get rid of this beep*/ > > FrmEraseForm(frmP); > FrmDeleteForm(frmP); > FrmSetActiveForm(prevForm); > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Unexplained Beep
I currently have this code to show a form, the form does some stuff (stuff currently commented out), and revert back to the calling form This code is executed in the calling form's event handler when it receives a menuEvent. After this code is executed and the form handler returns back to within FrmDispatchEvent I here a beep sound. This beep occurs before FrmDispatchEvent return to my app event loop. If I execute this code from a button press, no beep. Anybody know why it should cause a beep, and only from a menu event? FormPtr prevForm = FrmGetActiveForm(); FormPtr frmP = FrmInitForm(formID); FrmSetActiveForm(frmP); FrmSetEventHandler(frmP, handler); FrmDrawForm(frmP); /*will do something here when I get rid of this beep*/ FrmEraseForm(frmP); FrmDeleteForm(frmP); FrmSetActiveForm(prevForm); -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Codewarrior and STL
Has the STL implimentation shipped with Codewarrior been updated since version 7? KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: USB Debugging + Serial Comms + Codewarrior
I have a USB cradle to which I've added a serial port. When in the cradle, the device hotsyncs via USB. I can open the serial port by specifying the 232 port. KP "Ben Combee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > At 11:31 2003-5-30 +1000, Kristian Penno wrote: > >Is it possible to debug a palmos device via USB whilst performing serial > >communications over the 232 port? > > > >If so, will codewarrior V9 have any issues doing this? > > I really don't know. I've not tried any dual USB/serial cables to see how > the devices perform while debugging. While this is possible in theory, it > will depend on the implementations of the devices. For example, Palm > devices using the Universal Connector use a PNP signal pin to detect if a > USB or serial cable is connected and use that info to open the appropriate > debugger port. We've seen problems with people using the dual cables, as > they didn't indentify in a way that the device debugger nub recognized. > > -- > 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/
USB Debugging + Serial Comms + Codewarrior
Is it possible to debug a palmos device via USB whilst performing serial communications over the 232 port? If so, will codewarrior V9 have any issues doing this? I'm currently using V7 and looking to upgrade. KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
WinDrawRectangleFrame under OS5
When I draw a rectangle frame using WinDrawRectangleFrame passing dialogFrame as the frame type, the results are slightly different to the frames drawn by the OS around modal dialogs. The corners are slightly less round. This only occurs in high desnity mode. Is it possible to get exactly the same frame as that of the modal dialogs? KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Resource Editor for font creation
Any suggestions on the best tool to use to create custom PalmOS fonts? KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
m505 serial flow control
I'm opening the cradle 232 port on my m505 and leaving the default settings (which include flow control on the receive path as far as I know). Then I send down a whole lot of data (more than the receive buffer size) from my PC using hyperterm. The flow control lines never change state, and receive serial buffer just wraps around to the start (checked using SrmReceiveCheck). Is there anything special required to get hardware flow control working? KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Scrolling Text Field
Has anybody implimented a text field that scrolls horizontally and vertically? Any ideas on how best to do the horizontal scrolling? Thanks, KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Application copy protection
Why not issue a key which is some hash of the device serial number. The user enters it in once and the application stores it as a 'feature'. Each time the app runs, it checks for the presence of the key, and checks if it is valid against the devices serial number. This way, the user only has to enter the key once every time the software is installed, this shouldn't make them too unhappy. The software can be copied, but won't run without a valid key. The only way this can be broken is if someone dissassembles your app, locates the hashing code and discovers your hashing algorithm. "Alexandre Kazantsev" <[EMAIL PROTECTED]> wrote in message news:95270@palm-dev-forum... > > Hi everybody, > > I've been unluckily trying to find out some information about the issue in > archives. The issue is reasonable and reliable copy protection approach or > trick. Our application is to be protected from illegal copying, and I am > looking for a programming method to secure our copyright. Is there an > individual feature stored in the ROM of a particular PDA? My guess is there > should be something to be referenced programmatically for that purpose. > Please give me a direction. > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
FrmAlert and Form width
The OS5 Sim is giving me a warning when I display an Alert from a form that isn't the full screen width wide. I havn't come across anything covering this in the docs. Do I really have to make my form the width of the screen? KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: FrmAlert in frmCloseEvent Handler
That's what I'm currently doing. There are several actions that can cause the FormA => FormB transition and the frmCloseEvent handler seemed the most appropriate place. Now I have a function which does the Alert and then calls FrmGotoForm. KP "Steve Mann" <[EMAIL PROTECTED]> wrote in message news:94632@palm-dev-forum... > > >I am calling FrmGotoForm(FormB) to switch from FormA to FormB. > >In the frmCloseEvent handler of FormA I'm calling FrmAlert to check if the > >user wishes to save the currently open file to flash. > >The problem is that the FrmAlert event loop eats the frmLoad and frmOpen > >events for FormB. > > Why not do the FrmAlert in whatever code precedes the FrmGotoForm > instead of follows it. There must be some kind of action that > triggers the FrmGotoForm. > > Regards, > Steve Mann > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
FrmAlert in frmCloseEvent Handler
I am calling FrmGotoForm(FormB) to switch from FormA to FormB. In the frmCloseEvent handler of FormA I'm calling FrmAlert to check if the user wishes to save the currently open file to flash. The problem is that the FrmAlert event loop eats the frmLoad and frmOpen events for FormB. Once the Alert closes, I'm stuck without an open form. There are ways around the problem, I'm just surprised that I haven't come across this in the docs, has anybody else?. KP -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/