RE: Hey, IR comm gurus... help!

2002-05-16 Thread Schettino, John
Yes, you need to give time to the system for irda comms to work reliably. You can code up a nested event loop - something like: IrDiscoverReq(..); Word timeout = TimGetTicks()+SysTicksPerSecond(); // one second timeout for (;;) { EvtGetEvent(&event, SysTicksPerSecond()); // In your irda callbac

RE: How do I setup man on Cygwin?

2002-05-09 Thread Schettino, John
man where subject is the name of the man page. You use man man to get more info on man > -Original Message- > From: Brian Ku [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 09, 2002 12:24 PM > To: Palm Developer Forum > Subject: How do I setup man on Cygwin? > > > There are lots of

RE: Add new event --- how to catch this ?

2002-05-06 Thread Schettino, John
Try adding a call to EvtWakeup(); After you add the event. You should get a nilEvent, then your event. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 1:54 AM To: Palm Developer Forum Subject: Add new event --- how to catch this ? hi al

RE: Debugging multi-segment applications (veering OT)

2002-05-01 Thread Schettino, John
Man - 52 hits on google searching for "Xerox your lunch and file it under" - seems its a quote from Zippy the pinhead. Must be a modern art kinda thing. Zowie. -Original Message- From: Joe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 2:55 PM To: Palm Developer Forum Subject: R

RE: record size and writing to database

2002-04-24 Thread Schettino, John
I believe #pragma packed forces packed structs. Otherwise there is no requirement in c/c++ for a stuct to be packed in the smallest number of bytes. -Original Message- From: Brian Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 1:30 PM To: Palm Developer Forum Subjec

RE: Urgent - Category problem

2002-04-10 Thread Schettino, John
Try this: attr &= ~dmRecAttrCategoryMask; attr |= cat; -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

RE: Implementing a Link list

2002-04-01 Thread Schettino, John
To expand struct myrec { char name[10]; struct myrec *next; }; struct myrec *head=0; void insertFront(char * newNodeName) { struct myrec * newRec = MemPtrNew(sizeof(struct myrec)); newRec->next = head; StrCopy(newRec->name, newNodeName); // note need error checking S

RE: Difference between packed and unpacked databases.

2002-03-18 Thread Schettino, John
[What Danny Said ;)] "packed" vs unpacked means (to me anyway) unpacked: struct{ UInt16 id char field1[MAXLEN1] char field2[MAXLEN2] }test This struct can be read/written directly to db records, but wastes (quite a bit of) storage memory. It is a little faster for read/write/search

RE: searching database record using date

2002-03-13 Thread Schettino, John
I think what he was going for was MemMove(): MemMove((VoidPtr) searchRec, (VoidPtr) &searchDate, sizeof(DateTimeType)); Something like that I suppose -Original Message- From: Matt Hebley [mailto:[EMAIL PROTECTED]] At 08:49 AM 13/3/2002 -0800, you wrote: > How can I search a database

RE: Generic Data Structures

2002-03-11 Thread Schettino, John
You could store the record as XML, then you could have records with different attributes as desired. If XML is too much overhead, then just store them as packed strings with a one byte attribute at the head of each string and #define the attribute/byte values Something like this: record 1 : "\1v

RE: FindStrInStr function

2002-03-08 Thread Schettino, John
You're looking for the StrStr() fn: 672 Palm OS SDK Reference StrStr Purpose Look for a substring within a string. Prototype CharPtr StrStr (CharPtr str, CharPtr token) Parameters str String to search. token String to search for. Result Returns a pointer to the first occurrence of token in str or

RE: How integer set to field

2002-03-08 Thread Schettino, John
The field object displays strings, so something like this works: int i = 5; // i is your integer char * intBuf = MemPtrNew(10); // upto 99 StrPrintF(intBuf, "%d", i); FldInsert(blah...); // insert the string into your field using whatever MemPtrFree(intBuf); -Original Message---

RE: what is the correct generic term for a PalmOS device?

2002-02-21 Thread Schettino, John
I believe that when we were writing PalmOS Programming for Dummies Palm said "PalmOS device". It sure wasn't "palm" or "pilot" :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 5:17 PM To: Palm Developer Forum Subject: what is the

RE: lists and runtime lists

2002-02-20 Thread Schettino, John
Something like this: // assuming RecordPointer has a null terminated string, itemList[index] = (char *) MemPtrNew(MemPtrSize(RecordPointer)); MemMove(itemList[index], RecordPointer, MemPtrSize(RecordPointer)); // if its not null terminated then you need to allocate one greater and add

RE: My own table troubles

2002-02-15 Thread Schettino, John
Alan, can you post or email me the example code? The pilrc file and the bit that is dealting with the table will do. It should really not be this hard :0 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 6:07 PM To: Palm Developer For

RE: My own table troubles

2002-02-14 Thread Schettino, John
Is the table visible and enabled (USABLE in rcp-ese)? Can you see it? Is the form actually drawn? > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 2002 3:15 PM > To: Palm Developer Forum > Subject: RE: My own table troubles > > >

RE: Pose and netlib

2002-02-14 Thread Schettino, John
Only if the PC pose is running on was behind the corporate firewall, and the site was outside. Running POSE inside a sockscap32 session works (I think... its been a while) > > Has anyone go the error Connection timed out when trying to test an > aplication on pose that uses to tcp/ip of the host

RE: My own table troubles

2002-02-14 Thread Schettino, John
Because you haven't added any rows yet? - John Schettino > I am having my own troubles with tables. When I call > TblGetNumberOfRows(), it always returns 0. Any ideas why? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/sup

RE: After 16 successful connections, calling NetLibSocketOpen ret urns netErrTooManyTCPConnections (0x124F). What is going wrong?

2002-02-08 Thread Schettino, John
Couple Ideas for ya: 1) 3 second delay --- use SysTaskDelay so the OS can do some work - that will probably do it. 2) other though if #1 doesn't do it, you have your linger (remain open) set for 3 seconds, and you sleep for 3 seconds. Things are not that exact, so I'd linger less or sleep more (

