MXML學習紀錄三

2021-03-31 08:57:00 字數 520 閱讀 1156

@contextroot()的使用

   該引數好像只能在webservice或httpservice的標籤中使用,代表web應用訪問目錄.而在其他地方用就比較麻煩,  有兩種方法可以實現,一是使用event.result.serverurl,不過不一定有效,另乙個是使用geturl(相對路徑,'_self'),其結果可以訪問到相對與web應用主目錄下的檔案

mx:tree的使用

1.從後台取得的特定格式的xml資料,如

可以直接裝入mx:tree中使用

treemenu.dataprovider=txml.firstchild.childnodes;

2.mx:tree中的事件處理

事件屬性定義,如其中的change和nodeopen

另外script定義為

function changeevt(event)

function nodeopenevt(event)

上面的例子基本上可以得到tree所需的所對應的事件即資料

node實戰學習紀錄

1.url模組 2.querystring模組 序列化 querystring.stringify 第二個引數為可以替換 第三個引數為可以在後面增加東西 輸出結果為 name scott course jade course node from 此為沒增加引數的情況下 反序列化 querystrin...

C 學習紀錄 string容器 查詢

1 int find const string str,int pos 0 const查詢str第一次出現位置,從pos開始查詢 2 int find const char s,int pos 0 const 查詢s第一次出現位置,從pos開始查詢 3 int find const char s,i...

C 學習紀錄 string容器 賦值操作

string賦值操作 1 string operator const char s char 型別字串賦值給當前字串 2 string operator const string s string型別字串賦值給當前字串 3 string operator char c 把乙個字元c賦值給當前字串 4...