Aaron -- first a technical comment ... your mail program
is misconfigured.  It specifies "Content-Type: TEXT/PLAIN; 
charset=X-UNKNOWN".   To Outlook users, the message ends
up looking like an attachment, which has to be saved
& opened separately.  (Normally I don't bother reading mail
sent like this, but I was interested in this subject <g>)


> -----Original Message-----
> From: Aaron Ardiri [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 14, 1999 12:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: VoidHand vs. Handle
> 
> 
> This message uses a character set that is not supported by 
> the Internet Service.  To view the original message content,  
> open the attached message. If the text doesn't display 
> correctly, save the attachment to disk, and then open it 
> using a viewer that can display the original character set. 
> 

(here's the actual text)
> Date: Thu, 14 Oct 1999 09:39:54 +0200
> From: Aaron Ardiri <[EMAIL PROTECTED]>
> Subject: Re: VoidHand vs. Handle
> To: [EMAIL PROTECTED]
> Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
> 
> > >What's the difference between VoidHand and Handle?
> >=20
> > At PalmSource next week I'll be able to give you a complete answer.
Righ=
> t
> > now there's not really a difference; they can be used interchangeably in
> > every situation that I can think of.
> 
>   a totally useless answer to many people - but here is an answer
>   that might help those people that dont have the time to attend
>   PalmSource 99

Not to get too much into the politics of it, but Aaron is
right.  To say on a support list "I'm not going to give you
an answer here, please hop on a plane to Santa Clara, CA to
find out" is a bit ... well, rude.

Perhaps what he meant to say was "there is no practical 
difference, but we'll be touching on this among other subjects
at PalmSource"  (even that doesn't sound completely ok, but
it's better than the "I'm not going to tell you" sound of the
original)

Sometimes it's not what you say, it's how you say it.  It
really did come across wrong, imo.


> 
>   within the "Common.h" header file you shall see this:
...
>   so in otherwords VoidHand is a (void **) and Handle is a (char **).

All well and good, Aaron ... but from the higher level,
a handle of any sort is something the programmer is not
supposed to make direct use of.  It is a "magic cookie" 
that has to be passed through an API (e.g. MemHandleLock) 
in order to get something usable.

Given that as the concept, there is no reason for -two-
different types of this sort of "magic cookie".  Even the
Palm folk don't really see them as different.  Take the 
example code in the docs for FldSetTextHandle:

        /* get the old text handle */
        oldTxtH = FldGetTextHandle(fldP);

        /* change the text and update the display */
        FldSetTextHandle(fldP, txtH);
        FldDrawField(fldP);

        /* free the old text handle */
        if (oldTxtH != NULL)
                MemHandleFree(oldTxtH);

The prototype for FldGetTextHandle has it returning
a "Handle" and the prototype for MemHandleFree has
it taking a "VoidHand" ... now we never see the 
declaration of "oldTxtH", but it can't be both!
If full type checking is enabled, you would have to 
cast in order to make this code work.

Since you never are supposed to dereference the
handle (or even know that it -can- be dereferenced
-- it's supposed to be an opaque object accessed only
through the APIs) the existance of two different handle 
types is both confusing and annoying.  Confusing in that
it implies that there -is- some sort of difference, and 
annoying in so far as we have to do all that extra typing 
for all those unnecessary casts.

-Please- clean this up in the next SDK?


-- 
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi./sec ... not just a good idea, it's the LAW!

Reply via email to