Text empahsis from string tags

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Text empahsis from string tags

Paul Baumann

Text is normally created by convert a string to Text with protocol like #asTest or by using a TextStream. The emphasis that the text gets is by way of message sends to either Text or TextStream objects:

 

                ^'normal, ' asText,

                ('red italic, ' asText emphasizeAllWith: (Array with: #italic with: #color->ColorValue red)),

                ('green' asText emphasizeAllWith: (#color->ColorValue green))

 

I'm wondering if there is any pre-existing way to convert a string to text using tags contained within the string; something like:

 

                ^'normal <color:red><italic>red italic, </italic><color:green>green' asTextFromTags

 

The need for something like this has come about because the strings would be returned from methods that get stored and returned from GemStone but are displayed in VW. If something like this doesn't already exist then I can create it, but it seems like something that would have probably been done a few hundred times already since we are now in the age of tagged html and xml strings.

 

Paul Baumann

 

 

 

 



This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Text empahsis from string tags

Boris Popov, DeepCove Labs (SNN)

Paul,

 

See String>>asRichText in Aragon.Shared parcel and try inspecting,

 

'<c:red>basic</c> <c:blue><b>example</b></c>' asRichText

 

as per attached.

 

Hope this helps,

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Baumann
Sent: 07 April 2011 10:40
To: [hidden email]
Subject: [vwnc] Text empahsis from string tags

 

Text is normally created by convert a string to Text with protocol like #asTest or by using a TextStream. The emphasis that the text gets is by way of message sends to either Text or TextStream objects:

 

                ^'normal, ' asText,

                ('red italic, ' asText emphasizeAllWith: (Array with: #italic with: #color->ColorValue red)),

                ('green' asText emphasizeAllWith: (#color->ColorValue green))

 

I'm wondering if there is any pre-existing way to convert a string to text using tags contained within the string; something like:

 

                ^'normal <color:red><italic>red italic, </italic><color:green>green' asTextFromTags

 

The need for something like this has come about because the strings would be returned from methods that get stored and returned from GemStone but are displayed in VW. If something like this doesn't already exist then I can create it, but it seems like something that would have probably been done a few hundred times already since we are now in the age of tagged html and xml strings.

 

Paul Baumann

 

 

 

 

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

aragon.png (85K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Text empahsis from string tags

Paul Baumann

Perfect. Thanks Boris.

 

From: Boris Popov, DeepCove Labs [mailto:[hidden email]]
Sent: Thursday, April 07, 2011 10:50
To: Paul Baumann; [hidden email]
Subject: RE: [vwnc] Text empahsis from string tags
Importance: High

 

Paul,

 

See String>>asRichText in Aragon.Shared parcel and try inspecting,

 

'<c:red>basic</c> <c:blue><b>example</b></c>' asRichText

 

as per attached.

 

Hope this helps,

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Baumann
Sent: 07 April 2011 10:40
To: [hidden email]
Subject: [vwnc] Text empahsis from string tags

 

Text is normally created by convert a string to Text with protocol like #asTest or by using a TextStream. The emphasis that the text gets is by way of message sends to either Text or TextStream objects:

 

                ^'normal, ' asText,

                ('red italic, ' asText emphasizeAllWith: (Array with: #italic with: #color->ColorValue red)),

                ('green' asText emphasizeAllWith: (#color->ColorValue green))

 

I'm wondering if there is any pre-existing way to convert a string to text using tags contained within the string; something like:

 

                ^'normal <color:red><italic>red italic, </italic><color:green>green' asTextFromTags

 

The need for something like this has come about because the strings would be returned from methods that get stored and returned from GemStone but are displayed in VW. If something like this doesn't already exist then I can create it, but it seems like something that would have probably been done a few hundred times already since we are now in the age of tagged html and xml strings.

 

Paul Baumann

 

 

 

 

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.



This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc