John Labenski:

> This is something you override in include/wx/mac/carbon/app.h ?
> wxApp::MacOpenFile(filename)

Yes

> I see in src/mac/carbon/app.h they use it to open a document if there
> is a wxDocManager::GetDocumentManager().

I think that is the default implementation of it, right.

> Maybe we should create a new wxEvent, wxLuaMacOpenFilesEvent, that in
> wxLua you'd handle by having
>
> wx.wxGetApp():Connect(wx.wxID_ANY, wxEVT_WXLUA_MAC_OPEN_FILES,...)
>
> It's a little bit of a hack and I would prefer to keep as close to C++
> as possible, since that way we don't have too many gotcha's and can
> use their docs, but this is pretty clean.

Sounds good, and then wx lua programs will be able to use it too ?
There are four such AppleEvent handlers in total, all from app.h:

     // in response of an open-document apple event
     virtual void         MacOpenFile(const wxString &fileName) ;
     // in response of a print-document apple event
     virtual void         MacPrintFile(const wxString &fileName) ;
     // in response of a open-application apple event
     virtual void         MacNewFile() ;
     // in response of a reopen-application apple event
     virtual void         MacReopenApp() ;

--anders


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to