I didn´t understand how apply filters can be done to certain words.
About my tests:
I load some text in text property of textfield and discovery that the maximum usable
is 50,000 chars. More than that, each time you press a key, a perceptible delay happens.
A code file with fifty thousand chars has about one thousand and a half lines.
A great way to do this is via Filters. Beau Amber wrote a highlighter for AS3 using the Flex Components. Within a TextArea control, he used Regex to find matches and used filters to color highlight certain words. When the text was scrolled or changed, the filtering was removed for performance, then reapplied when the change stopped. As the highlighting only effects the viewable portion of the textArea, it was quite fast. It was rare to actually see it flicker at all.
I would avoid the HTMLText route and use imaging to support your needs. I would not have recommended this initially but seeing it actually work changed my mind.
Ted Patrick
Flex Evangelist
Adobe Systems Incorporated
From: [email protected] [mailto:[email protected]] On Behalf Of Gordon Smith
Sent: Tuesday, September 26, 2006 1:15 PM
To: [email protected]
Subject: RE: [flexcomponents] Re: WYSIWYG Rich Text Editor for Flex 2
> What I do is every stroke, parse the text property and generate an html wich I set to htmlText.
That means that on every stroke the player has to reparse the entire htmlText, recreate all the style runs, and redo all the line wrapping based on new measurement. No matter how fast the Player got, that design wouldn't scale to arbitrarily large documents.
- Gordon
From: [email protected] [mailto:[email protected]] On Behalf Of Flex Brasil
Sent: Tuesday, September 26, 2006 12:44 PM
To: [email protected]
Subject: Re: [flexcomponents] Re: WYSIWYG Rich Text Editor for Flex 2
Yes, i´m trying to do a code editor. Since it´s just for learn purpose, 3000 chars is ok,
but would be nice support normal file size.
I didn´t try replace/setTextFormat. What I do is every stroke, parse the text property and
generate an html wich I set to htmlText.
I don´t know how to do a highligher that can work with fragments of text, what would be much faster.
My highlighter is a mix of tokenizer and regular _expression_. I´m doing a benchmark class to
analyze where are the bottle necks on my algorithm.On 9/26/06, Alex Harui <[EMAIL PROTECTED]> wrote:
Can you shed more light on what you are trying to do? Is it something like a code editor where as you type it colors certain text in certain ways?
Have you tried using replaceSelectedText()/replaceText() instead? Have you tried using setTextFormat()?
From: [email protected] [mailto:[email protected]] On Behalf Of Flex Brasil
Sent: Tuesday, September 26, 2006 11:26 AM
To: [email protected]
Subject: Re: [flexcomponents] Re: WYSIWYG Rich Text Editor for Flex 2
I really set text property each textChange event. I couldn´t think a better solution.
On 9/26/06, Alex Harui <[EMAIL PROTECTED] > wrote:
I would revisit your highlighting algorithm. If you set the .text property too often it will definitely slow things down.
From: [email protected] [mailto:[email protected]] On Behalf Of Flex Brasil
Sent: Tuesday, September 26, 2006 10:59 AM
To: [email protected]
Subject: Re: [flexcomponents] Re: WYSIWYG Rich Text Editor for Flex 2
One limitation of Flash player is speed. I´m doing a sintaxe highlighter but
with a text bigger than 3000 chars, the input became slow in my machine that is
an Athlon 64 3GHz with 1GB ram!!!On 9/26/06, Michael Schmalle <[EMAIL PROTECTED]> wrote:
> but I don't know if this will ever be out in the public
I don't think I said it would but, just that there are things that the flash player can do that can work around current barriers.
Peace, MikeOn 9/26/06, Peter Hall <[EMAIL PROTECTED] > wrote:
Yes, but I don't know if this will ever be out in the public. However, we know it is possible to make a very advanced text editor, rivalling desktop editors. Flash is ready, but it is just a hell of a lot of work.
PeterOn 9/23/06, Michael Schmalle < [EMAIL PROTECTED]> wrote:
> It's not online yet afaik. But just in case you don't believe that it exists, i've seen it too, and i was *very* impressed.
Thanks Claus :), yes Stefan we are talking about something REAL. All I am saying is be an engineer - inventor, don't limit yourself to what you think you can do, try to do what you can't do.
Peace, MikeOn 9/23/06, Claus Wahlers < [EMAIL PROTECTED]> wrote:
>>I have seen something that you wouldn't believe
> Ok, let's see it. Where is it?
It's not online yet afaik. But just in case you don't believe that it
exists, i've seen it too, and i was *very* impressed.
Cheers,
Claus.
--
claus wahlers
côdeazur brasil
http://codeazur.com.br
--
What goes up, does come down.
--
What goes up, does come down.
__._,_.___![]()
SPONSORED LINKS
Custom software development Database development software Embedded software development Offshore software development Software development
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
- Re: [flexcomponents] Re: WYSI... Michael Schmalle
- Re: [flexcomponents] Re: WYSI... Flex Brasil
- RE: [flexcomponents] Re: WYSI... Alex Harui
- Re: [flexcomponents] Re: WYSI... Flex Brasil
- RE: [flexcomponents] Re: WYSI... Alex Harui
- Re: [flexcomponents] Re: WYSI... Flex Brasil
- RE: [flexcomponents] Re: WYSI... Gordon Smith
- Re: [flexcomponents] Re: WYSI... Flex Brasil
- RE: [flexcomponents] Re: WYSI... Ted Patrick
- RE: [flexcomponents] Re: WYSI... Alex Harui
- Re: [flexcomponents] Re: WYSI... Flex Brasil
- [flexcomponents] Re: WYSIWYG ... Bjorn Schultheiss
- Re: [flexcomponents] Re: WYSI... Michael Schmalle
- Re: [flexcomponents] WYSIWYG Rich Text Editor for Flex ... Hilary Bridel
- Re: [flexcomponents] WYSIWYG Rich Text Editor for ... Firdosh Tangri
- Re: [flexcomponents] WYSIWYG Rich Text Editor for ... Dominick Accattato
