[FlexJS] setDocument()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[FlexJS] setDocument()

Harbs
I have an app which uses OneFlexibleChildVerticalLayout. I have not built the app recently, and I noticed that it’s currently failing.

It seems like the error is in layout() from the following code:

actualChild = document[flexibleChild];

document is never being set, and I’m not sue what the purpose of “document” is at all. Why not just use flexibleChild?

Harbs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [FlexJS] setDocument()

yishayw
flexibleChild is a string, which is the id of the flexible child, so using it to reference the object won’t work. Document (which is a model of the MXML document) should be loaded at some point if it’s being used in mxml. I would put a condition to see whether it has been loaded already, and return if it hasn’t. The layout method should be called at least once after the document is loaded, so the logic would apply then.

If the document is never loaded then we have a bigger problem.

From: Harbs<mailto:[hidden email]>
Sent: Tuesday, May 23, 2017 10:21 PM
To: dev<mailto:[hidden email]>
Subject: [FlexJS] setDocument()

I have an app which uses OneFlexibleChildVerticalLayout. I have not built the app recently, and I noticed that it’s currently failing.

It seems like the error is in layout() from the following code:

actualChild = document[flexibleChild];

document is never being set, and I’m not sue what the purpose of “document” is at all. Why not just use flexibleChild?

Harbs

Loading...