1. wxIDE & EuHTHelp.exw

Matt,

I have been playing arround with Juergen's external euphoria
hypertext help utility program.  Its really very simple to use -

executing"
EuHTHelp.exw <search_string>

opens a browser to the appropriate "article" in the 
euphoria *.htm documentation.

Shouldn't it be fairly easy to add this functionality
to wxIDE either by passing a search string to EuHTHelp
using system_exec - or perhaps even incoporating
Juergen's search code directly into wxIDE existing
*.htm documentation help?

I'm thinking along the lines of instant hypertext help
with one key stroke - for example:  if the function key
F11 is not assigned - after entering the word "printf",
immediately pressing F11 the editor will either shell out
to EuHTHelp.exw which will launch an external browser of choice,
or the editor will open its native euphoria.htm help window
to the article for "system_exec.

Pete seemed to feel this could not easily be done with
Edita - perhaps I'm missing something. My guess is that
it should only take several lines of simple code to 
pass the search string for the current "word" in the editor
to EuHTHelp.exw using system_exec.

But maybe I am wrong - after all, I get lost and frustrated
very quickly trying to study the mountains of code involved
in almost any GUI project. sad

Thanks again for all your work with wxEuphoria!




Ken Rhodes
100% MicroSoft Free
SuSE Linux 10.0
No AddWare, SpyWare, or Viruses!
Life is Good  smile

new topic     » topic index » view message » categorize

2. Re: wxIDE & EuHTHelp.exw

On Sat, 04 Feb 2006 16:59:15 -0800, Kenneth Rhodes
<guest at RapidEuphoria.com> wrote:

>Pete seemed to feel this could not easily be done with
>Edita - perhaps I'm missing something. My guess is that
>it should only take several lines of simple code to 
>pass the search string for the current "word" in the editor
>to EuHTHelp.exw using system_exec.
>
>But maybe I am wrong
You're right, you're wrong blink)
I need to either de-win32lib Brians' wrap of hhctrl.ocx to use a chm
file and/or wrap the WinHelp API to use .hlp files. I have searched
the archives and cannot find much evidence of success with it.
Otherwise it will just open on the index.

What I have done is allow edita.ini to contain extra entries in the 
tools section like this:
[tools]
  Database Viewer:tedb
  Verify edita.edb:vedb
  F1 Jockey:E:\Euphoria\html\f1jockey.hlp
  Euphoria.chm:E:\Euphoria\html\Euphoria.chm

(The current version tries to open f1jockey.hlp.exw etc)
I suppose I should also add an "Edit Tools" option somewhere.
When I get the time that is..

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

3. Re: wxIDE & EuHTHelp.exw

Pete Lomax wrote:
> 
> On Sat, 04 Feb 2006 16:59:15 -0800, Kenneth Rhodes
> <guest at RapidEuphoria.com> wrote:
> 
> >Pete seemed to feel this could not easily be done with
> >Edita - perhaps I'm missing something. My guess is that
> >it should only take several lines of simple code to 
> >pass the search string for the current "word" in the editor
> >to EuHTHelp.exw using system_exec.
> >
> >But maybe I am wrong
> You're right, you're wrong blink)
> I need to either de-win32lib Brians' wrap of hhctrl.ocx to use a chm
> file and/or wrap the WinHelp API to use .hlp files. I have searched
> the archives and cannot find much evidence of success with it.
> Otherwise it will just open on the index.
> 

I appreciate your patience, Pete. Please help me understand  -
if system or system_exec can be executed from within Edita,
then all that is required to use Juergen's program is little
more than this line of code:

if CONTEXT_SENSITIVE_HELP_KEY then
 VOID = system_exec("EuHTHelp.exw" & " " & search_term, 0)
end if


"search_term" is a sequence containing the current "word" just typed
into the editor.  EuHTHelp.exw prepends the path of the relevant *.htm
doucumentation file as well as "#" to "search_term" - this path is
appended to the execution path of the user's browser of choice and
"executed" by system_exec(). Juergen developed EuHTHelp.exw under
DOS/WINDOWS, but it is generic code.

None of that complicated Windows stuff is required - just a browser.

Juergen placed his code in the public domain.  You can modify a 
couple of lines and paste it directly into Edita -r wxIDE for that
matter:

if CONTEXT_SENSITIVE_HELP_KEY then
 ** EuHTHelp code **
end if


