Skip to main content
Inspiring
February 15, 2009
Answered

single container update ability?

  • February 15, 2009
  • 5 replies
  • 694 views
I have a bunch of containers created, and if I programmatically make a slight change to one span in the text flow, I do not want to go through the process of updating all of the containers to see that change.

I figured flowComposer.updateContainter(modifiedContainerIndex) would work, however, after I call this method, the containers that come after the supplied index do not display properly.

After reviewing the docs, I found that this is not unexpected behaviour....

"Does just enough composition and update to ensure that the display for the specified container is current. If you have a chain of twenty containers and specify the tenth container, updateContainer() ensures that containers 1 - 10 are properly composed and displayed. Composition stops at that point and you cannot assume that the following containers are correctly displayed."

I tried to just call flowComposer.compose() hoping this might do the job, but it does not. :(

So, I ask... Is there a way to update a single container without messing up the rest of my containers that follow it?
Thanks,
Tim
This topic has been closed for replies.
Correct answer rdermer
Nope. Sounds like updateContainer is now working just right.

Regarding your APIs. No container can be properly composed unless all its predecessors are property composed. Might as well just call updateContainer on the last one. The code attemps to skip regenerating unchanged lines.

Rich

5 replies

rdermerCorrect answer
Adobe Employee
February 16, 2009
Nope. Sounds like updateContainer is now working just right.

Regarding your APIs. No container can be properly composed unless all its predecessors are property composed. Might as well just call updateContainer on the last one. The code attemps to skip regenerating unchanged lines.

Rich
tpf70Author
Inspiring
February 16, 2009
Richard,
Thanks for the quick reply.

updateContainer seems like it is working as documented.

When I call it, it updates all the containers up to and including the one I specify. The unfortunate side effect is that it causes containers after the one I specify to become corrupted; however, the documentation indicates that this may occur.

Are you saying that updateContainer is supposed to work differently, or it will work differently in the future?

I CAN see the need for updateContainer to work as is documented (and currently implemented)... update containers up to a specific one...

However, If updateContainer is not going to change, I would love to see a different API called:
updateSpecificContainers(containerArr:Array)
updateSpecificContainer(container:DisplayObjectContainer)

that when called updates only the specified container(s) and doesnt negatively affect any other containers.

Thanks,
Tim
Adobe Employee
February 16, 2009
The intention is to make the updateContainer API work as you expected. Apparently it isn't yet.

compose rebreaks the lines but doesn't put the new lines into the DisplayObjectContainer. I don't think its useful for your purpose either.

Richard
tpf70Author
Inspiring
February 16, 2009
rdermer,
I am not sure I understand your response.
Are you saying that compose should work for what I am describing?

As of right now, compose essentially does nothing when I call it after changing some piece of text. In order for me to see the change, I need to updateAllContainers.

As for the build of vellum, I am using the build that came with Gumbo 4932 (the latest available). Build 370 and the Gumbo release comprising build 370 that was discussed last week have still not shown up on the opensource Gumbo site.

Thanks for your attention to this.
Tim
Adobe Employee
February 16, 2009
Which build are you using? I believe that build 370 is correctly limiting the compose. Its not really wrong to go to far just badly optimized. The optimization wasn't in earlier but we wanted to make sure the API was there.