# Text Layout Framework

Currently Being Moderated

## Getting a runtime error in ContainerController

### May 12, 2011 3:53 PM

Using SDK 4.5.0.20967

The error is thrown on line 3182:

while (containerListIndex == -1 && floatIndex > 0)

{

floatIndex--;

floatInfo = _composedFloats[floatIndex - 1];

containerListIndex = _floatsInContainer.indexOf(floatInfo.graphic);

}

floatIndex is 1 when it enters the loop,

then it is decresed to 0,

then null gets assigned to floatInfo - when it is looking for:  _composedFloats[-1]

Then it throws an error when it tries to access a property on floatInfo - which is set to null

Here is the error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

I am not sure exactly how I am triggering this - I am trying to discern that - but if you have any thoughts - please let me know.

Replies Previous Next
• Currently Being Moderated
May 13, 2011 12:46 AM   in reply to josh_on

It can be reproduced with SDK 4.5 (tlf 2.0.232 in it). But your code works well without any runtime error when compiled with tlf 3.0.5 on my machine, which is not released officially to the outside of Adobe.

I'm not sure when flex team will add tlf 3.0 into their SDK.

|
Mark as:
• Currently Being Moderated
May 13, 2011 1:03 AM   in reply to josh_on

I will ask my workmate whether we can release a 3.0 tlf on https://sourceforge.net/adobe/tlf/home/ next week.

I'm not sure the time point is all right. Pls wait for the reply.

|
Mark as:
• Currently Being Moderated
May 15, 2011 7:54 PM   in reply to josh_on

I'm trying to connect with Flex guys. But I'm not sure of the result.

|
Mark as:
• Currently Being Moderated
May 19, 2011 12:26 AM   in reply to josh_on

We have realized our mistake and want to back port the fix to the the old version of TLF. It need a lot of tests and processes. And we cannot control the time point when flex team will pick up our build. TLF and Flex are not the same team. We are begging flex team to pick up new TLF build these days...Picking up new build also need a lot of test.

|
Mark as:
• Currently Being Moderated
Jul 10, 2011 8:34 PM   in reply to josh_on

TLF 2.1 has been released with several bug fixes but without new features. Flex SDK may pick up it this autumn.

|
Mark as:
• Currently Being Moderated
Jul 15, 2011 2:54 PM   in reply to Jin-Huang

Does TLF 2.1 fix this bug? Where can I find TLF2.1?

Thanks

|
Mark as:
• Currently Being Moderated
Jul 17, 2011 7:44 PM   in reply to talkingcat

1. Yes.

2. TLF 2.1 will be on http://sourceforge.net/projects/tlf.adobe/files this week.

|
Mark as:
• Currently Being Moderated
Aug 29, 2011 10:54 PM   in reply to josh_on

TLF 2.1 won't be included.

TLF 3.0 will probably be in Flex SDK next year.

|
Mark as:
• Currently Being Moderated
Aug 30, 2011 11:41 PM   in reply to josh_on

PS: I don't think sourceforge.net can be RSL server, because it redirects you to a new link when downloading and there is time stamp within the redirection link.

You may want to find a server for yourself.

|
Mark as:
• Currently Being Moderated
Sep 5, 2011 8:10 PM   in reply to josh_on

Usually, Flex SDK pick up one build of tlf and then upload the swz to that server.

We will have a try.

But I prefer to upload a tlf 3.0 swz, because I think for now using 2.1 is meaningless.

1. There is still RTE found in 2.1, but which cannot be reproduced in 3.0.

2. In 3.0, there are only one simple feature, performance enhancement and dozens of bug fixes. We did not change the framework and APIs. Since both 2.1 and 3.0 have never go through the tests of Flex SDK, why not to choose 3.0.

3. We are focusing on and sell our 3.0 and don't plan to make any changes on 2.1.

|
Mark as:
• Currently Being Moderated
Sep 13, 2011 7:04 PM   in reply to josh_on

