Re: HTDialog ...

moi writes:
> I am using the libwww in Windows so I want to have dialog boxes to prompt user for informations...
> 
> In HTDialog.c there's some functions to redefine so I have done it :

The application can use the predefined versions of the Dialog messages but 
they are really just meant as an example to be used in the Line Mode browser. 
the app can invent it's own with completely different names. The only thing 
that's important is that as they are call back functions they must have be of 
the right type, that is HTAlert_callback which is defined in HTAlert.html. 
There's a bit more information about error handling at

	http://www.w3.org/devel/WWW/Library/User/Using/Error.html

> PUBLIC BOOL PromptDialog (HTRequest * request, HTAlertOpcode op,
> 				int msgnum, CONST char * dfault, void * input,
> 				HTAlertPar * reply)
> {
> 	if (msgnum == HT_MSG_FILENAME)
> 		{
> 		// filename to save
> 		... code to show my dialog box
> 		}
> }
> 
> 
> main (  )
>  {
> 	// .... some code 
> 
> 	HTAlert_add(PromptDialog, HT_A_PROMPT);
> 
> 	// rest of code ...
> 
> }
> 
> Doing that I was hoping to have my dialog box appear when an unknown MIME type was receive but instead all
> goes to an HTBlackHole ... without my box displayed !
> The trace give me this :
> -----------------------
> MIMEParser.. Convert image/x-xbitmap to www/present
> StreamStack. Constructing stream stack for image/x-xbitmap to www/present
> BlackHole... Created
> Read Socket. Target returns 29999
> ---------------------

Four things:

1) Have you set the Interactive mode to on in the HTAlert module? Use the 

	void HTAlert_setInteractive (BOOL interactive);
	BOOL HTAlert_interactive (void)

   methods to do this

2) Have you registered a "save locally" stream to dump it to local disk? 
Something like

    /*
    ** This dumps all other formats to local disk without any further
    ** action taken
    */
    HTConversion_add(c,"*/*", "www/present", HTSaveLocally, 0.3, 0.0, 0.0);

3) What does HTAlert_find return? Check what and if it returns soemthing

4) Try and run with all verbose output turned on then you will get information 
by the alert module.


-- 

Henrik Frystyk Nielsen, <frystyk@w3.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA

Received on Wednesday, 17 January 1996 13:41:31 UTC