Re: How to extract a string from a form field using Palm OS 3.1
I am doing something very similar to this. Below is a snippet of my code. Hope it helps... -Tom - snippet start - Handle screenText; // handle to data currently displayed in form Uint myFieldIndex; FieldPtr myFieldPtr; FormPtr frmP; frmP = FrmGetActiveForm(); dataIndex = FrmGetObjectIndex(frmP, FieldID); // get index to data field dataFldPtr = FrmGetObjectPtr(frmP, myFieldIndex); // get Ptr to data field FldCompactText(myFieldPtr ); // compact text before grabbing it screenText = FldGetTextHandle(myFieldPtr); // get handle to text newRecPtr = MemHandleLock(newRecText); // get ptr to locked handle .. do stuff the data .. MemHandleUnlock(screenText); // unlock the handle - snippet end - > Hi, > > I'm adding some enhancements to an application writter with Palm OS 3.1 > I need to extract a string (the data that the user entered) into a field on > a form. > I tried copying the example from a book that is probably associated with > Palm OS 3.5 and CW7. > This is the code that does not compile: > > ** > > FieldPtr TextFieldPtr; > Char pwd[16]; > > TextFieldPtr = > FrmGetObjectPtr(logonForm,FrmGetObjectIndex(logonForm,LogonPasswordField)); > > MemHandle TextHandle = FldGetTextHandle(TextFieldPtr); // does not compile > StrCopy(pswd, MemHandleLock(TextHandle));// does not compile > MemHandleUnlock(TextHandle); // does not compile -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: about zire71 photo
Thanks for Fridael's helps. If I preview the photo,e.g:the size is 100*100.How do I do? Thanks. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: memory leaks vs. unallocated chunks
Thank you very much for your response. Unfortunately I'm still stuck. Actually, the problem is more that ClearPickedList doens't work correctly once I do free the memory. I'm pretty sure about where the memory leaks are coming from, but fixing them breaks ClearPickedList (and only on the last call). As for putting ClearPickedList in AppStop, I have it in the exit cleanup routine for this form, since that would take care of the memory held by the form's list. Once the form has been dismissed, that list no longer exists, so it'd never tie up any more memory than what it had upon dismissal of the form. So any cleanup for this list actually has to go in the cleanup for the form and isn't really helpful in AppStop. My problem is mainly that I add a picked item and call fill list which first calls clear list. This works repeatedly, but then once I try to exit the form, and run ClearList without first adding a new item ClearList doesn't work. ie: AddPickedItem Clear List Fill List AddPickedItem Clear List Fill List AddPickedItem Clear List Fill List ClearList (this call doesn't work, memory has been deallocated) The obvious difference between this call to Clear List and the working ones is that they all have a preceding AddPickedItem, but I just can't see where, in AddPickedItem, the code is that makes ClearList work. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: T/2 Voice Memo button
I've never seen any documentation about how to use the "Voice Memo" button, but it behaves like another hard key. While the hard keys produce key events 0x0204, 0x0205, 0x0206, and 0x0207, the "Voice Memo" key produces 0x0214. The "Voice Memo" key only appears in conjunction with the 5-way navigator, so perhaps that would be an adequate test. I'm not sure about the Tungsten/W - does it have the key? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
calling NETLIBSEND repeatedly
PALM Developers, I am calling NETLIBSEND repeatedly to send a string to the server. On the server side I only see the first string sent, other calls are not recieved at the server side. Any pointers as to how to call NETLIBSEND repeatedly. Regards, -- Arijit Das -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Screen Flash???
From: <[EMAIL PROTECTED]> > When navigating between my form A and form B, I get a flash view > form C in between the closing of form A and the drawing of form B. > > Am I supposed to clean this up somewhere? What did I miss? > I had a problem with the same thing that seemed to be a side-effect of the store-behind logic that keeps a form image to refresh the screenwhen a form is cleared. While I agree with Brad that form C might be still loaded or loaded and unloaded quickly I also found a third alternative - - that some form sequences could lead to a form image of a closed form hanging around. I never really pinned down what I was doing wrong, and eventually removed the save behind flag on all forms and handled all painting myself, although that's more because we were supporting animation effects than anything else. My memory of the problem was that it seemed to be related to raising a form with save behind set, then covering it with a form that didn't have save behind set (or vice-versa). Although everything functioned properly a form image seemed to be retained and would sometimes be used as a 'blank slate' onto which current form controls were drawn. This was all a year or two ago under Palm OS 3.1/3.5 How's that for vague? Chris Tutty -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
How to extract a string from a form field using Palm OS 3.1
Hi, I'm adding some enhancements to an application writter with Palm OS 3.1 I need to extract a string (the data that the user entered) into a field on a form. I tried copying the example from a book that is probably associated with Palm OS 3.5 and CW7. This is the code that does not compile: ** FieldPtr TextFieldPtr; Char pwd[16]; TextFieldPtr = FrmGetObjectPtr(logonForm,FrmGetObjectIndex(logonForm,LogonPasswordField)); MemHandle TextHandle = FldGetTextHandle(TextFieldPtr); // does not compile StrCopy(pswd, MemHandleLock(TextHandle));// does not compile MemHandleUnlock(TextHandle); // does not compile ... Thanks in advance. Fred 415 640-2980 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: .bss full?
By the way, is it possible to move global constant data into sections other than .bss? Thanks, --- Khaki Wizard <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using multi-section code. When I'm adding more > code into the project, ld tells something like: > > /usr/m68k-palmos/bin/ld: region datares is full > (xx section .bss) > > Now I have 3 sections (besides the .text .data > .bss). > > Why is .bss full? Is it because there is too many > reloc entries. As I know, they should be in .data > section. > > By the way, I didn't add any global data, just some > functions. > > Thanks, > > __ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > http://sitebuilder.yahoo.com > > -- > For information on using the Palm Developer Forums, > or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
T/2 Voice Memo button
Hi all, I would like to use the "Voice Memo" button found on the left side of the Tungsten T/2 in my software.. Would anyone know what virtual character this button generates? Also, is there a definitive way to programmatically find out if the software is running on a T/2 with this button or one without it? Thanks for all the help Jim -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
.bss full?
Hi, I'm using multi-section code. When I'm adding more code into the project, ld tells something like: /usr/m68k-palmos/bin/ld: region datares is full (xx section .bss) Now I have 3 sections (besides the .text .data .bss). Why is .bss full? Is it because there is too many reloc entries. As I know, they should be in .data section. By the way, I didn't add any global data, just some functions. Thanks, __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Database help.
The way I am currently using the palm database does not seem correct. Yes I have gotten it to work, and it is doing what I ask it to do, however, It seems WAY too complex and there has to be a better way. Currently I keep my information in a struct Rec For example: Struct Rec { char* data; int foo; char* bar; ... constructor destructor etc... }; When I write to the record I am writing Rec.data, which is a char star with each field seperated by "~"'s. For example if foo is 5 and bar is "asdf" then data would be "5~asdf" When I pull the data out of the DB I put it into a new rec's data field. I then have two functions, CombineDataIntoFields and ExpandData. This fills the appropriate fields, foo and bar, with the data out of data, or vice versa, creates data by concating all the fields with the "~" spacer. Like I said, WAY too complex. I have tried just writing a pointer to a record this way: Struct Rec { int foo; char* bar; }; // rec is a *Rec newRec = DmResizeRecord(db, index, sizeof(rec)); errDb = DmWrite(MemHandleLock(newRec), index, rec, sizeof(rec)); I know there has to be a way to do something like this but it isn't quite working yet. Any suggestions? tia, Steve K -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: LstSetListChoices
Thanks guys, but I have solved this issue already. Steve K "Tom Hoelscher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > According to the Palm OS Reference, if the list is visible when you call > LstSetListChoices, you will need to call LstDrawList to update the list. > > > -Tom > > > > It has been a few days and I have not heard on this, so I thought I would > > post again. > > > > I am trying to set the choices in a list using LstSetListChoices, and know I > > am getting very close to getting it to work. > > > > I call my function to populate the list and I receive no error and I get no > > data displayed in my list. > > > > Here is the function. > > > > static char* gPlateString = > > "PL3/16x\0PL1/4x\0PL5/16x\0PL3/8x\0PL1/2x\0PL5/8x\0"; > > static char** gListString; > > MemHandle gStringH; > > > > static Boolean PopulateList(FormType* frmP, ListType* lstP) > > { > > gStringH = SysFormPointerArrayToStrings(gPlateString, 6); > > gListString = (char**)MemHandleLock(gStringH); > > > > LstSetListChoices(lstP, gListString, 6); > > MemHandleUnlock(gStringH); > > > > return true; > > } > > > > ... > > > > case frmCloseEvent: > > MemHandleFree(gStringH); > > break; > > > > tia, > > > > Steve > > > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: bus error when table custom draw routine is modularized
Thanks for the quick reply, Ben--and the pointer about using the register view. That's a new one for me. Sure enough, I can see the A6 register being overwritten when I step over that call. I'm not sure why my 6 byte buffer was overflowing since there were only 5 bytes (including the null) in the string but when I "do the right thing" and use timeStringLength as the buffer size, all is well. Thanks big guy! :) David - Original Message - From: "David Beers" <[EMAIL PROTECTED]> To: "David Beers" <[EMAIL PROTECTED]> Sent: Thursday, August 21, 2003 4:14 PM Subject: bus error when table custom draw routine is modularized > At 04:42 PM 8/21/2003, David Beers wrote: > >I've got a custom drawing routine for an item in a table that need to draw > >quite a bit of stuff, so I thought I'd modularize the code into some > >different drawing functions. In the process, some calls to the following > >conversion function were moved from the table callback out to the drawing > >functions. This function didn't cause problems when it was called from > >inside the callback routine, but if it's called from the drawing functions > >I get a bus error when the calling function returns control to the table > >callback routine. > > OK, so here's a quick idea. Set a breakpoint on the call to this > SecondsToString > function. Bring up the register view, click on A7 (the stack pointer), > then do Debug/View Data in the CW debugger. This will show you your > stack. Step over the function. Since the caller defines > > Char strTime[6]; > > I bet TimeToAscii is writing more than five characters and a NUL and is > overwriting the return address. It may not have been a problem in your > original code due to having more variables on the stack. There is a reason > why DateTime.h defines > > #define timeStringLength9 > > You should be sure to use that value as the minimum length of a buffer you > pass to TimeToAscii. > > -- > 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/
Using Tables + PRC-Tools (Newbie)
Hi Palm'Pals Any one know some place where can i find some examples on using tables (UI) programing in gcc with prctools? Thanks a Lot Julio -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: bus error when table custom draw routine is modularized
At 04:42 PM 8/21/2003, David Beers wrote: I've got a custom drawing routine for an item in a table that need to draw quite a bit of stuff, so I thought I'd modularize the code into some different drawing functions. In the process, some calls to the following conversion function were moved from the table callback out to the drawing functions. This function didn't cause problems when it was called from inside the callback routine, but if it's called from the drawing functions I get a bus error when the calling function returns control to the table callback routine. OK, so here's a quick idea. Set a breakpoint on the call to this SecondsToString function. Bring up the register view, click on A7 (the stack pointer), then do Debug/View Data in the CW debugger. This will show you your stack. Step over the function. Since the caller defines Char strTime[6]; I bet TimeToAscii is writing more than five characters and a NUL and is overwriting the return address. It may not have been a problem in your original code due to having more variables on the stack. There is a reason why DateTime.h defines #define timeStringLength9 You should be sure to use that value as the minimum length of a buffer you pass to TimeToAscii. -- 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/
bus error when table custom draw routine is modularized
I've got a custom drawing routine for an item in a table that need to draw quite a bit of stuff, so I thought I'd modularize the code into some different drawing functions. In the process, some calls to the following conversion function were moved from the table callback out to the drawing functions. This function didn't cause problems when it was called from inside the callback routine, but if it's called from the drawing functions I get a bus error when the calling function returns control to the table callback routine. static Char * SecondsToString(Char *strTime, UInt32 seconds) { UInt8 hours, minutes; minutes = seconds / 60; // round up if (seconds % 60 >= 30) { minutes++; } hours = minutes / 60; minutes = minutes % 60; TimeToAscii(hours, minutes, tfColon24h, strTime); return strTime; } For example, if my table callback function contains this I'm OK: static void MainFormDrawRecord(MemPtr table, Int16 row, Int16 column, RectangleType *bounds) { ... Char strTime[6]; UInt32 aNumber = 10; ... SecondsToString(strTime, aNumber); // Drawing stuff here } But if I do this, I get the error: static void MainFormDrawRecord(MemPtr table, Int16 row, Int16 column, RectangleType *bounds) { ... UInt32 aNumber = 10; ... DrawNumber(aNumber); ... } static void DrawNumber(UInt32 aNumber) { Char strTime[6]; SecondsToString(strTime, aNumber); // Drawing stuff here }
static library linker problem
Help. I have built some static libraries and now I am building a main program and when I go to make this main program with a static library linked to it I get linker errors like the following: Link Error : mycfile.c: Global Object 'function name' was already defined in File: 'mycfile.c'. What is happening here and how do I fix it? Any suggestions would be much appreciated. Monika -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: LstSetListChoices
According to the Palm OS Reference, if the list is visible when you call LstSetListChoices, you will need to call LstDrawList to update the list. -Tom > It has been a few days and I have not heard on this, so I thought I would > post again. > > I am trying to set the choices in a list using LstSetListChoices, and know I > am getting very close to getting it to work. > > I call my function to populate the list and I receive no error and I get no > data displayed in my list. > > Here is the function. > > static char* gPlateString = > "PL3/16x\0PL1/4x\0PL5/16x\0PL3/8x\0PL1/2x\0PL5/8x\0"; > static char** gListString; > MemHandle gStringH; > > static Boolean PopulateList(FormType* frmP, ListType* lstP) > { > gStringH = SysFormPointerArrayToStrings(gPlateString, 6); > gListString = (char**)MemHandleLock(gStringH); > > LstSetListChoices(lstP, gListString, 6); > MemHandleUnlock(gStringH); > > return true; > } > > ... > > case frmCloseEvent: > MemHandleFree(gStringH); > break; > > tia, > > Steve > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: LstSetListChoices
How many visible items are there? -Original Message- From: Steve K [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 1:10 PM To: Palm Developer Forum Subject: LstSetListChoices It has been a few days and I have not heard on this, so I thought I would post again. I am trying to set the choices in a list using LstSetListChoices, and know I am getting very close to getting it to work. I call my function to populate the list and I receive no error and I get no data displayed in my list. Here is the function. static char* gPlateString = "PL3/16x\0PL1/4x\0PL5/16x\0PL3/8x\0PL1/2x\0PL5/8x\0"; static char** gListString; MemHandle gStringH; static Boolean PopulateList(FormType* frmP, ListType* lstP) { gStringH = SysFormPointerArrayToStrings(gPlateString, 6); gListString = (char**)MemHandleLock(gStringH); LstSetListChoices(lstP, gListString, 6); MemHandleUnlock(gStringH); return true; } ... case frmCloseEvent: MemHandleFree(gStringH); break; tia, Steve -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- The information in this transmittal and any attachments are confidential and intended only for the recipient(s) listed above. You are hereby notified that any unauthorized distribution or copying of this transmittal or its attachments is prohibited. If you have received this transmittal in error, please notify invivodata immediately at (831) 438-9550. -- -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Free Handle
At 04:11 PM 8/21/2003, John R. Miller wrote: After belatedly moving to system 5 testing I'm getting a "free Handle" error in system code between events (needless to say, the problem doesn't occur in system 4 testing). I'm using CodeWarrior 7 with the Palm OS 5 SDK (68K) R2 on Window 2000 (5.00.2195) If I step through the code the hang occurs after a FrmGotoForm call. Breakpoints set in PilotMain or anywhere reasonable in my code don't get hit. CodeWarrior releases before V9 won't be able to reliably debug to Palm OS 5 devices. There is a bug in how PACE on the device handles stepping through code. You may be able to debug to the Palm OS 5 simulators, but V8.3 or better is needed for best results with those. -- 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/
Free Handle
After belatedly moving to system 5 testing I'm getting a "free Handle" error in system code between events (needless to say, the problem doesn't occur in system 4 testing). I'm using CodeWarrior 7 with the Palm OS 5 SDK (68K) R2 on Window 2000 (5.00.2195) Although I don't doubt that my code is to blame, several things are making this difficult to debug: The usual behavior is for the simulator to hang. It may be trying to give me a message (when I kill it with Task Manager I'm sometimes told it is waiting for a response from me). It does log a free Handle message in the Error Log file. If I step through the code the hang occurs after a FrmGotoForm call. Breakpoints set in PilotMain or anywhere reasonable in my code don't get hit. I did manage to come up with a test case that actually gives an error message rather than hanging but if I switch to the debugger, the stack traceback doesn't include any of my code. The PilotMain at the top isn't mine. The error message in the simulator (as in the error log file) is memorymgr.c line 3583 Free Handle and the traceback is __Startup__ PilotMain ProcessNotify LaunchDBHandleSetInfo LaunchDBHandleSetInfo PrvUpdateLaunchDBEntry What I'm doing just before the FrmGotoForm call is copying a database with some changes. Attempts to pinpoint the cause by leaving out various things (and the above trace) suggested the problem had to do with the AppInfo block. Leaving out the update of the AppInfo block did eliminate the failure in that test, but it reappeared later (in about the same place in my code -- updating a database but without updating the appinfo block) in its more usual form (i.e., just a hang). Further investigation suggests the connection with the appinfo block may be spurious, but... Any suggestions? I suppose updating my copy of CodeWarrior might be a good one. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: about zire71 photo
"www.msale.net" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I want to preview the photo on Zire71 when user select a photo.Please tell > me how I do ? AFAIK, Palm SG hasn't released the API headers for displaying photos(assuming there is an API for this). Only the camera API (for taking pictures) has been made public. Regard -Laurens -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Screen Flash???
Are you showing Form A as a modal form? If so, you need to keep the form below it from updating when form A closes? If not, then for some reason form C is still loaded or being loaded and unloaded very quickly. ~Brad [EMAIL PROTECTED] wrote: When navigating between my form A and form B, I get a flash view form C in between the closing of form A and the drawing of form B. Am I supposed to clean this up somewhere? What did I miss? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Screen Flash???
When navigating between my form A and form B, I get a flash view form C in between the closing of form A and the drawing of form B. Am I supposed to clean this up somewhere? What did I miss? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: memory leaks vs. unallocated chunks
I decided to respond to your question because sometime ago I also had a very similiar problem. I tried to look again in my code what I did to solve it, but can not remember exactly what it was. However, I *think* you should try to also call your ClearPickedList from the AppStop() function. I do a MemPtrFree of the list in my frmCloseEvent and in my AppStop() and now I do not have the memory leaks anymore. > tells me that details can be found in "the log file." What log file? This question is easy to answer. The log file resides in the same directory where your POSE.exe if you enabled it. Enable it with a right click -> Setting -> Logging and choose what you want to log. Having said that... the log file did not help me much to locate the source of the memmory leak. Recently there was a posting where someone briefly explained how it works, butI still do not know how to relate the log data to actually resolving where the leak occurs. --- In [EMAIL PROTECTED], "meg" <[EMAIL PROTECTED]> wrote: > Hello, > I am having a problem that I have spent days trying to figure out with no > success. My program includes a form with two lists, the options -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Visor Deluxes... Lots of them
> -Original Message- > From: Dave Lippincott > Subject: Re: Visor Deluxes... Lots of them > > > If they're not available, they need to remove them from their website. > >From the Handspring website: > Refurbished Organizers > Treo 90 In stock > Visor Pro Temporarily out of stock > Visor Edge In stock > Visor Platinum In stock > Visor Neo In stock > Visor Deluxe In stock > Visor Prism In stock Dave, the website does not state that they have 1500 units "in stock." In fact, they have under 100. This is why I posted my original message seeking a larger supplier. -Jeff Ishaq -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: PDB generation
Do not assign the uniqueID or uniqueIDseed yourself. Leave the uniqueID as 0 when you make the PDB on the PC. It will automatically be filled in when the PDB is downloaded to the Palm. If the ID is assigned and handled by the Palm, it is unlikely you will find duplicates. (note that the uniqueID is only unique for a given PDB file, not the whole Palm although I don't think you see many duplications) Check out the conduit developer forum's archive for several discussions on building PDB files and the uniqueID. - Original Message - From: "Sylvain Fonteneau" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, August 21, 2003 12:59 PM Subject: PDB generation > Hi all, > > I'm trying to write a application which generate PDB files (on my > desktop). Then I download these PDB in my Palm with instapp.exe and I > read them with a soft I wrote. Some records might be added to these > files (on the palm). For the moment, I plan to generate uniqueID simply > by incrementing a variable for each record (1, 2, 3, ...). > > Here are my questions : is there any chance that some uniqueID dupilcate > on the palm when user add some records ? Am I going to have problems if > this happen ? What value should I write in the uniqueIDseed field in > the PDB header ? > > thanks... > _ > Sylvain Fonteneau > > > -- > 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: programaticaly deactivate the beam receive
Not so silly after all. PrefGetPreference(prefBeamReceive); can be used to read the preference but setting it with PrefSetPreference(prefBeamReceive,false); won't affect the Ir Manager. in preference.h it says: prefBeamReceive, // not used - use ExgLibControl with ir(Get/Set)ScanningMode instead but ExgLibControl need 4.0 feature set and I'm in Palm OS 3 :( I'm back to square one. -- Regis St-Gelais, P. Eng. / ing. Software Development / Développement informatique Technical Support / Support technique Laubrass inc. www.laubrass.com [EMAIL PROTECTED] (remove / enlever 'NOSPAM') -- "Regis St-Gelais" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > > silly me! > > PrefGetPreference does just that. And the worse is that I am allready using > it to read the auto off duration. > > Thanks anyway > > -- > Regis St-Gelais, P. Eng. / ing. > Software Development / Développement informatique > Technical Support / Support technique > Laubrass inc. > www.laubrass.com > [EMAIL PROTECTED] > (remove / enlever 'NOSPAM') > -- > "Regis St-Gelais" <[EMAIL PROTECTED]> a écrit dans le message de > news:[EMAIL PROTECTED] > > > > Hi all, > > > > I want to deactivate the beam receive. > > > > The irSuppressScanning constant allow to do that using ExgControl but it > is > > not avaliable in OS 3. > > > > There is a beam receive setting in the OS preferences, is it possible to > set > > it programaticaly? > > > > TIA > > > > -- > > Regis St-Gelais, P. Eng. / ing. > > Software Development / Développement informatique > > Technical Support / Support technique > > Laubrass inc. > > www.laubrass.com > > [EMAIL PROTECTED] > > (remove / enlever 'NOSPAM') > > -- > > > > > > > > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Could this code be causing heap memory loss?
At 10:07 AM -0600 8/21/03, Heriberto Delgado V·squez wrote: I have an PalmOS C++ application with code like the following: //- void TPrinterUtil::ReadConfiguration() { TPrinterData& Data = * new TPrinterData(*dbName); // do something with Data delete &Data; } //- I know that these two lines seem somewhat strange, but the fact is, they compile and run and, apparently, do their work as they should. However, one of my coworkers pointed to me it was easier, and safer, to write that code like this: //- void TPrinterUtil::ReadConfiguration() { TPrinterData Data(*dbName); // do something with Data // Data need not be explicitly destroyed } //- At first, I didn't see what could be the difference, but he (my coworker) told me my original code might not be destroying the memory block pointed to by Data, but something else, like system memory or unallocated space. Obviously, that freaked me out completely. I need your opinion on this. Does this code do what my coworker says? If it does, I'm afraid I will need to rewrite most of the code in my application, and that scares me a lot! Both versions should be OK. Yours has the benefit of not eating up precious stack space; his has the benefit of being safer (you don't have to worry about the allocation failing, or of the object being leaked by exiting the function before calling delete). Your coworker's explanation as to why your approach is wrong seems bogus to me. I'm not sure what he's getting at with his comments about "system memory" or "unallocated space". However, your use of references here is definitely non-standard, and I'm not even 100% sure that it's correct. For instance, what if operator new() returns NULL? What does Data refer to? What does &Data resolve to? I know what happens with the compilers I use from personal experience, but I'm not sure that the C++ spec says. Personally, I'd use the following: void TPrinterUtil::ReadConfiguration() { TPrinterData* Data = new TPrinterData(*dbName); // do something with Data delete Data; } or, better yet: void TPrinterUtil::ReadConfiguration() { auto_ptr Data = new TPrinterData(*dbName); // do something with Data.get() // Data need not be explicitly destroyed } -- Keith -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Could this code be causing heap memory loss?
Heriberto Delgado Vásquez wrote: Hi! I have an PalmOS C++ application with code like the following: //- void TPrinterUtil::ReadConfiguration() { TPrinterData& Data = * new TPrinterData(*dbName); // do something with Data delete &Data; } //- I think that actually works, however, normally it is written as follows TPrinterData *Data = new TPrinterData( *dbName ); // Now when you access data you must do Data->memberVariable vs. Data.memberVariable. delete Data; I know that these two lines seem somewhat strange, but the fact is, they compile and run and, apparently, do their work as they should. However, one of my coworkers pointed to me it was easier, and safer, to write that code like this: //- void TPrinterUtil::ReadConfiguration() { TPrinterData Data(*dbName); // do something with Data // Data need not be explicitly destroyed } //- Writing it this way is better from a maintenance point of view but consumes stack space. In this case it probably does not matter, but in the case of the following unsigned char buffer[ 2048 ]; // 2048 bytes on the stack. vs. unsigned char *buffer = new unsigned char[ 2048 ]; // 2048 bytes from the heap and 4 bytes from the stack. it makes a very big difference. At first, I didn't see what could be the difference, but he (my coworker) told me my original code might not be destroying the memory block pointed to by Data, but something else, like system memory or unallocated space. Obviously, that freaked me out completely. I need your opinion on this. Does this code do what my coworker says? If it does, I'm afraid I will need to rewrite most of the code in my application, and that scares me a lot! I think your code works, but it will be very confusing for anyone who comes in after you to change the code. IMHO, you should re-write all of your code where you access memory in this fashion. - Heriberto Delgado ([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: programaticaly deactivate the beam receive
silly me! PrefGetPreference does just that. And the worse is that I am allready using it to read the auto off duration. Thanks anyway -- Regis St-Gelais, P. Eng. / ing. Software Development / Développement informatique Technical Support / Support technique Laubrass inc. www.laubrass.com [EMAIL PROTECTED] (remove / enlever 'NOSPAM') -- "Regis St-Gelais" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > > Hi all, > > I want to deactivate the beam receive. > > The irSuppressScanning constant allow to do that using ExgControl but it is > not avaliable in OS 3. > > There is a beam receive setting in the OS preferences, is it possible to set > it programaticaly? > > TIA > > -- > Regis St-Gelais, P. Eng. / ing. > Software Development / Développement informatique > Technical Support / Support technique > Laubrass inc. > www.laubrass.com > [EMAIL PROTECTED] > (remove / enlever 'NOSPAM') > -- > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
FrmPopupForm() -> Controlling form objects in the 'background' form
I'm trying to set up a modal form for a search. Because this form will not only allow the user to enter text (with a button Keyboard support) but also the ability to scan in a barcode, I'm thinking despite the overhead FrmPopupForm is the call of choice. Now on the MainForm I've got a button to open the modal search form using FrmPopupForm(), On this MainForm, I've got a pdb generated list of the searchable items. I handle the button event for the main form to popup the search form The search form has an OK and a Cancel button Once the user enters a search value and hits okay, I'm returning the index of the matching key value so I can hilite the proper list item But, how do I control the list from this form? I tried this from within the Search Form Ok Button Event Handler form = FrmInitForm(MainListForm); FrmSetActiveForm(form); etcetc.. LstSetSelection(). But then I get an error saying that there is no event handler? I'm How do I get around this? Nole Mailey -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
PDB generation
Hi all, I'm trying to write a application which generate PDB files (on my desktop). Then I download these PDB in my Palm with instapp.exe and I read them with a soft I wrote. Some records might be added to these files (on the palm). For the moment, I plan to generate uniqueID simply by incrementing a variable for each record (1, 2, 3, ...). Here are my questions : is there any chance that some uniqueID dupilcate on the palm when user add some records ? Am I going to have problems if this happen ? What value should I write in the uniqueIDseed field in the PDB header ? thanks... _ Sylvain Fonteneau -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to add new ISR in Interrupt table ?
I would think that you may be able to use either the Notification or Hack API to accomplish this. What exactly do you want? "Virendra" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hey All, > > I just wanted to know if there is any way ( desirably > within the premises of Palm API ) via which I could > insert a new ISR in Interrupt Vector Table ? > > Thanks. > > -Viren > > = > "There is nothing good or bad, > There is nothing happy or sad, > Only thinking makes it so!" > - William Shakespeare > > __ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Visor Deluxes... Lots of them
If they're not available, they need to remove them from their website. >From the Handspring website: Refurbished Organizers Treo 90 In stock Visor Pro Temporarily out of stock Visor Edge In stock Visor Platinum In stock Visor Neo In stock Visor Deluxe In stock Visor Prism In stock - Original Message - From: "Jeff Ishaq" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, August 21, 2003 10:23 AM Subject: RE: Visor Deluxes... Lots of them > > -Original Message- > > From: Dave Lippincott > > Sent: Thursday, August 21, 2003 6:12 AM > > > > You may already know this but Handspring is still selling > > reconditioned units. You could buy them out of those too. > > Can you use another model too or just the Deluxe? > > Just the Deluxe. Handspring's reconditioned units are apparently not > available anymore, thereby thwarting Plan A. > > -Jeff > > > -- > 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: Registration Scheme
I believe you can supply a creator ID other than your application's (my Common/UI library does this to handle the registration scheme for many applications) when saving preferences, thereby leaving behind the registration information even if your application is deleted. Put it in Saved Preferences and even if the user deletes and re-installs, your registration information is still there. -- Matthew (Darkstorm) Bevan [EMAIL PROTECTED] Margin Software, NECTI. http://www.marginsoftware.com Re-inventing the wheel, every time. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: about zire71 photo
please help me,and thanks. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Hard buttons and alert
You generally don't, alerts messages handled by the system. Design your own dialog to resemble an alert and have your app handle the buttons. - Original Message - From: "Alexandre Kazantsev" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, August 21, 2003 10:13 AM Subject: Hard buttons and alert > Hi, > > How to disable hard buttons for the time when alerts are poped up? The > buttons are reprogrammed in my application. However, as an alert resource > gets called the hard buttons original assignments are restored for that > time. The hard buttons interception implemented for an active form appears > to be cancelled by any alert call. I would be happy just to disable the > butons for an alert call time. > > > > -- > 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: distinguish between Release and Debug at compile time
At 11:21 AM 8/21/2003, Eric Potter wrote: In the Setting Dialog on the Runtime Settings page, you can set environment variables. Is the a way to access these in your code? No, this is a runtime setting that only applies to the CodeWarrior debuggers for desktop and embedded UNIX systems where the OS supports some sort of getenv() call. It's a generic IDE feature, and doesn't apply to Palm OS. If you want to change behavior at runtime using an external setting, just make a utility app that sets a feature that your app tests at startup time. That way, you can control your main apps behavior without exposing that UI to users or needing a compile-time change. -- 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: distinguish between Release and Debug at compile time
At 08:44 AM 8/21/2003, Eric Potter wrote: Is there a way in code warrior to set an enviroment setting that can be controled independatntly of the Release/Debug setting? For example, can I define boolean vairable in the compiler that be accessed by the code? That way I can change what code gets compiled in without actually changing the code. This is what prefix files are for. They get included in every compile before the source text is written, and you can #define whatever you want. If you use a prefix file, you might want to make the first line #include whatever was the old prefix so you'll pull in the appropriate precompiled headers. To do what you want, you can use #ifdef with a defined symbol, or just say something like const bool myBooleanFlag = true; if you're building C++ code. -- 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: How to make a socket wait for a conection from a server
On Thu, 21 Aug 2003, Brad Figler wrote: > You listen if you are the server. You connect if you are the client. I > think that you want to connect to an FTP server to initiate connection. > Not wait for someone to connect to you. He's talking about the data connection, which the FTP server initiates back to the client to do a normal file transfer. The PORT message sent to the server lets it know what IP and port to connect to. Of course, if you're doing passive FTP, it works the other way around (client initiates all connections) with a different sequence of messages. -- --- Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/ Software Developer // Gamer // Webmaster // System Administrator Be nice to other people. They outnumber you 6 billion to one. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Strange problem with multi-section
Actually it is the output of obj-res. I only put section attribute at the function prototypes. Could you tell me how to figure out where is something like ".data+0x1998". I can't find it in the objdump output. Or I may use some options? Thanks, --- John Marshall <[EMAIL PROTECTED]> wrote: > On Wed, 20 Aug 2003 11:45:44 -0700 (PDT), Khaki > Wizard wrote: > > When I multi-sectioned my C++ program, g++ has > some warnings like: > > g2palm:.data+0x1998: warning: reloc relative to > > strange section 'SECT2' > > These are messages from build-prc, not > m68k-palmos-g++. > > Congratulations; this diagnostic is not easy to > produce. The most likely > way to get it is via putting a section attribute on > something that is not > code. (Because the name of the technique is > "multiple *code* sections", > it's not easy to imagine why anyone might do that > :-).) You probably also > have to initialise some other global variable to > point to that something. > > Where do your "SECT1" and "SECT2" section > annotations appear? Only on > functions, one hopes (and conceivably on constant > data, but here there > be dragons). > > You can track this down even more quickly by using > objdump or nm to find > out which of your global variables is at > .data+0x1998, and looking at its > initialiser. > > John > > -- > For information on using the Palm Developer Forums, > or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: distinguish between Release and Debug at compile time
In the Setting Dialog on the Runtime Settings page, you can set environment variables. Is the a way to access these in your code? On Wed, 20 Aug 2003 15:30:17 -0500, Eric Potter <[EMAIL PROTECTED]> wrote: > >Is the a way to tell wheter the build is a debug or a release build at >compile time? > >I have some code that I want to conditionally compile out for release >builds, but I need the code in there for debug builds. > >thanks > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: distinguish between Release and Debug at compile time
Bellow is a part of our prefix file. You can identify there both debug-dependent variable and a logical variable. Jan Slodicka #undef DEBUG #if __option(a6frames) #define DEBUG #endif #ifndef DEBUG #undef ErrFatalDisplayIf #define ErrFatalDisplayIf(condition, msg) #endif // Support for Sony HR and HR+ #define SONY_CLIE - Original Message - From: "Regis St-Gelais" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, August 21, 2003 6:00 PM Subject: Re: distinguish between Release and Debug at compile time > In that case just use a define: > > #define LOGGING > . > . > . > #ifdef LOGGING > .. > .. > #else > .. > .. > #endif > > you just have to comment out the define and recompile if you don't want the > logging stuff in you code > > -- > Regis St-Gelais, P. Eng. / ing. > Software Development / Développement informatique > Technical Support / Support technique > Laubrass inc. > www.laubrass.com > [EMAIL PROTECTED] > (remove / enlever 'NOSPAM') > -- > "Eric Potter" <[EMAIL PROTECTED]> a écrit dans le message de > news:[EMAIL PROTECTED] > > > > Thanks for the tip, but I need something independant of the target > > name. I am trying to toggle some logging functionality. I may want to > > have logging in a release build or leave it out. So the control is > > independant of release or debug. > > > > > > On Thu, 21 Aug 2003 09:54:02 -0400, "Regis St-Gelais" > > <[EMAIL PROTECTED]> wrote: > > > > > > > >you can use > > > > > >#if __ide_target("Name of your target") > > >. > > >#else > > >. > > >#endif > > > > > > > > >-- > > >Regis St-Gelais, P. Eng. / ing. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to make a socket wait for a conection from a server
You listen if you are the server. You connect if you are the client. I think that you want to connect to an FTP server to initiate connection. Not wait for someone to connect to you. Alexandre Barreto wrote: I'm making a ftp program i saw some exemples of netlib and everthing is going fine untill i got to the datasocket i need to make it listen...so the ftp server can conect on it. after a i send a PORT command but when i call NetLibSocketListen i get a -1 and errP says the erro is netErrParamErr can anyone help me on this? thnx here is the source NetSocketAddrINType A; Err errP; long timeout = SysTicksPerSecond()*25; char *novaopcao; char ip[16]; DataSock=NetLibSocketOpen(libRefnum,netSocketAddrINET, netSocketTypeStream,netSocketProtoIPTCP, timeout, &errP); if(DataSock < -1){ if(errP == netErrParamErr) WinDrawChars("Erro 2",6,5,135); if(errP == netErrNotOpen) WinDrawChars("Erro 3",6,5,135); if(errP == netErrNoMoreSockets) WinDrawChars("Erro 4",6,5,135); if(errP == netErrOutOfCmdBlocks) WinDrawChars("Erro 5",6,5,135); if(errP == netErrOutOfMemory) WinDrawChars("Erro 6",6,5,135); } if(NetLibSocketOptionSet (libRefnum,DataSock, netSocketOptLevelSocket, netSocketOptSockKeepAlive,novaopcao, sizeof(novaopcao),timeout, &errP)<-1){ WinDrawChars("Erro SetSocket",14,5,135); } A.family = netSocketAddrINET; A.port = NetHToNS(1024);//_pda_float_to_sdword(porta)); A.addr = NetLibAddrAToIN(libRefnum, "192.168.10.118"); //WinDrawChars(porta,sizeof(porta),5,140); if(NetLibSocketBind(libRefnum,DataSock,(NetSocketAddrType*)&A,sizeof(A),timeout,&errP)< 0){ //WinDrawChars("Erro SockBind",13,5,135); if(errP == netErrParamErr) WinDrawChars("SockBind - ParamErr",19,3,125); } errP = NULL; if(NetLibSocketListen (libRefnum,DataSock, 1,timeout, &errP)<0){ //WinDrawChars("Erro SockListen",15,5,135); if(errP == netErrParamErr) WinDrawChars("SockListen - ParamErr",21,3,125); } _ MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Could this code be causing heap memory loss?
Hi! I have an PalmOS C++ application with code like the following: //- void TPrinterUtil::ReadConfiguration() { TPrinterData& Data = * new TPrinterData(*dbName); // do something with Data delete &Data; } //- I know that these two lines seem somewhat strange, but the fact is, they compile and run and, apparently, do their work as they should. However, one of my coworkers pointed to me it was easier, and safer, to write that code like this: //- void TPrinterUtil::ReadConfiguration() { TPrinterData Data(*dbName); // do something with Data // Data need not be explicitly destroyed } //- At first, I didn't see what could be the difference, but he (my coworker) told me my original code might not be destroying the memory block pointed to by Data, but something else, like system memory or unallocated space. Obviously, that freaked me out completely. I need your opinion on this. Does this code do what my coworker says? If it does, I'm afraid I will need to rewrite most of the code in my application, and that scares me a lot! - Heriberto Delgado ([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: distinguish between Release and Debug at compile time
In that case just use a define: #define LOGGING . . . #ifdef LOGGING .. .. #else .. .. #endif you just have to comment out the define and recompile if you don't want the logging stuff in you code -- Regis St-Gelais, P. Eng. / ing. Software Development / Développement informatique Technical Support / Support technique Laubrass inc. www.laubrass.com [EMAIL PROTECTED] (remove / enlever 'NOSPAM') -- "Eric Potter" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > > Thanks for the tip, but I need something independant of the target > name. I am trying to toggle some logging functionality. I may want to > have logging in a release build or leave it out. So the control is > independant of release or debug. > > > On Thu, 21 Aug 2003 09:54:02 -0400, "Regis St-Gelais" > <[EMAIL PROTECTED]> wrote: > > > > >you can use > > > >#if __ide_target("Name of your target") > >. > >#else > >. > >#endif > > > > > >-- > >Regis St-Gelais, P. Eng. / ing. > >Software Development / Développement informatique > >Technical Support / Support technique > >Laubrass inc. > >www.laubrass.com > >[EMAIL PROTECTED] > >(remove / enlever 'NOSPAM') > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Extra ctlRepeatEvent from repeating buttons?
Has anyone else seen a repeating button give an extra ctlRepeatEvent when it's released? If I hold it button down, it works as it should, but I always get an extra event when I release it. This can be replicated with a quick tap on the button. All I'm really doing to handle those events is calling the function that handles the same thing in response to the hardware up/down buttons, and returning false to keep the repeating button working. This is basically what I've seen in the docs and all sample code so far, so I can't tell if there's anything I'm missing. I would use scroll bars, but this is a form with multiple "views" (done by hiding and showing different controls), and the scrollable fields are different sizes in each. I haven't yet been able to get hiding and showing of scroll bars working cleanly. Thanks in advance. -- --- Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/ Software Developer // Gamer // Webmaster // System Administrator If man did not exist, God's job would be easier. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
BmpCreateBitmapV3 and Compressed Bitmaps
I am converting version2 bitmaps to version3 bitmaps with BmpCreateBitmapV3 so that I can draw them with a density of kDensityDouble. This works OK for uncompressed bitmaps - for compressed bitmaps the resulting bitmap is distorted. The docs also states that BmpCreateBitmapV3 does not work with compressed bitmaps. So, how to do this for compressed bitmaps? ( The option of using uncompressed bitmaps is not possible.) Thanks, Jonatan -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: distinguish between Release and Debug at compile time
At 09:33 AM 8/21/2003 -0500, you wrote: Thanks for the tip, but I need something independant of the target name. I am trying to toggle some logging functionality. I may want to have logging in a release build or leave it out. So the control is independant of release or debug. Look at the CW documentation about prefix files. You can #define a value in the prefix file that allows your code to make compil time decisions. Bob -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
How to add new ISR in Interrupt table ?
Hey All, I just wanted to know if there is any way ( desirably within the premises of Palm API ) via which I could insert a new ISR in Interrupt Vector Table ? Thanks. -Viren = "There is nothing good or bad, There is nothing happy or sad, Only thinking makes it so!" - William Shakespeare __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: distinguish between Release and Debug at compile time
Thanks for the tip, but I need something independant of the target name. I am trying to toggle some logging functionality. I may want to have logging in a release build or leave it out. So the control is independant of release or debug. On Thu, 21 Aug 2003 09:54:02 -0400, "Regis St-Gelais" <[EMAIL PROTECTED]> wrote: > >you can use > >#if __ide_target("Name of your target") >. >#else >. >#endif > > >-- >Regis St-Gelais, P. Eng. / ing. >Software Development / Développement informatique >Technical Support / Support technique >Laubrass inc. >www.laubrass.com >[EMAIL PROTECTED] >(remove / enlever 'NOSPAM') -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Visor Deluxes... Lots of them
Jeff, >> Can you use another model too or just the Deluxe? > >Just the Deluxe. So your app requires no higher than OS 3.1 or something? Why is that? Use of the old signature capture sample code? Seems like a curious restriction. Doug -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: Visor Deluxes... Lots of them
> -Original Message- > From: Dave Lippincott > Sent: Thursday, August 21, 2003 6:12 AM > > You may already know this but Handspring is still selling > reconditioned units. You could buy them out of those too. > Can you use another model too or just the Deluxe? Just the Deluxe. Handspring's reconditioned units are apparently not available anymore, thereby thwarting Plan A. -Jeff -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Hard buttons and alert
Hi, How to disable hard buttons for the time when alerts are poped up? The buttons are reprogrammed in my application. However, as an alert resource gets called the hard buttons original assignments are restored for that time. The hard buttons interception implemented for an active form appears to be cancelled by any alert call. I would be happy just to disable the butons for an alert call time. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: distinguish between Release and Debug at compile time
you can use #if __ide_target("Name of your target") . #else . #endif -- Regis St-Gelais, P. Eng. / ing. Software Development / Développement informatique Technical Support / Support technique Laubrass inc. www.laubrass.com [EMAIL PROTECTED] (remove / enlever 'NOSPAM') -- "Eric Potter" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > > Is there a way in code warrior to set an enviroment setting that can > be controled independatntly of the Release/Debug setting? > > For example, can I define boolean vairable in the compiler that be > accessed by the code? That way I can change what code gets compiled in > without actually changing the code. > > > On Wed, 20 Aug 2003 16:11:41 -0500, Ben Combee > <[EMAIL PROTECTED]> wrote: > > > > >At 03:30 PM 8/20/2003, Eric Potter wrote: > >>Is the a way to tell wheter the build is a debug or a release build at > >>compile time? > >> > >>I have some code that I want to conditionally compile out for release > >>builds, but I need the code in there for debug builds. > > > >http://www.escribe.com/computing/pcpqa/m69565.html > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: distinguish between Release and Debug at compile time
Is there a way in code warrior to set an enviroment setting that can be controled independatntly of the Release/Debug setting? For example, can I define boolean vairable in the compiler that be accessed by the code? That way I can change what code gets compiled in without actually changing the code. On Wed, 20 Aug 2003 16:11:41 -0500, Ben Combee <[EMAIL PROTECTED]> wrote: > >At 03:30 PM 8/20/2003, Eric Potter wrote: >>Is the a way to tell wheter the build is a debug or a release build at >>compile time? >> >>I have some code that I want to conditionally compile out for release >>builds, but I need the code in there for debug builds. > >http://www.escribe.com/computing/pcpqa/m69565.html -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
programaticaly deactivate the beam receive
Hi all, I want to deactivate the beam receive. The irSuppressScanning constant allow to do that using ExgControl but it is not avaliable in OS 3. There is a beam receive setting in the OS preferences, is it possible to set it programaticaly? TIA -- Regis St-Gelais, P. Eng. / ing. Software Development / Développement informatique Technical Support / Support technique Laubrass inc. www.laubrass.com [EMAIL PROTECTED] (remove / enlever 'NOSPAM') -- -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Visor Deluxes... Lots of them
You may already know this but Handspring is still selling reconditioned units. You could buy them out of those too. Can you use another model too or just the Deluxe? - Original Message - From: "Jeff Ishaq" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, August 20, 2003 11:38 PM Subject: WTB: Visor Deluxes... Lots of them > A client is looking to buy 1000-1500 Visor Deluxe units. Handspring has > apparently sold their reserves, but I'm curious if anyone might know of > a surplus that is collecting dust somewhere. > > -Jeff > > > -- > 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/
sliders
Hello , I am using a slider in my control with value from 0 to 12 and a default of 3 . But I am not able to indicate to the user the current value of the thumb of the slider as the markings on the slider are not changing as per the size of the slider . Is there a way to change the default markings of the slider background so that I can show only 13 markings from 0 to 12 without changing the width of the slider ? The slider has to fit in the small size along with other controls . Please help . Thanks & regards , Dhanashri . _ Is India taking over the US? Find out here. http://server1.msn.co.in/features/nri03/index.asp Meet these new-age NRIs. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: memory leaks vs. unallocated chunks
>on a side note, when there are memory leaks, the >emulator alerts me and >tells me that details can be found in "the log >file." What log file? To begin with, the log file is in the same directory as your emulator.exe (usually). __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
How to make a socket wait for a conection from a server
I'm making a ftp program i saw some exemples of netlib and everthing is going fine untill i got to the datasocket i need to make it listen...so the ftp server can conect on it. after a i send a PORT command but when i call NetLibSocketListen i get a -1 and errP says the erro is netErrParamErr can anyone help me on this? thnx here is the source NetSocketAddrINType A; Err errP; long timeout = SysTicksPerSecond()*25; char *novaopcao; char ip[16]; DataSock=NetLibSocketOpen(libRefnum,netSocketAddrINET, netSocketTypeStream,netSocketProtoIPTCP, timeout, &errP); if(DataSock < -1){ if(errP == netErrParamErr) WinDrawChars("Erro 2",6,5,135); if(errP == netErrNotOpen) WinDrawChars("Erro 3",6,5,135); if(errP == netErrNoMoreSockets) WinDrawChars("Erro 4",6,5,135); if(errP == netErrOutOfCmdBlocks) WinDrawChars("Erro 5",6,5,135); if(errP == netErrOutOfMemory) WinDrawChars("Erro 6",6,5,135); } if(NetLibSocketOptionSet (libRefnum,DataSock, netSocketOptLevelSocket, netSocketOptSockKeepAlive,novaopcao, sizeof(novaopcao),timeout, &errP)<-1){ WinDrawChars("Erro SetSocket",14,5,135); } A.family = netSocketAddrINET; A.port = NetHToNS(1024);//_pda_float_to_sdword(porta)); A.addr = NetLibAddrAToIN(libRefnum, "192.168.10.118"); //WinDrawChars(porta,sizeof(porta),5,140); if(NetLibSocketBind(libRefnum,DataSock,(NetSocketAddrType*)&A,sizeof(A),timeout,&errP)< 0){ //WinDrawChars("Erro SockBind",13,5,135); if(errP == netErrParamErr) WinDrawChars("SockBind - ParamErr",19,3,125); } errP = NULL; if(NetLibSocketListen (libRefnum,DataSock, 1,timeout, &errP)<0){ //WinDrawChars("Erro SockListen",15,5,135); if(errP == netErrParamErr) WinDrawChars("SockListen - ParamErr",21,3,125); } _ MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
memory leaks vs. unallocated chunks
Hello, I am having a problem that I have spent days trying to figure out with no success. My program includes a form with two lists, the options list and the picked list. The options list is filled when the form loads and by selecting items from the options list and clicking a button, the user can fill their personal "picked list." There is something slightly wrong with my function for adding to the picked list however. If I use the function as is (shown below) I end up with a number of memory leaks equivalent to the number of list items added after the first item. (so I know that the leak is within the code in the outermost Else clause of AddPickedItem). I thought that the problem was that I was setting the list pointer equal to the pointer for a newly created string, but never dealloating the memory that was held by the previous version of the list. So I added a line (now commented) to free that memory. However, when I add that line, my function ClearPickedList no longer works upon closing the form. (It does however work when called at the beginning of FillList each time a new item is added to the picked list.) I can an unallocated chunk error. Any Ideas on this? My code is all below. on a side note, when there are memory leaks, the emulator alerts me and tells me that details can be found in "the log file." What log file? thank you! meg ***code* void AddPickedItem(char* itemToAdd) { ListType *lstP; UInt16 newSize; char* newStringP; char* oldP; char* oldP2; UInt16 addingSize; UInt16 oldSize; UInt16 i; UInt16 length; Boolean alreadyThere=false; //grab pointer to picked list lstP=(ListType *)GetObjectPtr(DetailHasslesPickedList); //if picked list is currently empty if (pickedListStringP.numItems==0) { pickedListStringP.stringListP=itemToAdd; }//if (pickedListStringP.numItems==0) //if picked list already has items else { //calculate new size of string list oldSize = MemPtrSize(pickedListStringP.stringListP); addingSize=StrLen(itemToAdd); newSize=oldSize+addingSize+1; //create new string newStringP=MemPtrNew(newSize); //store old newString pointer oldP=newStringP; //store old picked list pointer oldP2=pickedListStringP.stringListP; //cycle through old items for(i=0;ihttp://www.palmos.com/dev/support/forums/
about zire71 photo
I want to preview the photo on Zire71 when user select a photo.Please tell me how I do ? Thanks. http://www.msale.net/bbs a Chinese-language message board for developers,including palm,ppc,symbian,and etc. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Faking relational databases with PDBs
On Wed, 20 Aug 2003 08:43:42 -0700, "Jeff Ishaq" <[EMAIL PROTECTED]> wrote: >I am curious about your implementation. If a record in DB1 >refers to a record in DB2, what constitutes your primary key in this >relationship? In other words, if not the Unique ID, what do you store >as the 'index' of the referred-to record in DB1? Well... indeed there's a requirement that the records in DB2 have to be sorted by a unique key. That might not always be true, for instance, if you are storing patients sorted by their names, then you can't do a binary sort to find a patient (the name might not be unique, so you need something like a patient number, and you don't know what order they will be in). In that case the method I described wouldn't work. But suppose DB2 contains test results; each test result is assigned a date and a number in the day: the test records are sorted by date and day number. So database DB2 looks like: dateday number test data 01/01/2003 1 data 01/01/2003 2 data 02/01/2003 1 data 02/01/2003 2 data If you need to sort on another key, then in DB1 each record contains the sort key, date and day number. The date and day number allow you to call DmFindSortPosition and find your test result in DB2. In the case I first mentioned, where the binary search doesn't work, then I guess I would have to use your method; I'm a little bit worried about two things though: 1) performance on a big database :we routinely have databases with something like 1 records. When I have some time (which should be pretty soon, maybe in 2015) I'll try to benchmark that. 2) I don't trust that "unique" id ; there have been discussions in the past here and the conclusion seemed to be that it's unique most of the time, and that there's very little chance that it might be duplicated, the probability is low, blah blah blah, and that disturbs me because I am an obsessional paranoid who should seek professional help (but right now I'm busy writing software). I don't remember exactly, but the issue was not only wrapping but it had to do with seeds and synchronization and stuff like that. You can search for it on this forum though. Thus my feeling right now is that I would do everything I can to continue using the binary search method, even if it means reorganizing the data. For example, patients could be sorted not by name but by a patient number. There could be an index database on the side where the patients would be sorted by name. Then, the patient number would allow you to find the patient record by doing a binary search on the patient number. This would allow me to have other index databases to sort on other info. I might change my mind after benchmarking though What's that OS6 database stuff you keep mentioning? I read things on OS6 but saw nothing about that... Got a link? Olivier Lancelot -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
new/delete problem in PALM OS
Good Day, Just like to ask who has encountered this new/delete problem in PALM OS? i tried to implement one using the codewarrior.. with this given value : Char* y = "abc n.\n"; wherein i first allocate a storage e.g. Char* x = new Char[256]; int i = 0; then started storing characters e.g. x[i++] = y[i++]; during this storing characters i've encountered garbages also being stored then lastly i deallocated e.g. delete[] x; during deallocation also, it does not free the allocated memory wherein in fact this call is within a function call. Tanx, -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
How to get the default Icon database?
Hi all, Sorry my poor english. I know the "Icon Manager" can set the icon database(like DateBk5 icon database) as the default database, but I don't know how to get the default icon database, because all of icon database has the same type :'Rsrc', I tried to search some api functions to do it, but I can't found anything. Can anybody give me some ideas to implement get the default icon database? Thanks! Sean Yang Aug.21.2003 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/