• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: styled text to record, ok. But record to styled text?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: styled text to record, ok. But record to styled text?


  • Subject: Re: styled text to record, ok. But record to styled text?
  • From: Walter Ian Kaye <email@hidden>
  • Date: Sat, 24 Jan 2004 08:51:34 -0800

At 01:47p +0000 01/24/2004, Nigel Garvey didst inscribe upon an electronic papyrus:

Walter Ian Kaye wrote on Fri, 23 Jan 2004 17:47:33 -0800:

>...if there's a size limit, I can't use it. Because I don't know in
>advance how long the styled text string might be.

Pity. When I was fooling around with it, I didn't encounter any size
limit with regard to actually using the clipboard in this way. There *is*
quite a low limit when trying to *compile* a <<class ksty>> data object
into a script, but I was assuming you already had your data and were just
trying to reintegrate it.

>Christopher Stone sent me an email illustrating that a *list* would
>work, although it requires special handling due to returning
>{styledtext} upon reconversion (i.e., it becomes a 1-item list:
>{text,styl} -> {stxt}). But since writing as list is special-cased
>anyway, then un-listing afterwards just goes along with that.
>Of course now I'm wondering which other seemingly-basic data types
>would need similar special casing...

I couldn't make head nor tail of this, nor of any of the later replies, until I went back to your original post. It appears it wasn't about recombining text and styl at all, but about saving styled text to file and retrieving it as such.

Well I was hoping I could separate 'em because that does come in handy (say you want to read and write TeachText files), but I guess it's not really necessary in this particular case.

The list approach is a nice one for this. It's also good for when you don't know at the time of writing what sort of data you'll be saving and retrieving

Hmm... so I can have a bunch of known classes that can be written as-is, and then everything else can be embedded in a list... and then if the data read back starts with "list---+" (where ---+ is 0x00 0x00 0x00 0x01 indicating a one-item list) then read it back as list and un-list it. That oughta work, right?

I really do wish I could store the datatypes directly, without a list wrapper.
You know, for theoretical future interoperability with other apps.
Ah well, I guess any such future apps could just use the same header-check algorithm. Stranger things have been coded...


>>(and usual grins for the hilarious error message associated).
>>
>>Emmanuel
>
>Whassat?

Syntax error: "Way too long, dude."

Oh that one, yeah. :D


-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: styled text to record, ok. But record to styled text?
      • From: "John W. Baxter" <email@hidden>
References: 
 >Re: styled text to record, ok. But record to styled text? (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: [iCal] where is the note, what is the sequence?
  • Next by Date: Re: Get the address data without Address Book running?
  • Previous by thread: Re: styled text to record, ok. But record to styled text?
  • Next by thread: Re: styled text to record, ok. But record to styled text?
  • Index(es):
    • Date
    • Thread