So, as you can see, I'm still in a state of denial about being
wrong on this. smile
 
Regards,

Ken Rhodes
100% MicroSoft Free
SuSE Linux 10.0
No AddWare, SpyWare, or Viruses!
Life is Good  smile

new topic     » goto parent     » topic index » view message » categorize

4. Re: wxIDE & EuHTHelp.exw

Or how about this - I edited EuHTHelp.exw slightly to make it
an include file called euhelp_engine.e. with one global function:
EuHTHelp(sequence word)

It really doesn't get much easier than this to use..

include euhelp_engine.
if CONTEXT_SENSITIVE_HELP_KEY then EuHTHelp(word) endif


I also separated the topic constants into euhelp_topics.e which
is included by euhelp_engine.e.  Euhelp_topics.e can be edited
when ever new features are added to the language.  Library developers
may even want to amend Euhelp_topics.e to provide support for their
specialised libraries - the relevant *.htm help file would need to
be placed in the Euphoria html directory.

I'll post what I've done to Juergen and see if he is interested
in incorporating the code or concepts in his official release.
Basically, all I have done is fiddle with his code a bit.  blink

Thanks, Juergen!


Ken Rhodes
100% MicroSoft Free
SuSE Linux 10.0
No AddWare, SpyWare, or Viruses!
Life is Good  smile

new topic     » goto parent     » topic index » view message » categorize

5. Re: wxIDE & EuHTHelp.exw

Kenneth Rhodes wrote:

