Xojo Conferences
XDCMay2019MiamiUSA

Re: Scrap Manager Question (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Which RB Type Is a Blob?
Next thread: A scrolling list of pictures?


Quicktime tracks / layers   -   Derek Seabrooke - CSCI/P2001
  Re: Scrap Manager Question   -   Joel Rosenblum
    Scrap Manager Question   -   John Lowrey
     Re: Scrap Manager Question   -   James Sentman
     Re: Scrap Manager Question   -   John Lowrey
      Re: Scrap Manager Question   -   George Clark
     Re: Scrap Manager Question   -   James Sentman

Re: Scrap Manager Question
Date: 01.08.02 02:18 (Wed, 31 Jul 2002 21:18:58 -0400)
From: Joel Rosenblum


> I don't actually want the alias
> record, I need the 4byte code. In RB code it would translate like so:
>
> clipboard.addmacdata [filereference],"????"
>
> and the same for the Unicode data:
>
> clipboard.addmacdata [Unicodetext],"????"
>
> The "????"s are what I am looking for. Ideas?
>
> John

I have the code to do find out what "flavors" are on the clipboard
(OSTypes) for both Carbon and PPC. Do you still need this?

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Scrap Manager Question
Date: 29.07.02 02:36 (Sun, 28 Jul 2002 17:36:45 -0800)
From: John Lowrey
Hello All,

I have been sifting through the Apple Developer Documentation
searching for the answer to this question. I am looking for the 4
byte scrap flavor codes for a folder item. Selecting an item in the
Finder and copying it yields the following information using "get
clipboard info" in the Applescript Editor:

{{reference, 598}, {string, 13}, {Unicode text, 26}}

"String" will translate into TEXT. What do "reference" (a file
reference perhaps?) and "Unicode text" (long filename maybe?)
translate into? Thanks for reading...

Regards,

John

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Scrap Manager Question
Date: 29.07.02 02:59 (Sun, 28 Jul 2002 21:59:46 -0400)
From: James Sentman
>Hello All,
>
>I have been sifting through the Apple Developer Documentation
>searching for the answer to this question. I am looking for the 4
>byte scrap flavor codes for a folder item. Selecting an item in the
>Finder and copying it yields the following information using "get
>clipboard info" in the Applescript Editor:
>
>{{reference, 598}, {string, 13}, {Unicode text, 26}}
>
>"String" will translate into TEXT. What do "reference" (a file
>reference perhaps?) and "Unicode text" (long filename maybe?)
>translate into? Thanks for reading...

You're right about the unicode text, it's the title. The reference
will be an alias record. You'll notice that the unicode text is
double the length of the string, which will also hold the name, but
in traditional single byte characters. You should be able to get a
path or other reference out of the alias record via some declares and
turn that into an RB folderitem. There are plugins around that can
also make this conversion for you.

-James

Re: Scrap Manager Question
Date: 29.07.02 03:13 (Sun, 28 Jul 2002 18:13:11 -0800)
From: John Lowrey
>>Hello All,
>>
>>I have been sifting through the Apple Developer Documentation
>>searching for the answer to this question. I am looking for the 4
>>byte scrap flavor codes for a folder item. Selecting an item in
>>the Finder and copying it yields the following information using
>>"get clipboard info" in the Applescript Editor:
>>
>>{{reference, 598}, {string, 13}, {Unicode text, 26}}
>>
>>"String" will translate into TEXT. What do "reference" (a file
>>reference perhaps?) and "Unicode text" (long filename maybe?)
>>translate into? Thanks for reading...
>
>You're right about the unicode text, it's the title. The reference
>will be an alias record. You'll notice that the unicode text is
>double the length of the string, which will also hold the name, but
>in traditional single byte characters. You should be able to get a
>path or other reference out of the alias record via some declares
>and turn that into an RB folderitem. There are plugins around that
>can also make this conversion for you.
>
>-James
>--

Hi James,

Thanks for the quick reply. I'm not actually after the folderitem
here. According to Apple's docs, each piece of scrapboard data is
represented by a 4 byte code. I don't actually want the alias
record, I need the 4byte code. In RB code it would translate like so:

clipboard.addmacdata [filereference],"????"

and the same for the Unicode data:

clipboard.addmacdata [Unicodetext],"????"

The "????"s are what I am looking for. Ideas?

John

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Scrap Manager Question
Date: 29.07.02 03:32 (Sun, 28 Jul 2002 22:32:40 -0400)
From: George Clark
I don't believe there is a set list of what these types can be. The info I
found at Apple's developer site says this about the scrap manager (after
stating that all apps should be able to add either TEXT or PICT types to the
clipboard, and be prepared to read both):

"If you request a scrap format type that isn't in the scrap and the
Translation Manager is available, the Scrap Manager uses the Translation
Manager to attempt to convert the data of a scrap format type that does
exist in the scrap into the scrap format type requested by your application.
For example, if the SurfWriter application requests data from the scrap in
the 'SURF' scrap format type, and the data in the scrap is available
in the format types 'TEXT', 'PICT', and 'SDBS'(SurfDB's private scrap format
type), the Scrap Manager uses the Translation Manager to convert any one of
the scrap format types 'TEXT', 'PICT', or 'SDBS' into the 'SURF' scrap
format type. The Translation Manager looks in the Extensions folder for a
translator that can perform one of these translations. If such a translator
is available (for example, a translator that can translate the 'SDBS' scrap
format type into the 'SURF' scrap format type), the Translation Manager uses
the translator to translate the data in the scrap into the requested scrap
format type."

That sounds to me as though the 4-byte code could be virtually anything, as
long as there is a corresponding translator to handle it.


George

On 7/28/02 22:13, John Lowrey wrote:

> Thanks for the quick reply. I'm not actually after the folderitem
> here. According to Apple's docs, each piece of scrapboard data is
> represented by a 4 byte code. I don't actually want the alias
> record, I need the 4byte code. In RB code it would translate like so:
>
> clipboard.addmacdata [filereference],"????"
>
> and the same for the Unicode data:
>
> clipboard.addmacdata [Unicodetext],"????"
>
> The "????"s are what I am looking for. Ideas?
>
> John
>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Scrap Manager Question
Date: 29.07.02 04:11 (Sun, 28 Jul 2002 23:11:04 -0400)
From: James Sentman
>
>Thanks for the quick reply. I'm not actually after the folderitem
>here. According to Apple's docs, each piece of scrapboard data is
>represented by a 4 byte code. I don't actually want the alias
>record, I need the 4byte code. In RB code it would translate like
>so:
>
>clipboard.addmacdata [filereference],"????"
>
>and the same for the Unicode data:
>
>clipboard.addmacdata [Unicodetext],"????"
>
>The "????"s are what I am looking for. Ideas?

Ah, I see, sorry for the misunderstanding;) As George said it can be
almost anything, but if it were an apple event it would be type
"alis" or "fss " to denote different ways of representing a file. Try
those and see what happens.

Good Luck,
James