Hi all,
All REALbasic platforms.
For a future REALbasic release.
Yesterday, I was reading the FolderItem Class entry of the Language Reference
and it was good. I was working with the Clipboard Class and at some point I feel
sad for non Macintosh users of REALbasic. Here's the concern.
When REALbasic was released, using: 'MacData', 'AddMacData' and
'MacDataAvailable' as Method names was in tune with the (only) target REALbasic
have: Macintosh. Now (and since sometimes), the things have changed: there is
other target platform to consider.
I think the presence of the 'Mac' letters (the three characters) may lislead
people. The use of the word 'Private' will be better:
'PrivateData', 'AddPrivateData' and 'PrivateDataAvailable'.
Whaooo. Gee, it looks better... really better.
I read the description lines (in the Clipboard Class entry of the Language
Reference, and these are not enough informative) and do not see these three
letters there (Mac). This is good.
What I propose is to poll what you think about a name change:
actual names: 'MacData', 'AddMacData' and 'MacDataAvailable'
proposed names: 'PrivateData', 'AddPrivateData' and 'PrivateDataAvailable'.
BWT: forget the impact on the existing code at this stage. Send your opinion on
the idea, not on the possible implementation. The idea is REALbasic users, the
implementation is REAL Software privilege :)
Send your answers to this list as usual,
Emile
PS: There is no example involving what REALbasic calls MacData.
Since new users do not have ESP (Extra Sensorial Perception), they have to have
learn from elsewhere (or here) what is a PrivateData property in the Clipboard.
I will give you two examples using Mac OS X (sorry, I do not have examples for
Linux nor Windows - yet -):
Example I:
----------
When you select a file (only one) in the Finder, use the Copy MenuItem of the
Edit Menu of the Finder, in reality, you put many things in the Clipboard:
a. 'hfs ': a private data that holds some object informations,
(Type/Creator if not a folder, MacVREfNum, MacDirID, Object Name as
PString and many other bytes that I wasn't able to decode - yet -),
b. Picture: the 32 x 32 object Icon as Picture,
c. icns: the whole Icon package
(All Mac OS up to 9.2.2 and the new compacted 128 x 128, etc. Icons)
d. 'furl': REALbasic name that 'ShellPath',
e. string: the file name without encodings,
f. Unicode text: the file name with an encoding (probably UTF-8).
When you paste that in TextEdit, you get on screen the 32 x 32 Icon (when in the
RTF mode) and the whole file is put in the TextEdit document (saved as a package
on disk).
When you paste that in a REALbasic application who allows a graphics copy, you
get the Icon.
When you paste that in another object - in rename mode - you get the text, and
so on.
Example II:
-----------
Copy a bunch of styled text (with or without image) from the TextEdit
application will store in the Clipboard:
a. styled Clipboard text,
b. string,
c. uniform styles,
d. Unicode text,
e. 'RTF ' data.
Funny, isn't it ?
The mechanism is to let the application use the widely open data available on
the platform, but also use its own 'Private' data.
Take a look at Photoshop (it does that sometimes ago): it let me Copy / Paste
images and when I am at the Save As time, I also can Copy / Paste text I use to
name the files. One does not clears the other. [but if you go in a different
application and Cut or Copy something, you loose both Text and Picture].
A second example also with a Adobe software is the use of Illustrator (as seen
in an old version): inside the application, the Copy / Paste mechanism use
PostScript (I feel that). But, if you wanted to export a drawing - using the
Clipboard - and Paste it in ... AppleWorks for example, you had to press the
Option Key when you was doing Edit-Copy. The later version probably have a 'Copy
for export' or 'Copy as PICT' to do that (I do not recall what it was).
BTW: I use AppleScript to see and tell what is in the Clipboard after using the
Edit -> Copy command.
REALbasic use 'STOb' as the PrivateData type. Put a Control in a Window, Edit ->
Copy and go to TextEdit to do Edit -> Paste: you will get nothing since TextEdit
does not know the 'STOb' PrivateData type and this is good.
Because of all I wrote earlier, I think that we have to get a name change.
How this can be done without hurting the whole installed base (existing
projects) ? This is up to REAL Software to provide a solution.
One solution can be to provide a simple project (or application) that accept (or
open) REALbasic project file, save it as xml [*], load teh sml, makes the
changes and save the changes in the xml, load it as xml [*] and save it back as
REALbasic project.
[*] The REALbasic IDE is currently able to save a project as xml / load a
project xml file and save it as a REALbasic project. This can probably be done
using some AppleScript; but since AppleScript runs only in one Platform, this is
not a XPlatform solution.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|