"SCMI" <[EMAIL PROTECTED]> wrote in message news:43876@palm-dev-forum...
> Do you know what is the Palm Clipboard maximum size?

The short answer is 1000 characters. See cbdMaxTextLength in Clipboard.h.

But you want the long answer, don't you? I thought so...

Fields will refuse to copy/cut anything larger than 1000 characters.
Applications that call the clipboard APIs directly enforce this limit
themselves. However, there's nothing in the clipboard APIs that limits the
size to 1000 characters. The clipboard is stored in the dynamic heap, so
calling the clipboard APIs with large amounts of data could reduce the
amount of free space in the dynamic heap to a dangerous level.

My advice is stick with the 1000 character limit for the system's clipboard.
If you want to support larger sizes, do so only within your application, and
use the storage heap to store the larger clipboard via a feature pointer, a
temporary file, DmNewHandle, etc. Whichever you choose, be sure that the
clipboard gets cleaned up on a reset - you don't want a leak in the storage
heap. I'm not sure even this is a good idea because people expect the
clipboard to be "universal". Having the clipboard trim the text when exiting
the app is a hack at best.

Speaking of "hacks", I'm pretty sure people have written hacks to increase
the size of the clipboard.

You may notice that the clipboard supports multiple formats, but only text
is actually used.
--
Danny Epstein
OS Engineer, Palm Inc.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to