At 9:35 PM +0100 2001/07/14, Igor Mozolevsky wrote:
>No, actually, my misconception is based on the fact that in every single english
>dictionary, that I managed to look at, verb 'move' meant take from one place to
>another. For all I knew, it could deallocate the source memory, just what 'move'
>means... This is just one of the 'inventions' of the SDK...
Well, a little common sense on your part should have caused you to ask yourself how an
API which takes a pointer into random memory could possibly deallocate that memory.
You should have then concluded that perhaps the name of the routine is not completely
descriptive of its operation and side effects -- much like "yield" implies "slow"
and/or "stop" depending on your point of view and personal experience, even though
neither word is a part of its English definition. So as I said previously, and as
you've indicated by referencing an English dictionary, your concept of 'move' is based
on physical space and personal experience, not algorithm. Yes, of course, this is an
invention of the SDK.
Whew! I'd say this horse is sufficiently buried now. We're picking nits. ;o)
>The second, a more significant one, is the mismatch of two interdependent functions,
>FldGetScrollValues and SclSetScrollBar... The former one takes a pointer to an
>_unsigned_ 16 bit integer, and the latter one takes _*signed*_ 16 bit integer
>values... Is there a _good_ reason for that or is the reason:- 'why not?'?..
Based on your reaction to your misconception of MemMove's behavior, I'm not entirely
convinced you'll consider any reason good enough. Be that as it may, scroll bars are
often used independently of fields. Since the parameters to SclSetScrollBar are
usually calculated values, the domain of signed integers for its parameters is an
acceptable and logical choice. Fields on the other hand, due to the way they are
coded, generally never involve the negative domain. Thus FldGetScrollValues uses
unsigned integers. Scroll bars can therefore be used with fields as long as negative
values are not involved, since that is outside the common domain of each API.
Does that answer your question?
Regards,
Jim Schram
Palm Incorporated
Partner Engineering
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/