We are trying to get the access to upload rsl on that server. If we got the access, rsl will be there soon. But I cannot promise you the time. I will tell you here if state changes.

|
Mark as:
• Currently Being Moderated
Sep 19, 2011 5:36 AM   in reply to josh_on

Hi.

I've noticed that TLF 3.0 was launched on sourceforge.

My question is: how can i update my flex sdk to use the new TLF?

I've copied the new folders of TLF 3.0 over the old ones but that does not help.

Any help is apreciated.

Thanks

|
Mark as:
• Currently Being Moderated
Sep 19, 2011 9:21 AM   in reply to bogdan_cs4

I'd like to +1 the questions about integrating the tlf 2.1 (waiting for the 3.0swz) to my project.

In flashBuilder i have 3 projects:

2 library projects representing my appFramework (core and utils)

1 appProject

In my libraries projects the framework linkage is external.

In parallele in my app Project

So far no luck

I also tried in a release build i did to savagely paste textLayout_2.1.0.6.swz and rename it like the 2.0... one i had (I thought it worked for a second but unfortunatly didn't)

Any hints on a way to use the fixed lib instead of the 2.0 ?

|
Mark as:
• Currently Being Moderated
Sep 20, 2011 3:07 AM   in reply to rr404

In my libraries projects the framework linkage is external.

In parallele in my app Project

1. rsl libraries in frameworks\libs are just copies of the libraries on the server. They are not linked in your runtime.

2. it should work that you change link configuration of sdk. But http://sourceforge.net/projects/tlf.adobe/files/2.1/6/textLayout2.0.0. 6.swz will be redirect to another place when you try to download the that swz...So the link showed on sourceforge cannot work. URL for SWZ should always be a direct link. Please wait for the RSL library on Adobe hosted server or you put RSL libraries on your own server.

|
Mark as:
• Currently Being Moderated
Sep 20, 2011 3:11 AM   in reply to bogdan_cs4

bogdan_cs4 wrote:

Hi.

I've noticed that TLF 3.0 was launched on sourceforge.

My question is: how can i update my flex sdk to use the new TLF?

I've copied the new folders of TLF 3.0 over the old ones but that does not help.

Any help is apreciated.

Thanks

If you set project as Merge-Into-Code, just place the textlayout.swc in folder \frameworks\libs.

If set as Runtime-Shared-Library, you need to change the URL in configuration file frameworks\flex-config.xml.

|
Mark as:
• Currently Being Moderated
Sep 21, 2011 12:06 AM   in reply to josh_on

I've copied the textLayout.swc file into the \frameworks\libs folder but i keep getting the same error.

Only now I can't see the content of the ContainerController class.

The stack trace only indicates that the error comes from the updateGraphics method.

Are you certain that there isn't anything else to do in order to make the TLF 3.0 work in the flex SDK?

Is there an Ant build neccesary?

|
Mark as:
• Currently Being Moderated
Sep 21, 2011 12:52 AM   in reply to bogdan_cs4

I'm sure.

Pls pay attention to my last reply and your configuration.  Did you set framework linkage of project as Merge-Into-Code? Have you cleaned your project and re-compile?

|
Mark as:
• Currently Being Moderated
Sep 21, 2011 1:21 AM   in reply to josh_on

Sorry for that.

My project is set to Runtime-Shared-Library.

What URL in particular do I have to modify?

<!-- TextLayout SWC -->

<runtime-shared-library-path>

<path-element>libs/textLayout.swc</path-element>

<rsl-url>textLayout_2.0.0.232.swz</rsl-url>

<policy-file-url></policy-file-url>

</runtime-shared-library-path>

Is it here somewhere?

I'm new to flex so please bare with my silly questions. I really appreaciate your help Jin.

|
Mark as:
• Currently Being Moderated
Sep 21, 2011 6:23 PM   in reply to bogdan_cs4

For now, there is no available rsl-url for 3.0 rsl library. We are applying for the access of http://fpdownload.adobe.com to upload 3.0 rsl library.

If you have your own server, you can put 3.0 swz on it and use your own url. The url must be direct.

|
Mark as:
• Currently Being Moderated
Apr 12, 2012 2:32 AM   in reply to josh_on

new issue at some point chat is blank, wipe and doesn't write any message. Before this happens i catch error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

at flashx.textLayout.compose::StandardFlowComposer/updateCompositionShap es()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\ compose\StandardFlowComposer.as:616]