> Pete Lomax wrote:
> > 
> > On Sat, 04 Feb 2006 16:59:15 -0800, Kenneth Rhodes
> > <guest at RapidEuphoria.com> wrote:
> > 
> > >Pete seemed to feel this could not easily be done with
> > >Edita - perhaps I'm missing something. My guess is that
> > >it should only take several lines of simple code to 
> > >pass the search string for the current "word" in the editor
> > >to EuHTHelp.exw using system_exec.
> > >
> > >But maybe I am wrong
> > You're right, you're wrong blink)
> > I need to either de-win32lib Brians' wrap of hhctrl.ocx to use a chm
> > file and/or wrap the WinHelp API to use .hlp files. I have searched
> > the archives and cannot find much evidence of success with it.
> > Otherwise it will just open on the index.
> > 
> 
> I appreciate your patience, Pete. Please help me understand  -
> if system or system_exec can be executed from within Edita,
> then all that is required to use Juergen's program is little
> more than this line of code:
> 
> }}}
<eucode>
> if CONTEXT_SENSITIVE_HELP_KEY then
>  VOID = system_exec("EuHTHelp.exw" & " " & search_term, 0)
> end if
> </eucode>
{{{

> 
> "search_term" is a sequence containing the current "word" just typed
> into the editor.  EuHTHelp.exw prepends the path of the relevant *.htm
> doucumentation file as well as "#" to "search_term" - this path is
> appended to the execution path of the user's browser of choice and
> "executed" by system_exec(). Juergen developed EuHTHelp.exw under
> DOS/WINDOWS, but it is generic code.
> 
> None of that complicated Windows stuff is required - just a browser.
> 
> Juergen placed his code in the public domain.  You can modify a 
> couple of lines and paste it directly into Edita -r wxIDE for that
> matter:
> 
> }}}
<eucode>
> if CONTEXT_SENSITIVE_HELP_KEY then
>  ** EuHTHelp code **
> end if
> </eucode>
{{{

> 
> So, as you can see, I'm still in a state of denial about being
> wrong on this. smile

I also do not see the problem (except that Pete might do not like this
way of showing help, and has some other special stuff in mind that
he wants to implement).

> Regards,
> 
> Ken Rhodes
> 100% MicroSoft Free
> SuSE Linux 10.0
> No AddWare, SpyWare, or Viruses!
> Life is Good  smile

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

6. Re: wxIDE & EuHTHelp.exw

Kenneth Rhodes wrote:

> Or how about this - I edited EuHTHelp.exw slightly to make it
> an include file called euhelp_engine.e. with one global function:
> EuHTHelp(sequence word)
> 
> It really doesn't get much easier than this to use..
> 
> }}}
<eucode>
> include euhelp_engine.
> if CONTEXT_SENSITIVE_HELP_KEY then EuHTHelp(word) endif
> </eucode>
{{{


Huuu ... smile  Very cool idea!

> I also separated the topic constants into euhelp_topics.e which
> is included by euhelp_engine.e.  Euhelp_topics.e can be edited
> when ever new features are added to the language.  Library developers
> may even want to amend Euhelp_topics.e to provide support for their
> specialised libraries - the relevant *.htm help file would need to
> be placed in the Euphoria html directory.
> 
> I'll post what I've done to Juergen and see if he is interested
> in incorporating the code or concepts in his official release.
> Basically, all I have done is fiddle with his code a bit.  blink
> 
> Thanks, Juergen!

What you are writing sounds very interesting. Thank *you*, Kenneth!

> Ken Rhodes
> 100% MicroSoft Free
> SuSE Linux 10.0
> No AddWare, SpyWare, or Viruses!
> Life is Good  smile

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

7. Re: wxIDE & EuHTHelp.exw

Pete Lomax wrote:
> 
> I need to either de-win32lib Brians' wrap of hhctrl.ocx to use a chm
> file and/or wrap the WinHelp API to use .hlp files. I have searched
> the archives and cannot find much evidence of success with it.
> Otherwise it will just open on the index.
> 

I use the htmlhelp facilities of windows in Tbrowse, which is part of
EuCOM.  To simply open something up is fairly easy if you know the
context index.  Below is the relevant code that is used (there is
a COM call that gets the file and the context.

-- HtmlHelp function for opening context sensitive help
constant 
hh = open_dll( "hhctrl.ocx" ),
HtmlHelp = define_c_func( hh, "HtmlHelpA", {C_UINT, C_POINTER,
	C_UINT, C_LONG}, C_LONG),
HH_DISPLAY_TOPIC = 0,
HH_HELP_CONTEXT = #F	 

-- see if there is a helpfile
helpfile = invoke( {memberinfo, mi_vtbl}, {"HelpFile"}, {},{},
	DISPATCH_PROPERTYGET )
if length( helpfile ) then	 
	-- get the helpcontext
	helpcontext = invoke( {memberinfo, mi_vtbl}, {"HelpContext"},
		{}, {}, DISPATCH_PROPERTYGET )
	
	if HtmlHelp = -1 then 
		warnErr( "Couldn't open HtmlHelp (hhctrl.ocx)")
	else
		-- open the help file to the right spot
		pszFile = mem:w32acquire_mem( 0, helpfile )
		void = c_func( HtmlHelp, {0, pszFile, HH_HELP_CONTEXT,
			helpcontext} )
		mem:w32release_mem( pszFile )
	end if
else
	void = message_box( "There is no context-sensitive help " &
		"available for this topic.", "Help", 0)
end if


Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

8. Re: wxIDE & EuHTHelp.exw

On Sun, 05 Feb 2006 16:43:04 -0800, Kenneth Rhodes
<guest at RapidEuphoria.com> wrote:

>I appreciate your patience, Pete. Please help me understand  -
OK, let me explain where I'm coming from.
The other day I typed in "getFileExtension" and pressed F1.
This showed me "D:\Edita\eamisc.e" and the text:
"global function getFileExtension(sequence name)"
and allowed "&Examine Code" to jump straight to the definition, which 
I did, (because I wanted to confirm that it performed a lower() on the
result).

If I type eg "open", and press F1, it shows me "Euphoria Builtin", the
text "global procedure open(sequence filename, sequence mode)"
and allows "R&eference Manual" to open %EUDIR%/html/lib_h_o.htm#open.

I have seen JL's code and it is quite nice, but I /really/ don't know 
what to do with it. For instance it does not lookup "open", 
"pretty_print", etc. Besides, is there really anything that is really 
appropriate to F1 lookup when editing Eu code in Edita? What exactly 
needs adding to Edita, in a way which does not remove any existing 
functionality? That is the question, afaict not being answered by 
anybody.

One thing I will say is that I am adamant that Edita should provide 
the first line of help itself, perhaps bar things it knows nothing 
about, and then allow an option to open html/hlp/chm for more info. I 
am very unlikely to make F1 open some external (and presumably 
hard-coded, non-dynamic) help as soon as it is pressed.

>So, as you can see, I'm still in a state of denial about being
>wrong on this. smile
This thread started with don cole wanting .hlp or .chm rather
than .htm lookup. I only meant you were wrong about being able to
invoke a .hlp or .chm file via system_exec /and/ pass it a keyword.

Regards,
Pete
PS I'll find it in time, but if anyone can remember the name of the 
RDS doc search program, that's something else I need to investigate. 
(I've already got a copy of it here somewhere, whatever it's called.)

PPS most qualms I have expressed have been mostly concerned with the
.hlp and .chm formats, because I cannot build/amend such.

new topic     » goto parent     » topic index » view message » categorize

9. Re: wxIDE & EuHTHelp.exw

Pete Lomax wrote:
> 
> On Sun, 05 Feb 2006 16:43:04 -0800, Kenneth Rhodes
> <guest at RapidEuphoria.com> wrote:
> 
> >I appreciate your patience, Pete. Please help me understand  -
> OK, let me explain where I'm coming from.
> The other day I typed in "getFileExtension" and pressed F1.
> This showed me "D:\Edita\eamisc.e" and the text:
> "global function getFileExtension(sequence name)"
> and allowed "&Examine Code" to jump straight to the definition, which 
> I did, (because I wanted to confirm that it performed a lower() on the
> result).
> 
> If I type eg "open", and press F1, it shows me "Euphoria Builtin", the
> text "global procedure open(sequence filename, sequence mode)"
> and allows "R&eference Manual" to open %EUDIR%/html/lib_h_o.htm#open.

  Excellent - I'm just waiting on the Liux port, Pete! smile

> I have seen JL's code and it is quite nice, but I /really/ don't know 
> what to do with it. For instance it does not lookup "open", 
> "pretty_print", etc. 

If by "JL's code" you mean Juergen's EuHTHelp.exw, your simply mistaken -
EuHTHelp.exw has absolutely no problem with "open" or "pretty_print"
or every other keyword that I have tested it with.  Its a great utility,
which easily provides a great deal of functional "help" to a number of 3rd
party editors. And its public domain - we can benefit from it, play with it,
learn from it, without having to worry about thorny license issues.



> Besides, is there really anything that is really 
> appropriate to F1 lookup when editing Eu code in Edita? What exactly 
> needs adding to Edita, in a way which does not remove any existing 
> functionality? That is the question, afaict not being answered by 
> anybody.

You have done a much better job in this post of describing the
capabilities of Edita - but also, much of earlier arguements in
this thread was answering statements such as this:

>I am also unaware how one might invoke a help file, with a 
> specific topic...

and

>Now if someone wants to ship me an updated file with 
> the source mods to Edita, OR BETTER YE A HOW-TO...
(my emphasis)
 

> This thread started with don cole wanting .hlp or .chm rather
> than .htm lookup. I only meant you were wrong about being able to
> invoke a .hlp or .chm file via system_exec /and/ pass it a keyword.

>Here's what I said:
>Bottom Line - Elaborate context sensitive help, in either text of hypertext
>format, can easily be implemented in any text editor - at least for the
>official RDS
>Euphoria language.

>But the real trick is to provide that type of elaborate contest sensitive
>help for any third party library included in the file being edited.


I don't even know what a .hlp file is. I implemented
context sensitive help search using the Euhoria *.doc files -
simply opened the library doc and passed the keyword to ed.ex's
builtin search routines.  In most cases - help was instantaneous, if
nothing was found in the Library or Refman docs I passed the keyword to
guru.ex and loaded the guru.out file into an ed.ex window "pane".
And I started using keywords to access specific articles in *.htm
files a year ago. I've never  had any sucess under Linux in passing
a search string to  a chm file - and none of my posts for the last month
references "chm".


Here's Don's original post:
Where can I find information on the use of the dollar sign [$]?
I can't seem to find anything about it in any of the Euphoria Help files.
> 

And here's your response:
> Take a look at refman, section 2.2.5, "Subscripting sequences," and 
> 2.2.6, "Slicing sequences."
> 
 Matt Lewis




> Regards,
> Pete
> PS I'll find it in time, but if anyone can remember the name of the 
> RDS doc search program, that's something else I need to investigate. 
> (I've already got a copy of it here somewhere, whatever it's called.)
> 

Do you mean guru.ex?  Thats basically what the RDS web search code is,
I think... here's a link to the source code for the web search:
http://www.rapideuphoria.com/guru_web.txt


Its been an interesting thread - I'm tired!

Pete, when your ready for someone to beta test you wxEU port
of edita, just send it on!

Regards,

Ken Rhodes
100% MicroSoft Free
SuSE Linux 10.0
No AddWare, SpyWare, or Viruses!
Life is Good  smile

new topic     » goto parent     » topic index » view message » categorize

10. Re: wxIDE & EuHTHelp.exw

Kenneth Rhodes wrote:

> Pete Lomax wrote:

<snip>

>> I have seen JL's code and it is quite nice, but I /really/ don't know 
>> what to do with it. For instance it does not lookup "open", 
>> "pretty_print", etc. 
> 
> If by "JL's code" you mean Juergen's EuHTHelp.exw, your simply mistaken -
> EuHTHelp.exw has absolutely no problem with "open" or "pretty_print"
> or every other keyword that I have tested it with.

I can confirm that. smile
The new version that I uploaded yesterday has the extension ".ex"
instead of ".exw", because I thought that sounds a little more generic.

So PL, what happens when you run one of the following commands?
   exw EuHTHelp.ex open
   ex  EuHTHelp.ex open
   exu EuHTHelp.ex open

( At the beginning of the file "EuHTHelp.ex", you have to enter the
  appropriate path/name of your browser first. )

> Its a great utility, which easily provides a great deal of functional
> "help" to a number of 3rd party editors.

Thanks Kenneth. I use it myself on a regular basis since Eu 2.3.
And often when here were questions e.g. by newbies, I tried to provide
a proper hyperlink to the official HTML help for them, by using this
utiliy. It worked fine most times, and if not I improved the program
accordingly. (Help for terms like "open" was already shown in the first
release.)

BTW: Thanks to RDS for putting all those hyperlink targets into the HTML
documentation, so that it's possible to "jump" dirctly to the desired
point.

<snip>

>> This thread started with don cole wanting .hlp or .chm rather
>> than .htm lookup.

IIRC he just wanted to get some information about usage of the dollar sign.

<snip>

> Here's Don's original post:
> Where can I find information on the use of the dollar sign [$]?
> I can't seem to find anything about it in any of the Euphoria Help files.

   exw EuHTHelp.ex $
   ex  EuHTHelp.ex $
   exu EuHTHelp.ex $
would have shown him the answer immediately. smile

<snip>

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

11. Re: wxIDE & EuHTHelp.exw

Juergen Luethje wrote:
> 

> The new version that I uploaded yesterday has the extension ".ex"
> instead of ".exw", because I thought that sounds a little more generic.
> 

Good idea!  I actually ignored "EuHTHelp.exw" for quite a while because of
that reason - I initially downlowded it and glanced at it - but was
immediately turned off when I saw that it was set up to use IE. When
Juergen mentioned EuHTHelp again in a recent post, I took a closer
look.

A note for Linux users - I have settled on having EuHTHelp.ex use
the browser "links" ( http://artax.karlin.mff.cuni.cz/~mikulas/links/ ).
Links is a barebones browser that is lighting fast - its almost startling
its so fast - certainly less than a second on my system - and it will
run under X or a console. Other such browsers are lynx, elinks,
and w3m - some run on the Dark Side, I do believe.

 

Ken Rhodes
100% MicroSoft Free
SuSE Linux 10.0
No AddWare, SpyWare, or Viruses!
Life is Good  smile

new topic     » goto parent     » topic index » view message » categorize

12. Re: wxIDE & EuHTHelp.exw

On Mon, 06 Feb 2006 20:06:03 -0800, Kenneth Rhodes
<guest at RapidEuphoria.com> wrote:

>Pete Lomax wrote:
>> I have seen JL's code and it is quite nice, but I /really/ don't know 
>> what to do with it. For instance it does not lookup "open", 
>> "pretty_print", etc. 
>
>If by "JL's code" you mean Juergen's EuHTHelp.exw, your simply mistaken -
You're right, I'm wrong blink
My apologies to everyone, especially Juergen, for that.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

13. Re: wxIDE & EuHTHelp.exw

Pete Lomax wrote:

> On Mon, 06 Feb 2006 20:06:03 -0800, Kenneth Rhodes
> <guest at RapidEuphoria.com> wrote:
> 
>> Pete Lomax wrote:
>>> I have seen JL's code and it is quite nice, but I /really/ don't know 
>>> what to do with it. For instance it does not lookup "open", 
>>> "pretty_print", etc. 
>>
>> If by "JL's code" you mean Juergen's EuHTHelp.exw, your simply mistaken -
> You're right, I'm wrong blink
> My apologies to everyone, especially Juergen, for that.
> 
> Regards,
> Pete

It's not a problem at all.

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu