forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hypertext - %ht

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Tue May 15, 2007 11:41 am    Post subject: Hypertext - %ht Reply with quote

I am using %ht to display help text relating to a particular screen - the .HTM file contains text relating to various screens and I wish, on entry, to jump to the part relating to that screen.

The call I use from 'screen 6' is:

integer*4 function help_func()
c
INCLUDE <WINDOWS.INS>
c
integer*4 ii
ii = winio@('%pv%60.20ht[SIX]')
help_func = 1L
end

If SIX does not exist in the .HTM I get an error on running. When SIX does exist then all works fine BUT the file display still opens up at the start - not at SIX.

Section of .HTM file given below.

Any assistance would be appreciated.

Thanks, Bill


<DOC name="ONE">

On Screen One you enter details of the problem to be solved...

Lots of text....

<DOC name="SIX">
<h1>Packing Options</h1>

On Screen 6 you enter details of Packing Options (lots of text)
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue May 15, 2007 12:39 pm    Post subject: Reply with quote

On the face of it I cannot see anything wrong with your outline.

If you want to construct a very short working sample then I will attempt to step through it to find out what is going wrong. You can post your sample here including both your source file and your html file.
Back to top
View user's profile Send private message AIM Address
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Tue May 15, 2007 5:34 pm    Post subject: %HT CODE as tried: Reply with quote

Thanks Paul - Code below -

Program -

winapp 50000,50000,'paul.rc'
OPTIONS(INTL)
OPTIONS(LOGL)
implicit none
INCLUDE <WINDOWS.INS>
external back_func,help_func
integer*4 ii,icntrl
call add_hypertext_resource@('help')

ii=winio@('%ww[maximise,no_minbox,fixed_size]&')
ii=winio@('%mn[&Help]&',help_func)
ii=winio@('%nl%cn%14^bt[&Exit]&',back_func)
ii=winio@('%lw',icntrl)
call yield_program_control@(y_temporarily)
end

integer*4 function back_func()
include <windows.ins>
back_func = 0L
end
c
integer*4 function help_func()
INCLUDE <WINDOWS.INS>
integer*4 ii
ii = winio@('%`bg[white]%pv%60.20ht[SIX]')
help_func = 1L
end

Resource (paul.rc):

help HYPERTEXT "cargohlp.htm"

HTM file (cargohlp.htm)

<HTML>
<TITLE> CARGOMANAGER HELP </TITLE>
<DOC name="ONE">

This is info on Screen One <p>

This program is written using ClearWin+ and is available as a sample
program. By browsing the text which follows you can explore many of the
features of ClearWin+ (especially some new features, not yet found in the
manual) simply by clicking on highlighted text describing items of
interest to you. Some of the icons and bitmaps also respond to a click.<red>
Please note that the use of this program is no substitute for reading the
manual</red> - it is designed to give you a taste of what is possible using
ClearWin+. <p>

This program is written using ClearWin+ and is available as a sample
program. By browsing the text which follows you can explore many of the
features of ClearWin+ (especially some new features, not yet found in the
manual) simply by clicking on highlighted text describing items of
interest to you. Some of the icons and bitmaps also respond to a click.<red>
Please note that the use of this program is no substitute for reading the
manual</red> - it is designed to give you a taste of what is possible using
ClearWin+. <p>



<DOC name="SIX">
<h1>Packing Options</h1>

This is info on Screen 6.

Please Note: In addition to using this help system the FULL MANUAL contains a full search / history mechanism.
The Help option contents on each screen focus on information of immediate relevance to the interpretation of the screen.



</HTML>
Back to top
View user's profile Send private message Visit poster's website
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Tue May 15, 2007 8:22 pm    Post subject: Reply with quote

Hi Bill,

I think that your html is missing a </HTML> and <HTML>

At the end of "one" you need a </HTML> and new <HTML> before "six"

as follows:-

.
.
.
manual</red> - it is designed to give you a taste of what is possible using
ClearWin+. <p>
</HTML>



<HTML>
<DOC name="SIX">
<h1>Packing Options</h1>

This is info on Screen 6.
.
.
.


I hope this helps.

John Very Happy
Back to top
View user's profile Send private message Visit poster's website
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Wed May 16, 2007 8:44 am    Post subject: %ht problem. Reply with quote

Dear John (and Paul),

Many thanks indeed for pointing out the error - the manual does state this quite clearly but I had assumed the DOC command alone was sufficient. Your solutions does, of course, solve the problem.

Most grateful for your assistance -

FYI - I am having to replace local help screens (originally .hlp) in an application - as a result of Vista not supporting them. As I already provide a fully searchable manual (compiled HTML) and the help screens are short and discuss just a single screen, the use of the Hypertext Window provides a simple solution.

Bill
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group