History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-781
Type: New Feature New Feature
Status: Open Open
Priority: P2 P2
Assignee: Unassigned
Reporter: Antun Karlovac
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Warning for nesting views in views with stretches="both"

Created: 07/Oct/05 10:33 AM   Updated: 31/Jan/08 01:45 PM
Component/s: Compiler - Warnings
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Severity: Minor
Runtime: N/A


 Description  « Hide
There should be a compiler warning when you do:

<view resource="foo" stretches="both">
    <view />
</view>

Nesting views in other views that have stretches set to both|width|height causes undefined behavior and is not supported.

-Antun

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jim Grandy - 02/Nov/05 03:19 PM
If this is true, we should update the ref as well:

"Setting stretches causes a view to change its coordinate space so that everything it contains (resources and other views) fit exactly into the view's width and/or height. The default for this property is "none". This is used to resize a view's contents by setting its width and/or height"

I'll add a doc bug for this.

Antun Karlovac - 20/Jul/06 12:49 PM
This is true, and it catches developers out *all* the time. It's extremely frustrating, because there are no warnings or errors thrown.

Is there any way we could get this compiler warning added in - and/or maybe even a run-time warning?

-Antun

P T Withington - 31/Jan/08 09:02 AM
I guess what you are referring to here is that if you have a resource and dimension and stretches, then the resource is scaled to fit the specified dimension. Due to the way SWF works, any subviews will be scaled by the _same_ scaling factor, which is probably not what the user wants or expects.

We _could_ fix this, I think, by unscaling the subviews, which is the way things work in DHTML... But, I am also happy to just say you shouldn't do this.


Antun Karlovac - 31/Jan/08 01:45 PM
I don't think this is an issue any more. The scaling works now (see my post: http://www.antunkarlovac.com/blog/?p=33).

It was a bug before, because things wouldn't scale; they'd just look all wrong.