at flashx.textLayout.compose::StandardFlowComposer/updateToController()[ C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\compo se\StandardFlowComposer.as:559]

at flashx.textLayout.container::ContainerController/updateForScroll()[C: \Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\contain er\ContainerController.as:1191]

at flashx.textLayout.container::ContainerController/set verticalScrollPosition()[C:\Vellum\dev\output\openSource\textLayout\s rc\flashx\textLayout\container\ContainerController.as:1057]

at flashx.textLayout.container::ContainerController/autoScrollIfNecessar yInternal()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\text Layout\container\ContainerController.as:1899]

at flashx.textLayout.container::ContainerController/autoScrollIfNecessar y()[C:\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\c ontainer\ContainerController.as:1869]

at flashx.textLayout.container::ContainerController/mouseMoveHandler()[C :\Vellum\dev\output\openSource\textLayout\src\flashx\textLayout\contai ner\ContainerController.as:2297]

I used flex builder 4.5.0. I am sure that i set all properties correct (Merge-Into-Code etc). So can i take source code this library? Maybe should i update flex builder etc. Please help us. Thank you.

|
Mark as:
• Currently Being Moderated
Apr 12, 2012 7:44 AM   in reply to zyatkov

You can download the source code from the link above. Copy the .as file into your project and remove the swc (I mean you compile your application with TLF code, not swc), you will know exactly which line failed.

|
Mark as:
• Currently Being Moderated
Jun 6, 2012 1:12 PM   in reply to Jin-Huang

In many of your post you keep saying that you can just host the libaray on your own server. Ive been trying to do that and i keep getting the following error...

Flex Error #1001: Digest mismatch with RSL http://www.domain.com/test/textLayout.swf. Redeploy the matching RSL or relink your application with the matching library.

|
Mark as:
• Currently Being Moderated
Jun 6, 2012 9:59 PM   in reply to Kevinsoffice

Without special settings, application can only take advantage of RSL with Adobe certificate, not test certificate. On SourceForge.net, RSLs are all with test certificate.

I just uploaded them. There is a delay. Maybe you want to wait for several hours.

|
Mark as:
• Currently Being Moderated
Jun 7, 2012 8:54 AM   in reply to Jin-Huang

I want to clarify, ive seen you mention a few times about the test certificate. But what does that exactly mean?

Are you saying that all textLayout version 3 and higher are only compiled using a test certificate which will NEVER work in a production environment?

If i download the .swz from the link above and host it on my server with my applet.swf the general public still can not run the applet?

If that is true, if it is not possible to use textLayout version 3 in a completed production ready applet then why is it even being offered for use? Granted it was nice of your team to fix the bugs and get a new version ready but if we cant use it... I feel frustrated because our project has already been coded using text flow v3 but if we cant offer it to the public then what was the point? All of that development was wasted as now we will need to downgrade back to mx components.

You jin huang have been helpful so dont take it personal, my frustration is towards the adobe company and their inefficient structure.

|
Mark as:
• Currently Being Moderated
Jun 7, 2012 8:59 AM   in reply to Jin-Huang

By the way... 11 hours after you have uploaded the files they are still not available.

I also do not understand how there is a "delay" in the uploading process.

Did you physically upload the files to the server or did you submit the files to someone else who will upload to the server?

|
Mark as:
• Currently Being Moderated
Jun 8, 2012 2:54 AM   in reply to Kevinsoffice

