Skip to main content
April 6, 2009
Question

Some bugs encountered. Code attached.

  • April 6, 2009
  • 1 reply
  • 901 views

Dear Sirs,

I would like to report some bugs encountered in recent days. For more precision, the code of examples is attached in post.

Problem: ContentHeight totally crazy

ContentHeight is crazy, at the moment that adds new container.

Reproduce:

1. Run the code

2. Set focus to end of text

3. Click in button "Add Image"

Look the containerHeight's label, is totally crazy (for me, is displayed 266798px).

Problem: Inline Graphic with float, disappears?

When insert graphic with float (left or right), just disappears.

Reproduce:

1. Run the code

2. Click in button "Add Image (Float left)"

Where is the graphic?

Problem: ContentHeight is limited, when verticalScrollPolicy = ScrollPolicy.OFF

Even if you put a higher content, the containerHeight is limited to container height.

Reproduce:

1. Run de code

2. s tSet focuo in container

2. Click in button "Scroll OFF"

Verify that the containerHeight's label, displays the maximus height of the container, but its content is bigger than it.

Thanks in advance.

- Marcos

This topic has been closed for replies.

1 reply

Adobe Employee
April 7, 2009

I will look into the value you are getting back for contentHeight. One thing to note is that contentHeight is an estimated value. TLF will compose as much text as fits in the container, but if it is a scrollable container, and there is more text outside the container, then what is returned is an estimation based on text size of the text that fits. I'm not sure that explains what you're seeing, but it's something to be aware of. To get a fully accurate contentHeight or contentWidth, you have to call compose prior to getting contentHeight/contentWidth.

Unfortunately floats are not yet fully implemented, so I would suggest not depending on them. Right now we are consolidating -- cleaning up APIs, fixing bugs, etc., and won't look at new features such as floats until that's completed.

Your third point was about contentHeight being limited by compositionHeight when scrolling is OFF. This is by design. The idea is that the remaining text can flow into the next container. If you want the container to size itself to fit the text, set the compositionHeight to NaN.

I hope this helps. Thanks for reporting these problems!

- robin

April 8, 2009

Even though the contentHeigh size is estimated between 800px (text size used) and 266798px there is a great difference. This problem only occurs when there are images in place.

Thanks for looking this.

- Marcos