On Mon, 04 Sep 2006 10:16:30 +1000, Robert Poland <[EMAIL PROTECTED]> wrote:

Hi

I have the menu code in a module, so i call the module directly and not rely on the menu handler (the menu habdler just points to the module anyway). Seems to work fine from app.opendocument.

- mark d

Maybe I'm just spittin the wind but I hate the idea of re-creating (duplicating) all the methods used with the open command.

It appears that the module approach still won't access the methods in the main body.

Robert Poland
[EMAIL PROTECTED]


The code isn't duplicated, it is only in the whole application once - the module, then in the window's menuhandler, it calls the module, sorry should have said it more accurately in the earlier message.

I have:
menu FileOpen

in the main window, there is a FileOpen menuhandler and in that it says module1.opendoc()
exactly the same for the App.OpenDocument it has
module1.opendoc(item.absolutepath)

the module1.opendoc method handles everything including open file dialog if needed (like if not passed anything then prompt for a file).

works no worries on Windows, not too sure about Mac (do you have to do anything tricky with registering with Finder?)

As for not being able to access methods in your main body... i am not too sure what you mean (main body is main window?), there shouldn't be any reason they can't unless your main body methods are scoped private.

- markd

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to