[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ANNOUNCE : HelpViewer 0.1
From: |
Andreas Heppel |
Subject: |
Re: ANNOUNCE : HelpViewer 0.1 |
Date: |
Tue, 21 Jan 2003 11:14:48 +0100 |
Hi,
On 2003-01-20 18:35:10 +0100 Björn Giesler <giesler@ira.uka.de> wrote:
> Hi,
>
> On Monday 20 January 2003 17:57, you wrote:
>> Well you could put explicit tags in the .xlp file (with label) and refers
>> to them in the document ...
>> If we choose to use helpviewer.app for doing that context-sensitive help
>> (why not), we could use a similar mechanism as now (nsworkspace's
>> openfile), but we need to provide additional argument (the reference that
>> we want to display). Else we could end with some DO invocation.
>
> I think using HelpViewer for this doesn't seem to be such a good idea after
> all. The NSHelpManager API has
>
> - (NSAttributedString*) contextHelpForObject: (id)object;
> - (void) removeContextHelpForObject: (id)object;
> - (void) setContextHelp: (NSAttributedString*) help withObject: (id) object;
> - (BOOL) showContextHelpForObject: (id)object locationHint: (NSPoint) point;
Right, this API is absolutely not suited to use it with HelpViewer. What it
should do is pop up a small panel displaying a more or less short help text to
the selected UI object. Basically, this works in GNUstep, but...
>
> ...so everything is done via object pointers, and the returned value is an
> attributed string. I see no way to make an object pointer into an ascii tag
> that could be read from a .xlp file (is there any?), and the returned
> attibuted string suggests that the application opens its own NSTextView.
> Which I don't like, because it raises issues such as scrolling, navigation,
> images etc., plus adds code bloat.
You don't have to care about that. It's GNUstep's task to provide a suitable
panel to display the text (at least when using - showContextHelpForObject::).
Problem here is, that it does not really work. I just tried it and found two
issues: the help text does not display because the NSTextView is set to be
non-editable and there is an issue with a modal run loop, leading to an
exception when the app closes. Thus, the current implementation is not really
usable.
The problem in using HelpViewer for this kind of thing is that you would have
to do it yourself completely, since there is no GNUstep support. If you replace
NSResponder's method - (void) helpRequested: (NSEvent*)theEvent you could call
HelpViewer from here (maybe using DO).You could do this using a new category
for NSResponder that replaces the original implementation of this method.
If HelpViewer now provided a DO method to display some text bound to a tag you
are there. The only thing needed is a meaningful identifier for the UI
elements. If in doubt one can set up a map for this (or misuse NSHelpManager's
contextHelpForObject ;-) .
Any comments?
Cheers,
Andreas
--
Andreas Heppel
Mail: aheppel at web dot de
Home: http://www.andreasheppel.de
Check out GSburn.app - the CD burning frontend for GNUstep
http://gsburn.sourceforge.net
- Re: ANNOUNCE : HelpViewer 0.1, Björn Giesler, 2003/01/20
- Re: ANNOUNCE : HelpViewer 0.1,
Andreas Heppel <=
- Re: ANNOUNCE : HelpViewer 0.1, Nicolas Roard, 2003/01/21
- Re: ANNOUNCE : HelpViewer 0.1, Andreas Heppel, 2003/01/21
- Re: ANNOUNCE : HelpViewer 0.1, Jeff Teunissen, 2003/01/21
- Re: ANNOUNCE : HelpViewer 0.1, Nicolas Roard, 2003/01/21
- Re: ANNOUNCE : HelpViewer 0.1, ibotty, 2003/01/21
- Re: ANNOUNCE : HelpViewer 0.1, ibotty, 2003/01/21
- Re: ANNOUNCE : HelpViewer 0.1, Andreas Heppel, 2003/01/22
- Re: ANNOUNCE : HelpViewer 0.1, Nicolas Roard, 2003/01/22
- Re: ANNOUNCE : HelpViewer 0.1, Nicolas Roard, 2003/01/22
- Re: ANNOUNCE : HelpViewer 0.1, Andreas Heppel, 2003/01/22