Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!THUMPER.BELLCORE.COM!nsb From: nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) Newsgroups: comp.soft-sys.andrew Subject: Re: Meta-X package Message-ID: Date: 27 Jul 90 13:53:36 GMT References: <4afmYTa00VsPA=FG0C@andrew.cmu.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 29 Excerpts from internet.info-andrew: 26-Jul-90 Re: Meta-X package Fred Hansen@andrew.cmu.e (940+0) >> OK, I'll bite. Where's the code that prompts for a folder name if, say, >> you have "messages-classify-by-name" bound to a key or menu item, and >> you invoke it through a key sequence or menu item, rather than from >> Ness? > I must admit I didn't check to see if messages-classify-by-name prompted > for the folder name. Apparently this function is meant to be called > with one of the messages-compound-... operations which permit calling > functions and passing arguments in a fairly ad hoc and undocumented > manner. I think you're looking for the last 4 functions defined in atkams/messages/lib/ams.c. This is an example of using the completion package, in this case for folder name completion. In this case, it can't be made to take an argument, I believe. However, in general you can exploit the (undocumented) fact that when you call a proctable entry from an init file and do NOT pass an argument to it, the argument is NULL. Thus you can write a proctable entry that interacts with the user if & only if that parameter is NULL. For an example of a function that does this successfully, look in atkams/messages/lib/sendaux.c, at the code that implements the ^O function in the sending window. This is bound to the procedure UserWantsAHeader. If no arguments are passed, it will prompt the user for the header, otherwise it will use what is passed in.