File AppWindow.xml changed (mode: 100755) (index 81e5404..ac82708) |
15 |
15 |
|
|
16 |
16 |
<window id="win" muiid="MAIN" title="IvoRSS" screentitle="IvoRSS 0.1" notify="closerequest" menustrip="mainstrip" appwindow="true"> |
<window id="win" muiid="MAIN" title="IvoRSS" screentitle="IvoRSS 0.1" notify="closerequest" menustrip="mainstrip" appwindow="true"> |
17 |
17 |
<hgroup> |
<hgroup> |
18 |
|
<listview id="lv3" frame="readlist" notify="appmessage"><column/></listview> |
|
|
18 |
|
<listview id="lv3" frame="readlist" notify="appmessage" weight="50"><column/></listview> |
19 |
19 |
<vgroup> |
<vgroup> |
20 |
20 |
<text id="channel_title" PreParse="\33b"></text> |
<text id="channel_title" PreParse="\33b"></text> |
21 |
21 |
<text id="channel_description"></text> |
<text id="channel_description"></text> |
22 |
|
<listview id="lv1" frame="readlist" notify="appmessage"><column/></listview> |
|
23 |
|
<floattext id="textfield" weight="50" background="readlistback" tabsize="4" justify="true"> |
|
|
22 |
|
|
|
23 |
|
<listview id="articles" notify="appmessage"> |
|
24 |
|
<column title="Title"/> |
|
25 |
|
<column title="PubDate"/> |
|
26 |
|
<column title="Category"/> |
|
27 |
|
|
|
28 |
|
</listview> |
|
29 |
|
<floattext id="textfield" background="readlistback" tabsize="4" justify="true"> |
24 |
30 |
|
|
25 |
31 |
</floattext> |
</floattext> |
26 |
32 |
|
|
File IvoRSS.hws changed (mode: 100755) (index 08af059..47ae817) |
... |
... |
mui.Set("textfield", "Text", text$) |
60 |
60 |
channel_level = True |
channel_level = True |
61 |
61 |
current_element$ = Nil |
current_element$ = Nil |
62 |
62 |
|
|
|
63 |
|
current_item = {title="", pubdate="", category=""} |
63 |
64 |
|
|
64 |
65 |
Function StartElement(p, name$, attrs) |
Function StartElement(p, name$, attrs) |
65 |
66 |
current_element$ = name$ |
current_element$ = name$ |
66 |
67 |
|
|
67 |
|
|
|
68 |
|
|
|
69 |
68 |
If name$ = "item" Then channel_level = False |
If name$ = "item" Then channel_level = False |
70 |
69 |
|
|
71 |
70 |
|
|
|
... |
... |
Function StartElement(p, name$, attrs) |
77 |
76 |
EndFunction |
EndFunction |
78 |
77 |
|
|
79 |
78 |
Function EndElement(p, name$) |
Function EndElement(p, name$) |
80 |
|
current_element$ = Nil |
|
|
79 |
|
current_element$ = nil |
|
80 |
|
If name$ = "item" |
|
81 |
|
mui.DoMethod("articles", "Insert", "Bottom", |
|
82 |
|
current_item.title, |
|
83 |
|
current_item.pubdate, |
|
84 |
|
current_item.category) |
|
85 |
|
current_item = {title="", pubdate="", category=""} |
|
86 |
|
EndIf |
81 |
87 |
EndFunction |
EndFunction |
82 |
88 |
|
|
83 |
89 |
|
|
|
... |
... |
Function CharacterData(p, str$) |
85 |
91 |
If channel_level |
If channel_level |
86 |
92 |
If current_element$ = "title" Then mui.Set("channel_title", "Contents", str$) |
If current_element$ = "title" Then mui.Set("channel_title", "Contents", str$) |
87 |
93 |
If current_element$ = "description" Then mui.Set("channel_description", "Contents", str$) |
If current_element$ = "description" Then mui.Set("channel_description", "Contents", str$) |
|
94 |
|
|
|
95 |
|
else |
|
96 |
|
If current_element$ = "title" Then current_item.title = str$ |
|
97 |
|
If current_element$ = "pubDate" Then current_item.pubdate = str$ |
|
98 |
|
If current_element$ = "category" |
|
99 |
|
If current_item.category = "" |
|
100 |
|
current_item.category = str$ |
|
101 |
|
Else |
|
102 |
|
current_item.category = current_item.category .. ", " .. str$ |
|
103 |
|
EndIf |
|
104 |
|
Endif |
88 |
105 |
EndIf |
EndIf |
89 |
106 |
EndFunction |
EndFunction |
90 |
107 |
|
|
91 |
108 |
|
|
92 |
109 |
p = XMLParser.New({StartElement = StartElement, EndElement=EndElement, CharacterData = CharacterData}) |
p = XMLParser.New({StartElement = StartElement, EndElement=EndElement, CharacterData = CharacterData}) |
93 |
|
Assert(p:Parse(text$)) |
|
|
110 |
|
p:Parse(text$) |
94 |
111 |
p:Close() |
p:Close() |
95 |
112 |
|
|
96 |
113 |
|
|