On Jun 30, 2009, at 11:56 AM, Jann Gobble wrote:
Hi all,
My IM project inside my App is off the ground and working! Yippee..
However, one thing. I have an IM window where the conversation is
on top and the user entry field is below. The conversation field is
styled to make it easy to see your text vs theirs (yours in blue,
theirs in red -- with either of your names bolded). When a user
closes an IM window during a conversation ... and the other user (on
the other side of the conversation) sends them a response, I would
like to redisplay the window with the original conversation still in
the editfield.
My main question is this: I know I can store the TEXT portion of
the editfield in a string variable and redisplay it if needed but is
there a way to store the text and style portions in a variable.
I guess what I would LOVE to do is the equivalent of a Perl Freeze/
Thaw. Whereby i can freeze a data structure such as an editfield --
or the contents thereof, store it in a text variable and thaw it
back out later to put back as the contents of the editfield.
Does such a puppy exist?
Sort of. You can save the StyledText object returned by an EditField
to a variable, and assign it to a new EditField. There is at least
one gotcha, though; Rb is a little too casual about the implementation
of this property, and so I can never remember whether or not you must
copy this StyledText object. The code for doing so has been posted to
this list in the past, so you might search for it.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|