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 

Problem closing hypertext window

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Thu Apr 26, 2018 4:59 pm    Post subject: Problem closing hypertext window Reply with quote

Hello,

while porting a GUI application from 32 to 64 bit we run into problems concerning the Help sytem wich makes use of hypertext windows. As I can't easily create a code example which shows the problem I try to describe it.

We have linked the Help system to pressing key F1 which results in calling callback F1_func. Now F1_func does one of the actions following
Action1:
Code:

if the hypertext main window has not yet been created then the hypertext main window is created; this is done by calling winio@( ... %hd ...); the handle of the hypertext main window may be retrieved by means of call winio@(...%hw ...); assume this handle to be named IHANDLE for the following;

Action 2:
Code:

if the hypertext main window exists then the contents of the hypertext main window is changed; this is done by calling chage_hypertext@(IHANDLE, ...);

Note that in terms of IHANDLE action 1 is carried out if IHANDLE equals 0 and action 2 is carried out if IHANDLE is different from 0.
Now we look at the following scenario:
Code:

Open the GUI application;
press F1 to open the hypertext main window
close the hypertext main window using the close box from the decoration of the hypertext main window;
press F1 to open the hypertext main window once again

For the 32 bit version of our application the hypertext main window is opened once again, however, for the 64 bit version error "no hypertext control found" is generated (from within function F1_func). Here are some observations we made:
at the beginning of the second call of F1_func variable IHANDLE is 0 for the 32 bit version and hence makes F1_func execute the first action mentioned above. For the 64 bit version, however, variable IHANDLE is different from 0 at the beginning of the second call of F1_func. Hence F1_func tries to execute the second action mentioned above and runs in the error mentioned. Note that IHANDLE is of type integer*4 for the 32 bit version and of type integer*8 for the 64 bit version and that both are defined in a common block.
We suspect that the system/"hypertext machinery" sets IHANDLE to 0 for the 32 bit version and that this does not work correctly for the 64 bit version.
If, for the 64 bit version we define two more variales of type integer*4, namely I4A and I4B, and if we append them to the common block where IHANDLE is located, then we may execute statement
Code:

EQUIVALENCE(IHANDLE,I4A)

We see that one of variables I4A, I4B is 0 and the other different from 0. That's why we think that closing the main hypertext window erroneosly does not result in IHANDLE to be set to 0 for the 64 bit version.

We would appreciate any help.

Regards,
Dietmar
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Apr 30, 2018 2:58 pm    Post subject: Reply with quote

Dietmar

From your description I don't know what is going wrong.

For 64 bit compilations, there are some contexts in which EQUIVALENCE does not work and we are currently working on this. To check if there is an EQUIVALENCE failure, just print out the LOC of each side of the EQUIVALENCE and see if they are equal.

I would need further information in order to sort out the root problem.
Back to top
View user's profile Send private message AIM Address
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Tue Jun 12, 2018 11:26 am    Post subject: Reply with quote

Paul,

sorry for the delay, meanwhile I found the problem on our side.

In our Help/Hypertext scenario we use option %lw when creating the hypertext main window. %lw makes a control variable of type INTEGER*4 be created.

Now handles normally have been moved from INTEGER*4 to INTEGER*8 when moving from 32 it to 64 bit code. Unfortunately this is not the case for %lw which needs a variable of type INTEGER*4 even for the 64 bit case. Because we used one variable for the 32 bit code for both handles and this control variable, we introduced an additional new variable (of type INTEGER*4) for the control variable of the 64 bit port and we unfortunately made a mistake when initializing our Help/Hypertext scenario (which occurred when clicking F1 for Help closing the Help window and clicking F1 once again).

Sorry once again.

Regards,
Dietmar
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit 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