{"id":215,"date":"2008-01-12T19:28:46","date_gmt":"2008-01-13T03:28:46","guid":{"rendered":"http:\/\/dougmccune.com\/blog\/2008\/01\/12\/why-doesnt-panel-extend-layoutcontainer\/"},"modified":"2008-01-12T19:28:46","modified_gmt":"2008-01-13T03:28:46","slug":"why-doesnt-panel-extend-layoutcontainer","status":"publish","type":"post","link":"https:\/\/dougmccune.com\/blog\/2008\/01\/12\/why-doesnt-panel-extend-layoutcontainer\/","title":{"rendered":"Why doesn&#8217;t Panel extend LayoutContainer?"},"content":{"rendered":"<p>As I&#8217;m doing some writing for the Flex for Dummies book I was digging into the source code for Panel and the other containers. I was writing about how Panel allows you to set the <code>layout<\/code> property to either <code>absolute<\/code>, <code>vertical<\/code>, or <code>horizontal<\/code>, just like LayoutContainer (or Application, which extends LayoutContainer). My initial thought was that Panel probably just extends LayoutContainer and that&#8217;s where we get the <code>layout<\/code> property from. But then digging in I saw that both LayoutContainer and Panel independently implement the <code>layout<\/code> property (in basically a cut and paste exact same way). Unless I&#8217;m missing something there&#8217;s no reason why Panel shouldn&#8217;t just extend LayoutContainer. (BTW, for a recent writeup of the LayoutContainer class see <a href=\"http:\/\/www.returnundefined.com\/2008\/01\/hidden-gem-of-the-flex-framework-layoutcontainer\">Ben Clinkinbeard&#8217;s post here<\/a>).<\/p>\n<p>If you look at the setter for the <code>layout<\/code> property it&#8217;s almost identical in both Panel and LayoutContainer. And take a look in <code>measure()<\/code> and <code>updateDisplayList()<\/code> and you&#8217;ll see the same calls to <code>layoutObject.measure()<\/code> and <code>layoutObject.updateDisplayList()<\/code>. <\/p>\n<p>So I dunno, just thought it was interesting. Really I&#8217;m just procrastinating while I&#8217;m supposed to be writing. \ud83d\ude1b OK, back to work&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I&#8217;m doing some writing for the Flex for Dummies book I was digging into the source code for Panel and the other containers. I was writing about how Panel allows you to set the layout property to either absolute, vertical, or horizontal, just like LayoutContainer (or Application, which extends LayoutContainer). My initial thought was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-215","post","type-post","status-publish","format-standard","hentry","category-flex"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/posts\/215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/comments?post=215"}],"version-history":[{"count":0,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/posts\/215\/revisions"}],"wp:attachment":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/media?parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/categories?post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/tags?post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}