RE: CW8 & Table Draw C++ class Callback functions

2002-02-07 Thread Schettino, John
You could make them static methods of a class. That's not exactly a global fn & should work. - John > -Original Message- > Are there any new tricks in CW8 which allow table draw > callback functions to > be referenced from a class function instead of globally defining the > functions? -

RE: Answer found, somewhat: RE: Puzzling Palm Infrared

2002-01-23 Thread Schettino, John
There is a fairly complete irobex implementation for Palm (written by me, includes get and put support) as part of the HP cooltown open source. You can find it here : http://devnet.hp.com/cvsweb.php/Esquirt/PalmOS/?cvsroot=coolbase Note the Lib/Src/obex.c/h files for the implementation Enjoy ;)

RE: Custom events: possible PalmOS 3.5 bug?

2002-01-07 Thread Schettino, John
Probably a byte vs. word issue somewhere... datum is a UInt16, but if internally somewhere its turned into a UInt8 it would get transmogrified into something that looks like a menuCmdBarOpenEvent. Try using dataum values 255 or less. You can always use dataum[0] and datum [1] if you need lots of

RE: My program is blowing up if I set the alarm

2001-09-21 Thread Schettino, John
Sure. My guess is your pilotmain (which gets called with the alarm fired launch code) doesn't do the right thing when it gets it. You did read the docs on how to do alarms, right? - John -Original Message- From: Johnathan Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001

RE: web browser for Palm

2001-09-20 Thread Schettino, John
You could read the docs supplied with the package -- on the developers page http://www.eudora.com/developers/ ;) There you will find: http://a1392.g.akamaitech.net/7/1392/939/0001/www.eudora.com/download/eudora /eis/2.0/devspec/EIS20DevSpec.pdf which gets you to a section showing (with code)

RE: web browser for Palm

2001-09-20 Thread Schettino, John
EudoraWeb works well and is freeware http://www.eudora.com/internetsuite/ You can launch it with a URL. - John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/

RE: web browser for Palm

