Hi, I'm developing an application for sugar, and the problem is that I want different behaviours depending on the execution of my app:<div><br></div><div>- when my app is opened through the icon of lower menu, I want a filechooser to appear, so I can choose which file to open.</div>
<div>- when somebody downloads a .jclic.zip file, and clicks in the option resume with my app (I have made my app appear as an option to resume using mime _types), I don't want the filechooser, I want my app to open directly that file</div>
<div><br></div><div>To do this, I've reading the wiki (which is a bit confusing) and I learned that I have to play with the read_file and write_file options. What I've done is what I write next (with the consequent problems):</div>
<div><br></div><div>- in the init method of my app, I do the the acticity.Activity.__init__ and then I create the filechooser, I choose the file and then load, I guess i shouldn't do it like this, because when my app is executed through the read_file method, first this __init__ method is called, showing me the filechooser which I don't want!</div>
<div><br></div><div>- another problem is that the read_file filename parameter, gives me the path of the journal file copy, which is not a .jclic,zip file, then is not the file that I want.</div><div><br></div><div>So my questions are:</div>
<div><br></div><div>- how to organize my code to get the behabiour that I want?</div><div>- how to get the real path?</div><div><br></div><div>And finally, I've got another problem which is not as important as the ones before, but if I get an asnwer I would really grateful. When I open the filechooser which is made with and wx.app, which it also has an wx.frame, then I choose the file, but I don't get the window closed and the execution returned to the main app. The window stays opened without showing anything (a grey window).</div>
<div><br></div><div>Thank you for everything, maybe the questions are a bit basic, but as I said, is really hard to find some documentation in the olpc wiki. Bye!</div><div><br></div><div><br></div>