I have also uploaded the rsl to http://sourceforge.net/projects/tlf.adobe/files/3.0/current/rsl/. Do remember that the link of sourceforge.net cannot be the link for rsl in the configuration file, because there is a re-direction on that website.  For http://download.macromedia.com issue, I have communicated with related colleagues. Sorry for that delay. That server is an Adobe hosted server. It needs to be really cautious to upload something onto Adobe hosted server.

|
Mark as:
• Currently Being Moderated
Jun 8, 2012 8:33 AM   in reply to Jin-Huang

Thank you for the 2nd upload location, i was able to download the files. Yes my intention is to host the files myself as i would not expect my project to rely on the servers of someone else outside of my control.

However i am still wanting to know about the code signing issue.

Are these files signed with only test certificates? Is the swf and swz able to be used by the general public's version of flash player?

|
Mark as:
• Currently Being Moderated
Jun 8, 2012 9:25 AM   in reply to Jin-Huang

OMG, im about to go postal...

I just tried running my project using the new textLayout_3.0.0.29.swz and the error is back. The same error that exsisted in TLF2 which was fixed in version 3 is now back when using the swz. How did that happen? Was build 29 swz accidently compiled with version 2 code?

The error is when using textflow in a spark textarea. If you include an image with EditManager.insertInlineGraphic() an error happens once the graphic scrolls out of the visible area and into the scroll buffer. If i do not use textLayout_3.0.0.29.swz and only use the textLayout.swc from http://sourceforge.net/projects/tlf.adobe/files/3.0/current/textLayout _build.zip/download the error does not happen.

Why do you think the error happens with the swz but not when using the build 29 source directly?

Was there a mistake in building the swz? How can this be fixed?

However, depending on your answer about if build 29 swz was compiled with a test certificate or not, all of this might not matter if we can not use the swz at the production level.

---------- Error Given In Flash Builder ----------

TypeError: Error #1009: Cannot access a property or method of a null object reference.

at flashx.textLayout.compose::StandardFlowComposer/updateCompositionShap es()[C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\fl ashx\textLayout\compose\StandardFlowComposer.as:616]

at flashx.textLayout.compose::StandardFlowComposer/updateToController()[ C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\ textLayout\compose\StandardFlowComposer.as:559]

at flashx.textLayout.compose::StandardFlowComposer/updateAllControllers( )[C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flash x\textLayout\compose\StandardFlowComposer.as:517]

at flashx.textLayout.container::TextContainerManager/updateContainer()[C :\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\t extLayout\container\TextContainerManager.as:1343]

at spark.components::RichEditableText/updateDisplayList()[E:\dev\4.y\fra meworks\projects\spark\src\spark\components\RichEditableText.as:2974]

at mx.core::UIComponent/validateDisplayList()[E:\dev\4.y\frameworks\proj ects\framework\src\mx\core\UIComponent.as:8999]

at mx.managers::LayoutManager/validateClient()[E:\dev\4.y\frameworks\pro jects\framework\src\mx\managers\LayoutManager.as:1033]

at mx.core::UIComponent/validateNow()[E:\dev\4.y\frameworks\projects\fra mework\src\mx\core\UIComponent.as:8077]

at Main::ChatWindow$/displayChatText()[C:\Users\User\Flash Projects\ChatBroadcast\src\Main\ChatWindow.as:38] at Main::ServerListener$/msgFromUser()[C:\Users\User\Flash Projects\ChatBroadcast\src\Main\ServerListener.as:20]

|
Mark as:
• Currently Being Moderated
Jun 8, 2012 9:42 AM   in reply to Kevinsoffice

Firstly, those newly uploaded swz & swf are signed with Adobe certificate. So they are able to be used by the general public's version of flash player.  For the error, I think it's your fault. "C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flas hx\textLayout\container\ContainerController.as" is definitely the absolute path on your PC, right? You are compiling with 2.0 code. Please search in the forum for RSL configurations. You are supposed to change flex-config.xml, replace the swc and swf in SDK, replace the link for SWZ, and so on.

|
Mark as:
Previous Next
Actions

#### More Like This

• Retrieving data ...

#### Answers + Points = Status

• 10 points awarded for Correct Answers