Return-Path: X-Original-To: apmail-incubator-flex-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AA57E45E for ; Mon, 3 Dec 2012 17:18:47 +0000 (UTC) Received: (qmail 68803 invoked by uid 500); 3 Dec 2012 17:18:46 -0000 Delivered-To: apmail-incubator-flex-users-archive@incubator.apache.org Received: (qmail 68594 invoked by uid 500); 3 Dec 2012 17:18:46 -0000 Mailing-List: contact flex-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-users@incubator.apache.org Delivered-To: mailing list flex-users@incubator.apache.org Received: (qmail 68576 invoked by uid 99); 3 Dec 2012 17:18:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2012 17:18:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.160.175] (HELO mail-gh0-f175.google.com) (209.85.160.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2012 17:18:39 +0000 Received: by mail-gh0-f175.google.com with SMTP id z2so437305ghb.6 for ; Mon, 03 Dec 2012 09:18:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=SLxQ5fpynuX4p0Tnl1sumulTqSojWLD6mu2/c90jycU=; b=Q5/9m0edyIluUk7KEbyULRipAPU9pqe2zbYS5PYBjAG5JqAyDlxTdKvPBRAOLaLke5 NPyRJOSj6V7mgADWJnI+DhEt/WWKwurJdjyDBU+ZD9Q9Qpvd5SyC5+pLrBb4nOUQOPTd 0CbDEXObOLycUVQwcXrGHdptbLaPSEcOo4IFU38nix14icXt6D2vGJR/v2/MZFaDIzf9 Rf6MFrMSSkrBvhoXLnDaDitAZCA0oqIbY2voEV5QHL7sQhEw/r51pRe0vGzn1xkgAwVg is3kVNwerg4/xNOmw7Fg6B0bYKQc3FWp9MAgSvafePLj2zb5d29p8fd67RofP/GP05CM mYFw== MIME-Version: 1.0 Received: by 10.236.48.8 with SMTP id u8mr11292772yhb.99.1354555098296; Mon, 03 Dec 2012 09:18:18 -0800 (PST) Received: by 10.146.42.11 with HTTP; Mon, 3 Dec 2012 09:18:18 -0800 (PST) X-Originating-IP: [24.212.163.38] In-Reply-To: References: Date: Mon, 3 Dec 2012 12:18:18 -0500 Message-ID: Subject: Re: Using FlexGlobals.topLevelApplication in class init code (or: "how do you set default styles for an AS3 component?") From: Russell Warren To: flex-users@incubator.apache.org Content-Type: multipart/alternative; boundary=bcaec50b4a2a76720304cff5efe9 X-Gm-Message-State: ALoCoQkjFv+iF1KR2wo7vRPy7XgSdwWH4prIbmh81P2EjNqqgth7urBa37KnWucsvr6XUl2UyuNs X-Virus-Checked: Checked by ClamAV on apache.org --bcaec50b4a2a76720304cff5efe9 Content-Type: text/plain; charset=ISO-8859-1 Well, scratch this part of my response already: > > Interesting/awesome - I changed the code to > use StyleManager.getStyleManager(null) and what was broken is now > functioning again: > http://static.inky.ws/syn/631 > > Will this be "guaranteed to work" in a class initializer (whereas > FlexGlobals won't), or am I rolling the dice again here? > The code has already broken again. StyleManager.getStyleManager(null) does not appear reliable either. It is failing internally on this line: moduleFactory = SystemManagerGlobals.topLevelSystemManagers[0]; which appears to be the same execution ordering issue as with FlexGlobals. I'll remove any attempt at default style setting for now, and ensure I have CSS type selectors in place. I'm still very curious how you (or if you can) set the default value in absence of css, though. Russ --bcaec50b4a2a76720304cff5efe9--