• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Linked continer issue

Community Beginner ,
May 03, 2010 May 03, 2010

Copy link to clipboard

Copied

Hi Guys,

This issue is specific to TLF 1.1 and does not happen in TLF 1.0.

Have 2 linked container and try typing on the second para of second container, you will see a flicker . Also if you hit "ENTER" in the first para of second container the content will dissapear .

You can try the same here ..

Is this a bug in TLF or am i doing something wrong ?

Thanks

Rafique Gilani

TOPICS
Text layout framework

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 03, 2010 May 03, 2010

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 03, 2010 May 03, 2010

Copy link to clipboard

Copied

Hard to say what's going on.  My first guess is that after adding a ContainerController you need to add a call to updateAllControllers.

An AS3 example program with source demonstrating the problem would help.

Richard

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 03, 2010 May 03, 2010

Copy link to clipboard

Copied

I can reproduce this in our test app. I've logged a bug (Rich - it's 2616329).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 03, 2010 May 03, 2010

Copy link to clipboard

Copied

I guess bug fixing will take some time and this is a show stopper for one of my existing project. Any quick fixes will be really helpfull ?

Regards

Rafique Gilani

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 04, 2010 May 04, 2010

Copy link to clipboard

Copied

I've been looking into this -- thanks for reporting this! I have a workaround for you to try. I haven't done extensive testing with it, but it fixes the basic problem. The bug is caused by the new incremental composition. We added new code for composing from the middle of the container, instead of requiring to start at the beginning each time. This bug happens when we are applying the incremental composition logical, but are starting from the start of the second or subsequent container. In this case, it gets confused about where the composed lines should go. The fix is to extend the damaged area slightly, to include the very end of the previous container. You can do this by adding an event listener for DamageEvent to the TextFlow. When you get a damage event, and the damaged area starts at the start of the controller (and its not the first), damage backward by one character.

Here's an example event listener:

        private function damageHandler(event:DamageEvent):void
        {
            if (event.textFlow == activeFlow)
            {
                var controllerIndex:int = activeFlow.flowComposer.findControllerIndexAtPosition(event.damageAbsoluteStart);
                if (controllerIndex > 0)
                {
                    var controller:ContainerController = activeFlow.flowComposer.getControllerAt(controllerIndex);

                    if (controller.absoluteStart == activeFlow.flowComposer.damageAbsoluteStart)
                        activeFlow.tlf_internal::damage(controller.absoluteStart - 1, 1, false);
                }
            }
        }

You can attach this event listener to textflow as follows:

            activeFlow.addEventListener(DamageEvent.DAMAGE, damageHandler, false,0,true);

Let me know how this works -- my apologies for the bug.

Thanks,

- robin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2010 May 04, 2010

Copy link to clipboard

Copied

HI Robin

I really appreciate your help.

Just that this fixed only a part of the problem. i.e. typing in the second para of the second container, flicker has gone .

What remains is when you hit enter in first para of the second container every thing disappears till i hit a key again

Thanks and Regards

Rafique Gilani

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

We've been unable to repro this problem with the workaround, although we do see it in your application that you posted. However, I did find a problem with the code that I posted that was not flagged by the MXML compiler. It should be:

        private function damageHandler(event:DamageEvent):void
        {
            if (event.textFlow == activeFlow)
            {
                var controllerIndex:int = activeFlow.flowComposer.findControllerIndexAtPosition(event.damageAbsoluteStart);
                if (controllerIndex > 0)
                {
                    var controller:ContainerController = activeFlow.flowComposer.getControllerAt(controllerIndex);

                    if (controller.absoluteStart == activeFlow.flowComposer.damageAbsoluteStart)
                        activeFlow.tlf_internal::damage(controller.absoluteStart - 1, 1, TextLineValidity.INVALID, false);
                }
            }
        }
       
Can you try this? TextLineValidity is in the flash.text.engine package. If you still see problems, it would be very helpful to get a small application, if possible, that we can build that shows the problem.


Thanks!

- robin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

Robin,

Firstly i'd like to thank you for the help.

Have a look at this.. (Source is on)

Start typing till you reach first line of second container, hit enter in there , i.e. first line of second container and you will see what I am talking abt.

Regards

Rafique

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

I see the problem in the compiled application, but I need a way to debug it. Can you isolate the problem and send me a small code sample that demonstrates it? Even if you could just post the damage event handler you are using, that might be enough. I have tried to recreate it here in my own test application but have not succeeded.

Thanks!

- robin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

Thanks Robin.

I had the same problem and you're workaround did the trick. Is there a new version coming with this bug fixed, TLF 1.2 or similar?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 09, 2010 Aug 09, 2010

Copy link to clipboard

Copied

LATEST

It's fixed in our mainline, now available in pre-release form on SourceForge: http://sourceforge.net/adobe/tlf/home/. But unfortunately we don't have a date yet when it will be final.

- robin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines