2011-05-02 72 views
2

我試圖使用chromeColor的(或其他火花風格相關的項目)時,爲什麼我收到一個錯誤弄清楚:柔性 - 火花風格還沒有成型火花是當前主題

  <s:Button x="10" y="208" label="CALL" width="185" fontWeight="bold" id="bCall" chromeColor="#F90000"/> 

這是錯誤:

The style 'chromeColor' is only supported by type 'spark.components.Button' with the theme(s) 'spark'. 

然而,在項目屬性中,主題設置爲Spark。我也嘗試將它設置爲暈,然後回到星火。

這裏是我的應用程序定義:

<?xml version="1.0" encoding="utf-8"?> 
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
      xmlns:s="library://ns.adobe.com/flex/spark" 
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="800" minHeight="600" width="100%" height="100%"> 

我已經看到了定義MX命名空間的引用 「的xmlns:MX =」 庫://ns.adobe.com/flex/halo」,但隨後我的MX組件破裂(TabNavigator的舉例) - 不知道這會解決它安韋

我正在使用Flex 4.1庫(我相信當Flex Builder中是在4.0,如果該事項項目最初創建) 沒有。其他庫包括在內 項目屬性設置爲MX + Spark

另外,如果我刪除chromeColor的,項目編制,但有警告,如:

The style 'borderAlpha' is only supported by type 'spark.components.TitleWindow' with the theme(s) 'spark'. Flex Problem 

(和其他人 - BORDERCOLOR,cornerRadius,dropShadowVisible)

回答

2

我終於找到了 - 我有一個編譯器標誌集引用MX /暈,我把它拿出來,現在它工作正常。當我嘗試在項目中使用一些與光環相關的代碼時,我可能會這樣做。

+2

你介意對此進行闡述嗎?我目前在我的代碼中似乎有一個相關的問題... http://xkcd.com/979/ – finalman 2012-10-26 14:09:24

0

兩個問題我看到:

  1. chromeColor不是documented style of the Button class
  2. borderAlpha不是documented style of the titleWindow class

    您所看到的錯誤確實聽起來有誤導性,但是您認爲您可以使用這些樣式的原因是什麼?

「正確」的方法來改變在titleWindow正在邊境阿爾法將創建一個自定義皮膚。我認爲chromeColor也是如此[但對我來說這不是很明顯,應該做什麼]。

+0

更好的是,我沒有編寫任何代碼來設計titleWindow風格!警告將出現在比我的應用中的代碼行數更高的行號上!對於按鈕上的chromeColor,再次,我沒有輸入 - Flex Builder在設計視圖中單擊該按鈕時生成它,並使用顏色選擇器更改按鈕的顏色。 – 2011-05-04 11:05:59