Hi all,
I didn't want to let this problem pending so I ran tests and outputs ... and
I finally obtain a good result !
The function IntuiMsgFunc is required but that's not too mauch to write. It
was late yesterday when I tried and I realized I made a mistake porting the
example from the autodoc, swapping FileRequester and IntuiMessage ... too
bad !
If it can help, this is a working code . I just have to say that you must
set ASLFR_PrivateIDCMP to FALSE, else messages are not sent (so, not
received by IntuiMsgFucn). Here is the example that work with macros from
SDI_header (I only use these macros for months for a portability purpose).
HOOKPROTONH(IntuiMsgFunc, void, struct FileRequester *req, struct
IntuiMessage *imsg)
{
if (imsg->Class==IDCMP_REFRESHWINDOW)
DoMethod(req->fr_UserData, MUIM_Application_CheckRefresh);
}
MakeStaticHook(hook_IntuiMsgFunc, IntuiMsgFunc);
HOOKPROTONH(MenuFileOpen, ULONG, APTR obj, ULONG val)
{
struct FileRequester *fr;
char filename[ 256 ];
struct Window *win;
get(window, MUIA_Window_Window, &win);
fr = (struct FileRequester *)MUI_AllocAslRequestTags(ASL_FileRequest,
ASLFR_Window, win,
ASLFR_PrivateIDCMP, FALSE,
ASLFR_TitleText, "Select a document to open",
ASLFR_UserData , app,
ASLFR_IntuiMsgFunc , &hook_IntuiMsgFunc,
TAG_DONE);
if (fr){
if (MUI_AslRequestTags(fr, TAG_DONE)){
strcpy( filename, fr->fr_Drawer );
AddPart( filename, fr->fr_File, 256 );
set(docview, MUIA_DocView_FileName, filename);
}
MUI_FreeAslRequest(fr);
}
return 0;
}
MakeStaticHook(hook_MenuFileOpen, MenuFileOpen);
So, I can think about a release of my document reader soon ... a kind of
"more" that can display text, Wordorth files and ... even more !
About MUI 4, I hope exampes and autodocs will be updated. As I said, if
comments are welcomed, I can bring some things.
Regards;
--
Mathias PARNAUDEAU
------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups. Check out the enhanced email design.
http://us.click.yahoo.com/rlNZQC/gOaOAA/cosFAA/16uqlB/TM
--------------------------------------------------------------------~->
Visit http://www.amiga.dk/tumult for MUI-related
information, especially about MUI custom classes.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MUI/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/