47 |
self.Destroy() |
self.Destroy() |
48 |
event.Skip() |
event.Skip() |
49 |
|
|
50 |
def load_content(self): |
|
51 |
self.payload = self.engine.listItems('xmlpage') |
|
52 |
if self.payload: |
|
|
print "Done!" |
|
53 |
#def load_content(self): |
#def load_content(self): |
54 |
# self.topicid = int(self.GetName()) |
# self.topicid = int(self.GetName()) |
55 |
# self.topicmeta = self.engine.getTopicById(self.topicid) |
# self.topicmeta = self.engine.getTopicById(self.topicid) |
91 |
list_item = self.listViewMain.GetItem(list_selection) |
list_item = self.listViewMain.GetItem(list_selection) |
92 |
#wxMessageBox(str(item.GetData())) |
#wxMessageBox(str(item.GetData())) |
93 |
idx = list_item.GetData() |
idx = list_item.GetData() |
94 |
item = self.payload[idx] |
entries = self.payload['1'] |
95 |
|
|
96 |
|
item = entries[str(idx)] |
97 |
|
|
98 |
# create new MDI frame |
# create new MDI frame |
99 |
frame = FraggleItemFrame.create(self.parent) |
frame = FraggleItemFrame.create(self.parent) |
100 |
frame.SetName(str(idx)) |
frame.SetName(str(idx)) |
101 |
frame.SetTitle(item['keyname']) |
frame.SetTitle(str("Item No."+item['id'])) |
102 |
|
|
103 |
# calculate new position (right lower offset of 15px to us) |
# calculate new position (right lower offset of 15px to us) |
104 |
pos = self.GetPosition() + wxPoint(25, 25) |
pos = self.GetPosition() + wxPoint(25, 25) |
107 |
|
|
108 |
# patch topic metadata to point to an item instead of a list |
# patch topic metadata to point to an item instead of a list |
109 |
# use keyname as query argument |
# use keyname as query argument |
110 |
topicmeta = self.topicmeta |
#topicmeta = self.topicmeta |
111 |
topicmeta['result'] = 'item' |
#topicmeta['result'] = 'item' |
112 |
topicmeta['target']['arguments'] = item['keyname'] |
#topicmeta['target']['arguments'] = item['keyname'] |
113 |
frame.load_content(topicmeta) |
#frame.load_content(topicmeta) |