2001-09-20 Thread Schettino, John
EudoraWeb works well and is freeware http://www.eudora.com/internetsuite/ You can launch it with a URL. - John > -Original Message- > From: Rahul Thatte [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 20, 2001 7:59 AM > To: Palm Developer Forum > Subject: web browser for Palm >

RE: Serial Ir on PalmOS >= 3.3

2001-09-14 Thread Schettino, John
I've implemented Ultra-IR as part of the HP open-source coolbase release. It's using the old serial manager, but sends/receives without problem using raw serial as you are attempting here. It frames data as ultra packets (limit of about 380 bytes of data per packet) with error checking per packet

HP 'Coolbase' open source release...

2001-07-23 Thread Schettino, John
It looks like the offical release of the HP Coolbase software has happened... http://www.cooltown.com/dev/reference/coolbase/ The PalmOS stuff is at http://www.cooltown.com/dev/reference/coolbase/ds-esquirt.asp (In the right-hand panel under "for Palm" you'll see all the documentation) And t

RE: EvtWaitForever - Generating an Event

2001-07-20 Thread Schettino, John
nt: Friday, July 20, 2001 10:29 AM To: Palm Developer Forum Subject: Re: EvtWaitForever - Generating an Event "Schettino, John" <[EMAIL PROTECTED]> wrote: > Note... this source (including interesting Irda transfers, a full Obex/irda > implementation for GET and PUT, Ultra-

RE: EvtWaitForever - Generating an Event

2001-07-19 Thread Schettino, John
37 PM To: Palm Developer Forum Subject: Re: EvtWaitForever - Generating an Event OOhhh..YES! Worked like a charm! So, do you not have to initialize ESquirtKeyChr and eSquirtSirReady to any particular value? Thanks a lot for you help!! Jim Schettino, John <[EMAIL PROTECTED]> wrote

RE: EvtWaitForever - Generating an Event

2001-07-19 Thread Schettino, John
: EvtWaitForever - Generating an Event "Schettino, John" <[EMAIL PROTECTED]> wrote in message news:57197@palm-dev-forum... > > This is what I use in my wakeup handler, it works for me: > > (posted feb 21 2001 found on www.escribe.com search for "wakeup") > > http:/

RE: EvtWaitForever - Generating an Event

2001-07-19 Thread Schettino, John
This is what I use in my wakeup handler, it works for me: (posted feb 21 2001 found on www.escribe.com search for "wakeup") http://www.escribe.com/computing/pcpqa/m35383.html > -Original Message- > From: Jim Garozzo [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 19, 2001 9:27 AM > T

RE: jabber (was Turn palm off code!)

2001-07-18 Thread Schettino, John
Thanks -Original Message- From: Ralf Meyer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 12:46 PM To: Palm Developer Forum Subject: jabber (was Turn palm off code!) "Schettino, John" <[EMAIL PROTECTED]> wrote: [boring part snipped] > Anyone

RE: Turn palm off code!

2001-07-18 Thread Schettino, John
Maybe it's just summer... but for fun and at the risk of getting my membership revoked, I give you the... Top 10 ways to tell when a group has nothing better to do: #10 RTFM #9 Flamefests over RTFM #8 What does "RTFM" mean? #7 - #2 See #8-10 And the number one way to tell is: Flamefest over

RE: Active Push Of Information to Palm PDA Wirelessly-Possible?

2001-06-05 Thread Schettino, John
Push implies a connected state, or the ability to receive async notification. You could do that way back when with a Marco (NewtonOS/Ardis? network) but man was it slow! Today, you can do Push with the Kyocera smartphone (remember the pdqPhone? This is the non-prototype version) by sending it an

RE: Help w/ writing MemoPad record

2001-04-12 Thread Schettino, John
riginal Message- From: Schettino, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:21 AM To: Palm Developer Forum Subject: RE: Help w/ writing MemoPad record Thanks for this reminder David... I was making a Memo record "by hand" and had forgotten this. - John --

RE: Launching Palm Mail application directly to Outbox

2001-04-12 Thread Schettino, John
Can you not send a "Goto" launch code? Seems like Mail has support for it in its "PilotMain()" function. You'd just need to set up a GoToParams struct the right way and pass it into the UIAppSwitch call. Assuming you know the record number of the new mail message it should work. Take a look at GoT

RE: Help w/ writing MemoPad record

2001-04-12 Thread Schettino, John
Thanks for this reminder David... I was making a Memo record "by hand" and had forgotten this. - John -Original Message- From: David Fedor [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 10:44 AM To: Palm Developer Forum Subject: Re: Help w/ writing MemoPad record >Just wante

RE: What's with this IrAdvanceCredit thing ?

2001-04-12 Thread Schettino, John
I've only had limited success with advance credit. What I've seen is this: when you accept a connection, you pass an initial amount of credit. IrConnectRsp(ir_ref, currentCon, &packet, 127); // accept w/ 127 credits Now, as far as I can tell, you will never need to advance any more credit, regar

RE: Beam Receive PrefGetPreference bug

2001-04-03 Thread Schettino, John
It's controlled via the exchange manager: // Beam control flag static Boolean beamPref=0; // // Disable Beam Receive if Enabled // void DisablePalmBeam() { IrStatus error; Word beam_ir_ref; Word beamLen = sizeof(beamPref); error = SysLibFind(irLibName, &beam_ir_r

RE: Display of Returns in Text

2001-02-28 Thread Schettino, John
Steve... you're on a Mac, right? Using the Simulator maybe? MacOS uses CR (0d) for line endings. Palm and everyone else uses LF (0a)... except for DOS, where they use both ;) - John Schettino -Original Message- From: Steve Mann [mailto:[EMAIL PROTECTED]] I still find it strange that Con

RE: Phantom "Click" sound being played... by the system?

2001-02-23 Thread Schettino, John
ookKeyMask or PalmOS generates a // 'click' sound (ie, a keyclick) -- very annoying! #define ESquirtModifier (0x0008 | appEvtHookKeyMask) static void SIRWake (DWord) { EvtEnqueueKey (ESquirtKeyChr, eSquirtSirReady, ESquirtModifier); } -Original Message----- From: Schettino,

Phantom "Click" sound being played... by the system?

2001-02-22 Thread Schettino, John
Here is an odd behavior I cannot seem to track down... I have a app that uses the old serial manager code, "back door" methods to do event-based reads of the serial port: if (sirRefNum == sysInvalidRefNum) { err = SysLibFind ("Serial Library", &sirRefNum);

RE: strange fatal exception

2000-12-21 Thread Schettino, John
Shot in the dark... could it be an alignment issue? Try this struct instead: typedef struct _DrawLibType { RectangleType rect; Char textBuffer[MAX_BUFFER_LINES][MAX_LINE_WIDTH]; } DrawLibType; - John Schettino -Original Message- From: Simon Drabble [mailto:[EMAIL PROTECTED]]

RE: IrDA

2000-11-02 Thread Schettino, John
see www.irda.org - John -Original Message- From: Ralph Krausse [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 02, 2000 2:02 PM To: Palm Developer Forum Subject: IrDA I take it that there is some sort of standard for all IrDA devices? Is there a web site for this? Thanks Ralph Kra

RE: Stack Size

2000-11-02 Thread Schettino, John
See http://oasis.palm.com/dev/kb/article.cfm?id=1214 - John Schettino -Original Message- From: Ralph Krausse [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 02, 2000 8:13 AM To: Palm Developer Forum Subject: Stack Size How does one increase the stack size of a plam app with CodeWa

RE: Serial Communication via IR

2000-10-19 Thread Schettino, John
When you open the serial port in IR mode, you get a raw IR connection with no error checking. If you're an old guy like me, it's like using a 300pbs acoustic couple modem -- you get garbage characters from time to time due to noise. For old modems, noise was the various clicks MaBell tossed into t

RE: Serial Communication via IR

2000-10-19 Thread Schettino, John
When you open the serial port in IR mode, you get a raw IR connection with no error checking. If you're an old guy like me, it's like using a 300pbs acoustic couple modem -- you get garbage characters from time to time due to noise. For old modems, noise was the various clicks MaBell tossed into t

RE: Serial Communication via IR

2000-10-19 Thread Schettino, John
When you open the serial port in IR mode, you get a raw IR connection with no error checking. If you're an old guy like me, it's like using a 300pbs acoustic couple modem -- you get garbage characters from time to time due to noise. For old modems, noise was the various clicks MaBell tossed into t

RE: Serial Communication via IR

2000-10-19 Thread Schettino, John
When you open the serial port in IR mode, you get a raw IR connection with no error checking. If you're an old guy like me, it's like using a 300pbs acoustic couple modem -- you get garbage characters from time to time due to noise. For old modems, noise was the various clicks MaBell tossed into t

RE: Serial Communication via IR

2000-10-19 Thread Schettino, John
When you open the serial port in IR mode, you get a raw IR connection with no error checking. If you're an old guy like me, it's like using a 300pbs acoustic couple modem -- you get garbage characters from time to time due to noise. For old modems, noise was the various clicks MaBell tossed into t

RE: Serial Communication via IR

2000-10-19 Thread Schettino, John
When you open the serial port in IR mode, you get a raw IR connection with no error checking. If you're an old guy like me, it's like using a 300pbs acoustic couple modem -- you get garbage characters from time to time due to noise. For old modems, noise was the various clicks MaBell tossed into t

RE: Sending IrDA frame without all the mess

2000-08-21 Thread Schettino, John
You need to write to the IR port directly -- what you're describing is actually in the Irda spec (under Ultra) but isn't often implemented. We use this in the HP Cooltown environment, and it works. Receiving a frame is a bit more work, let me know if you need to do it. This is some code that work

RE: Error in code?

2000-08-15 Thread Schettino, John
size = sizeof(vstrXML); is wrong. Sizeof(char *) is 4, which is how many bytes are sent You want size = StrLen(vstrXML) John Schettino Palm OS Programming for Dummies: http://schettino.tripod.com -Original Message- From: Tim Heuer [mailto:[EMAIL PROTECTED]] Sent: Monday, August 1

RE: how to free strings and stack overflow

2000-08-15 Thread Schettino, John
This means you want to do the cleanup in the frmCloseEvent event handler: case frmCloseEvent: { char * theLabelString = CtlGetLabel (ControlP); // where ControlP points to the label MemPtrFree(theLabelString); } // other stuff as usual handled = true

RE: how to free strings and stack overflow

2000-08-14 Thread Schettino, John
This means you want to do the cleanup in the frmCloseEvent event handler: case frmCloseEvent: { char * theLabelString = CtlGetLabel (ControlP); // where ControlP points to the label MemPtrFree(theLabelString); } // other stuff as usual handled = true

RE: how to free strings and stack overflow

2000-08-14 Thread Schettino, John
For approach #2, see the Knowledge Base: http://oasis.palm.com/dev/kb/faq/1214.cfm - John Schettino Palm OS Programming for Dummies: http://schettino.tripod.com -Original Message- From: Rob Mermans [mailto:[EMAIL PROTECTED]] Sent: Monday, August 14, 2000 12:33 AM To: Palm Developer Forum

RE: Freeing memory after dynamically creating form objects

2000-08-04 Thread Schettino, John
Looking at the PalmOS source code, it does free "dynamic" UI elements. Other than field memory, all memory in a form exists within one allocated handle. When you add elements, that handle is resized. When you delete the form, the single handle is freed (after any field memory is freed.) OS Source

RE: Field.c line 132

2000-08-04 Thread Schettino, John
If you're changing the memory associated with a field (via FldFreeMemory()) it does not update the selection. Just set the selection to none via: FldSetSelection (fldP, 0, 0); // select none before you free or change the field's associated memory. - John Schettino Palm OS Programming for

RE: Someone please help me

2000-08-02 Thread Schettino, John
A simpler suggestion... get NS Basic/Palm from www.nsbasic.com -- you'll feel right at home. - John Schettino Palm OS Programming For Dummies: http://schettino.tripod.com -Original Message- From: Richard Hartman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 02, 2000 3:59 PM To: Palm

RE: Reading record bodies from a java conduit...

2000-08-01 Thread Schettino, John
You extend the Abstract record class, and then provide readData() and writeData() methods: public class yourRecord extends AbstractRecord { String data; // lots of other methods... // conduit i/o -- called by the frameword as needed public void readData(DataInputStream in) throws IO

RE: global variables?

2000-07-09 Thread Schettino, John
I don't believe you free the cmdPBP block... that's done by the OS (since the system owns the memory...) - John Schettino Palm OS Programming for Dummies: http://schettino.tripod.com -Original Message- From: Bulent Gecer To: Palm Developer Forum Sent: 7/8/00 4:52 AM Subject: SV: global

RE: strange list scroll bug

2000-06-22 Thread Schettino, John
rsday, June 22, 2000 1:27 PM To: Palm Developer Forum Subject: Re: strange list scroll bug LstSetSelection()? I use LstScrollList() ... -- -Richard M. Hartman [EMAIL PROTECTED] 186,000 mi/sec: not just a good idea, it's the LAW! Schettino, John wrote in message <15097@palm-dev-forum>

RE: strange list scroll bug

2000-06-22 Thread Schettino, John
In other words, in your form with the list's event handler: case keyDownEvent: switch (eventP->data.keyDown.chr) { // pageup hardware key case pageUpChr: { Word selection; handled = true;

RE: pdQ woes

2000-05-16 Thread Schettino, John
The pdQ has a smaller default stack free, and a slightly smaller heap free. I'd check the KB on how to add a stack resource for your app -- when I added a 6kb stack to the HP Cooltown eSquirt application all my weird problems went away. - John Schettino -Original Message- From: Adam Woz

RE: Keeping track of records

2000-05-02 Thread Schettino, John
This is a fairly standard approach. Say your database records are stored in a struct: typedef struct { char name[10]; char address[20]; // etc } dbrec; Now to find an entry in the db, assuming its sorted by name, you would do something like this: dbrec * searchrec = MemPtrNew(sizeof(dbrec)); S

RE: MetroWerk's Constructor

2000-04-17 Thread Schettino, John
The projects on the CD-ROM are built for CW Release 5. You'll want to open the entire project file (xxx.mcp) and allow CodeWarrior to convert the project to release 6 format. Once it's done, save the project and exit. Now you should be able to double-click a .rscs file and have it launch Construct

RE: Weird.....

2000-04-17 Thread Schettino, John
This is what I use (which works for me) Use MemMove() when copying out of the packed buffer, to avoid memory alignment issues: instead of unpackedStruct->aBool = (Boolean *)(*c); use MemMove(&unpackedStruct->aBool, c, sizeof(unpackedStruct->aBool); where unpackedStruct is a pointer to

RE: Bewildered...

2000-04-13 Thread Schettino, John
You've got a bug there, and the compiler warned you ;) CharPtr c points to *nothing* (or worse, a random address) You need to allocate some memory for c to point to! Something like this: UnpackTrip(&theTrip, p); // ALLOCATE SOME SPACE c = MemPtrNew(StrLen(theTrip.TripNumber

RE: Ability to access old posts??

2000-04-13 Thread Schettino, John
Try http://www.egroups.com/group/palm-dev-forum - John Schettino Palm OS Programming For Dummies: http://schettino.tripod.com -Original Message- From: Heather Gazdik [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 13, 2000 8:58 AM To: Palm Developer Forum Subject: Ability to access old

RE: Can anybody spot the problem ?

2000-04-12 Thread Schettino, John
You can't initialize a textTableItem with a char *, you need a Handle instead. What you have would work if you had used labelTableItem. -- John Schettino, author of that other Palm programming book http://schettino.tripod.com -Original Message- From: Nicholas Breau [mailto:[EMAIL PROTECT

RE: How To Create a Category in ToDoDB

2000-04-12 Thread Schettino, John
This is what I use: // pass in a category name // get back a category index // finds existing category, or adds new category if there is room, or returns // unfiled if no more room Word AutoCat(CharPtr catName, DmOpenRef theDB) { VoidHand h = NULL; Word foundCat; Char se

RE: Palm Beaming to non-palm (windows) IrObex stacks... interoper ability issue

2000-04-11 Thread Schettino, John
--- Gavin At 7:00 AM +0000 4/11/00, Palm Developer Forum digest wrote: >"Schettino, John" <[EMAIL PROTECTED]> on 04/08/2000 12:07:59 AM > >As part of HP's CoolTown project (http://cooltown.hp.com) we want to >support >using VCards and IrObex to support legacy d

RE: Palm Beaming to non-palm (windows) IrObex stacks... interope rability issue

2000-04-10 Thread Schettino, John
owing the rules even being a member of Infrared Data association. Moreover why should Palm people deviate from the laid down specifications if Microsoft fails to do so. Cheers Khurram "Schettino, John" <[EMAIL PROTECTED]> on 04/08/2000 12:07:59 AM Please respond to "Pal

Palm Beaming to non-palm (windows) IrObex stacks... interoperabil ity issue

2000-04-07 Thread Schettino, John
As part of HP's CoolTown project (http://cooltown.hp.com) we want to support using VCards and IrObex to support legacy devices. In other words, someone with any kind of device (Palm, CE, Psion, Cell phone, whatever) that supports IrObex and can beam/receive a VCard can interoperate with CoolTown e

RE: FrmDispatchEvent crashes - only on the emulator

2000-04-07 Thread Schettino, John
It seems as though you don't want to dispatch the event right away, but rather you just want to put the event in the event queue. Maybe just switching the FrmDispatchEvent() call to an EvtAddEventToQueue() call will clear things up? - John Schettino Palm OS Programming for Dummies: http://schetti

RE: Getting started

2000-04-07 Thread Schettino, John
My book, Palm OS Programming For Dummies (http://schettino.tripod.com) covers conduit development in Java, as well as all the basics for getting started with Palm OS development. - John Schettino -Original Message- From: sreedhar chakka [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 06

RE: StrPrintF

2000-04-05 Thread Schettino, John
You need to provide a real chunk of memory big enough to hold the formatted result in strP, *not* a null ptr. So strP = MemPtrNew(3); // or char[3] str, and then use &str in the call below StrPrintF(strP, "%02x", hexval); john Schettino Palm OS Programming for Dummies, http://schettino.tri

RE: Intercepting Form Buttons From within an EventHandler

2000-04-05 Thread Schettino, John
The answer is, there are two ways. 1) code your long-running process as a function that performs one step per call, and then returns. Recode your main event loop such that it returns nillEvents when there are no events (i.e., pass a timeout value other than forever in the GetNextEvent() call) and

RE: Sending Serial Char Including some source code

2000-04-05 Thread Schettino, John
Let's look at the code, since it determines all ;) loop Get an event without waiting Let the app handle the event Compute how long its been since the last event Attempt to receive data via the serial port If it's been at least 1 second since the last event (Note 0 -- we need

RE: MemHandleNew() vs. MemPtrNew()

2000-04-03 Thread Schettino, John
My $0.02 I use MemPtrNew() when I'm allocating something with a short lifespan, and MemHandleNew() for longer-lived allocations. The whole idea (as far as I can tell) with handle based allocation is that the OS can move memory around to free up memory if it becomes fragmented. Since your app does

RE: HELP! "Web Clipping" 3.2 error in emulator

2000-04-03 Thread Schettino, John
Sounds like you're forgetting to set the owner of the URL memory block passed into clipper to system: Something like this works: //assume URLPtr is a char * to the URL to get via clipper url = MemPtrNew(StrLen(URLPtr)+1); if (!url) return true; StrCopy(url, URLPtr); MemPtrSetOwner(url, 0); /

RE: Table question

2000-04-03 Thread Schettino, John
And the author chimes in ;) Tables are tricky, even when you're basing your work off a working example. It seems you are trying to build a table with 5 rows and three columns [checkbox] [text] [text] You set the middle column to use the PatientBlock() fn to load the static text in the patnames[

RE: Number of Categories in a database

2000-03-23 Thread Schettino, John
Here's one way: Word foundCat; Word numCats = 0; Char seekCat[dmCategoryLength]; for (foundCat = 0; foundCat < dmRecNumCategories; foundCat++) { CategoryGetName (theDB, foundCat, seekCat); if (seekCat[0] != '\0') numCats++; } It just gets the category name of eac

RE: Wierd Control Transfers

2000-03-17 Thread Schettino, John
Nothing specific to suggest, except to turn off (or turn way down) the optimization setting & rebuild. At the higher settings the debugger sometimes has a hard time figuring out what source code it's executing. - John Schettino -Original Message- From: Steve Mann [mailto:[EMAIL PROTECTED

RE: 1740 wireless

2000-03-17 Thread Schettino, John
ta Systems, Inc. -- >Subject: Symbol 1740 wireless interoperability >From: "Schettino, John" <[EMAIL PROTECTED]> >Date: Thu, 16 Mar 2000 08:56:37 -0800 >I've got one of these beasties, and I'm trying to get it to play with some >(an

RE: Dynamic Button Creation Crazyness...

2000-03-17 Thread Schettino, John
AM To: Palm Developer Forum Subject: RE: Dynamic Button Creation Crazyness... On Thu, 16 Mar 2000, Schettino, John wrote: > Snippit from Palm OS Programming for Dummies example: > > newForm = FrmNewForm(Main_Form, "Tester", 0, 0, 160, 160, false, >

RE: Dynamic Button Creation Crazyness...

2000-03-16 Thread Schettino, John
Snippit from Palm OS Programming for Dummies example: #define Main_Form 1000// Identifier for dynamic Form and Form elements // // Create the main form dynamically // static void MakeMainForm(void) { FormPtr newForm; EventType openEvent; newForm = FrmN

Symbol 1740 wireless interoperability

2000-03-16 Thread Schettino, John
I've got one of these beasties, and I'm trying to get it to play with some (any) 802.11 wireless network. The 1740 uses the Spectrum24 wireless network, which is a frequency hopping version. Does anyone have any experience with this device and any non-"Spectrum24" access points? Or should I just

RE: AppInfo question

2000-03-16 Thread Schettino, John
Appinfo is supposed to be extendable. You just need to have the first member of the appinfo be an AppInfoType. The category functions will just operate off the front of your extended appinfo block. You'd do this: typedef struct { AppInfoType PalmAppInfo; // this is Palm's std stuff for categor

RE: Better way to store structure

2000-03-13 Thread Schettino, John
Packing & unpacking are the only way to do this. Usually, you write a pair of functions, pack & unpack, that deal with the details. Pack would be something like this (without error checking): // pass in a pointer to a serverData and a pointer to a UInt, returns packed record and sets UInt to size

RE: Spawn

2000-03-09 Thread Schettino, John
Not really... you've got two choices -- you can switch to another app (SysUIAppSwitch), essentially exiting your app, or you can sublaunch another app (SysAppLaunch) and pass it a specific launch code. In the latter case the app you sublaunch must be coded such that it handles the launch code in i

RE: Compressed data from INet socket

2000-03-09 Thread Schettino, John
You can request that the data be sent uncompressed. Do this before you issue the request: DWord conv = ctpConvNone; // turn off compression INetLibSettingSet (ilibRefNum, inetH, inetSettingConvAlgorithm, &conv, sizeof(conv)); John Schettino Palm OS Programming For Dummies: http://schettino.tripo

RE: Variable Initialization madness

2000-03-08 Thread Schettino, John
Exactly. The CALLBACK_PROLOGUE macro inserts some assembly code into your file. It *must* be the first statement in the function. When you use locals that are initialized in the declaration section, its as if you did this: ***You Say: static void TableCustomDraw (VoidPtr table, Word row, Word co

RE: Menus on the fly

2000-03-03 Thread Schettino, John
What the author (that's me) meant to say is "there is no documented API that supports adding or removing menus, menu items" You might be able to hack the resources yourself, but that's not exactly coding for compatibility. What you can do quite legally is create multiple menu bar resources