Both programatic and user access to the clipboard is a bit limited at
present.  

In terms of user access, it is a problem that copying or pasting styled text
to and from fields loses the style information.

Programatically, the copy command is useful in some situations, but bizarre
in others.  It is also (at least on Mac) not always updated to the system
scrap.  For example "copy fld 1" produces an empty clipboard if you look in
any other application (or strictly, a clipboard containing an empty piece of
text).  In MC/Rev's private scrap, it has made a faithful copy of the field
- but you can't access it outside.  I have yet to understand how to get some
text into the clipboard, without putting it into a field, and selecting it.
('Copy "hello"' is a bug, "hello" is interpreted as a (bad) object
reference; 'Copy <a reference to a chunk of a container>' has the same
problem - which seems strange to me, it's as if the expression is being
evaluated twice.)

Looking at how other environments handle the clipboard: in Hypercard 'the
clipboard' is a normal container, you can retrieve text from it or store
text to it.  That works great for unstyled text.  However for anything else
(ie styled text) one is reduced to selecting text of a field and using
'domenu "copy"', or going the other way pasting styled text from the
clipboard into a field and then processing it.

In RealBasic the 'clipboard' is an object of the 'Clipboard' class.  There
are properties and methods to access it.   For the simple cases, you can set
and get the "Text" or "Picture" (and test with "PictureAvailable" and
"TextAvailable");  for more complex stuff, you can test, set or get binary
data of arbitrary type (but Mac only, at least in version 2 - dunno if
they've improved this in v3).  (In fact, for a recent project in Revolution,
I had to supply the client with an extra app built in RealBasic, which
replaced the style information for text in the clipboard with inline markup,
that could then be read by Revolution after pasting into a field.  Yeuch.)

A big difference would be if copy and paste, applied to fields, transferred
style information as appropriate.

A modest impovement would be made if the private scrap was reliably copied
to the global scrap - eg if I copy a field containing some styled text, then
the styled text must at least be recorded somewhere in the clipboard, even
if an unpublished format.  (In HC, the text and style information for a
field are saved in the clipboard separately from the rest of the field
properties - hence in many cases you can copy a field, and paste directly
into some other app, which will disregard the field info it doesn't
understand, but correctly interpret the styled text.  Dunno if the same is
true in MC, but at least if the destination app was a custom one, one could
presumably decode the data anyway.)

A modest improvement would be made if the paste command supported arbitrary
containers as source or destination, eg 'copy "fred"' or 'copy from x',
"paste into x".

A more substantial improvement would be (since 'the clipboard' is already
defined in MC) some new properties, all three readable and writeable:
    the clipboardText
    the clipboardImage
    the clipboardHtmlTxt

Comments?

  Ben Rubinstein               |  Email: [EMAIL PROTECTED]
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to