Silverfrost Forums

Welcome to our forums

%WB issues with %IB

23 May 2021 9:32 #27836

I have been trying to use %WB for intelligent report but it seem to have an issue when used in conjunction with %IB. if i comment out the line with %IB the example works as expected using the %BT button. With the %IB line in place the example crashes immeadiately when the toolbar button is pressed. If the %bt button is pressed the %WB window opens but crashes with the same error message on close /move

' The instruction at address 100a67a4 attempted to read from location 00000000 100a62a1 constructed_button_procedure@16#70 [+0503]'

PROGRAM TEST

c ============ IMPLICIT NONE INCLUDE <windows.ins> INTEGER IWIN INTEGER OPEN_WEB EXTERNAL OPEN_WEB IWIN = WINIO@('%CA@&', 'WB test') IWIN = WINIO@('%ib[flat]&','tb_web',1,OPEN_WEB) IWIN = WINIO@('%bx&',0.1d0) IWIN = WINIO@('%^bt[wb_test]&', OPEN_WEB) IWIN = WINIO@('%ff%3nl%cn%bt[OK]') END

  INTEGER FUNCTIONOPEN_WEB()

c ========================= IMPLICIT NONE OPEN_WEB = 1 CALL SHOW_URL_WEB('Report', 'http://www.silverfrost.com') END

  SUBROUTINE SHOW_URL_WEB(CAPTION, TMPPATH)

c ========================
IMPLICIT NONE INCLUDE <windows.ins> CHARACTER*( * ) CAPTION, TMPPATH INTEGER IWIN
IWIN = WINIO@('%CA@&', CAPTION)
IWIN = WINIO@('%80.35wb@&', TMPPATH) IWIN = WINIO@('%ff%nl%cn%bt[OK]')
END // resource wb_rec.rc 1 24 default.manifest tb_web BITMAP 'tb_htmlview.bmp'

bitmap file available if required steve

23 May 2021 11:13 #27837

It's not much help, but I can confirm that I can replicate the problem as described by Steve..

23 May 2021 12:51 #27838

Thanks. At least it possibly eliminates any local setup issues (win XP). I have also tested on a Wn 10 (64) system which also fails FTN95 V8.73. steve

24 May 2021 8:22 #27842

Steve

When I first tested your sample I had the same experience but I started again and then I could not reproduce it.

The problem must relate to the resource script, maybe even some odd hidden characters.

Try to get the resource script to work first in some other context. Everything else is OK.

24 May 2021 12:06 #27843

Paul

i added iwin = winio@(%bm[tb_web]&',open_web) with the %wb comment out an it work as expected. un-commenting the %wb still cause a crash.

I doubt it the resource as Kenneths' test would have had to regenerate the script file (or copy and paste from the OP) and had to use a different bitmap

The application this example derived from has ~ 160 *.bmp & 130 *.ico files in the resource script (enhanced menus/%bb/ configurable toolbars etc.) which work as expected so i find it hard to suspect the resource file.

When it fails in Win Xp i get the standard trackback window. In Win 10 the example just freezes then stops

If you managed to reproduce the effect once i suspect it would be the interface to the MS internet engine that is being corrupted

regards

steve

24 May 2021 2:35 #27844

Steve

There is a problem with %ib but I have not been able to indentify the cause.

%mb is a lot more stable in this context but there is still a problem. For a 32 bit application, the program will sometimes terninate when you close the web dialog. Here is your sample modified for %mb...

       WINAPP
c ============
       IMPLICIT NONE
       INCLUDE <windows.ins>
       INTEGER IWIN
       INTEGER,EXTERNAL::OPEN_WEB
       INTEGER,PARAMETER::N=1
       INTEGER bstyle(N),bID(N)
       bID    = (/0/)
       bstyle = TBSTYLE_BUTTON
       IWIN = WINIO@('%ca@&', 'WB test')
       IWIN = WINIO@('%^`*mb&', N, bID, bstyle, 'tb_web', OPEN_WEB)
       IWIN = WINIO@('%^bt[wb_test]&', OPEN_WEB)
       IWIN = WINIO@('%ff%3nl%cn%bt[OK]')
       END
       
       INTEGER FUNCTION OPEN_WEB()
c =========================
       IMPLICIT NONE
       CALL SHOW_URL_WEB('Report', 'http://www.silverfrost.com')
       OPEN_WEB = 2
       END

       SUBROUTINE SHOW_URL_WEB(CAPTION, TMPPATH)
c ========================
       IMPLICIT NONE
       INCLUDE <windows.ins>
       CHARACTER*( * ) CAPTION, TMPPATH
       INTEGER IWIN
       IWIN = WINIO@('%CA@&', CAPTION)
       IWIN = WINIO@('%80.35wb@&', TMPPATH)
       IWIN = WINIO@('%ff%nl%cn%bt[OK]')
       END
c ========================
       RESOURCES
       tb_web BITMAP 'capture.bmp'
24 May 2021 3:02 #27845

Paul

thanks for the response.
I did have a quick look at %mb but it looked complicated especially as all my %ib toolbars are user configurable (multiples call to %ib to build up toolbar) and it was unclear if %mb would behave in similar way.

The 32 bit stability may also be a limiting issue.

i will play with you example to see if i can utilise it

steve

25 May 2021 7:30 #27848

Steve

I have located the fault and can now stop it from crashing. There is an outstanding issue (after use, the toolbar button remains depressed and becomes inactive. But I am more hopefull of a complete fix.

25 May 2021 8:47 #27850

This failure has now been fixed for the next release of ClearWin+.

The initial state of the toolbar button should be set to 4 in order to provide a button that toggles.

25 May 2021 11:02 #27851

Paul

Thanks for your efforts

steve

8 Jun 2021 7:43 #27909

Hi Paul

the %wb control is working great now. It even magically managed greying some %tb button i added for the wbGoforward/wbGoback callbacks.

Do you have any ideas on how i can send the %wb contents directly to a printer ('wbPrint' maybe?) i can copy the contents into Word for printing purposes but its a bit inelegant

The are still some stability issues if i add a %ib toolbar to the same window as the %wb. I need to investigate further to isolate the behaviour

thanks

steve PS: a 'wbFind' would be a great use to the end user

8 Jun 2021 8:22 #27911

Steve

If you right click on the web page then you should get the option to print.

'Find' is more tricky. You would need to start up a browser for that.

8 Jun 2021 9:10 #27914

HI Paul

Im not opening a web page. I use a text file which has been decorated with HTML code (<h2>,<b> , links etc.) to permit the end user to navigate long reports (1000+ lines) in a structured fashion. The right click just shows the %pm options

Currently the user can selected between a %eb or %wb output report. I was trying to duplicate some of the usability functions the %eb report

thanks

steve

8 Jun 2021 4:29 #27919

Steve

If you are using %wb to display html code then I would expect that the default popup menu would provide an option to print. Suppying %pm will replace the default by your own menu.

8 Jun 2021 5:07 #27921

Paul

thanks for the suggestion but i commented out the %pm and there was no default popup menu

Steve

9 Jun 2021 8:50 #27928

Steve

I created a new html file via Plato, typed in 'Hello World' and saved it. I used the file name in your program and it gives the default popup menu with access to print.

I don't know much about html but the resulting header may make all the difference...

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
9 Jun 2021 10:00 #27929

Hi Paul

I tried you suggestion on a Win XP and a Win 10 system with no luck.

your documentation states that %WB uses the MS internet explorer engine. i tried switching from Chrome back to IE as the default engine to see if it would help but still no popup menu

thanks

steve

9 Jun 2021 11:03 #27930

Steve

I am using Windows 10.

Here is my copy of your program...

winapp
PROGRAM TEST
! ============
IMPLICIT NONE
INCLUDE <windows.ins>
INTEGER IWIN,state
INTEGER OPEN_WEB
EXTERNAL OPEN_WEB

state = 4
IWIN = WINIO@('%CA@&', 'WB test')
IWIN = WINIO@('%ib&','tb_web',state,OPEN_WEB)
IWIN = WINIO@('%bx&',0.1d0)
IWIN = WINIO@('%^bt[wb_test]&', OPEN_WEB)
IWIN = WINIO@('%ff%3nl%cn%bt[OK]')
END

INTEGER FUNCTION OPEN_WEB()
! =========================
IMPLICIT NONE
CALL SHOW_URL_WEB('Report', 'C:\techsupport\HTMLsource1.htm')
OPEN_WEB = 2
END

SUBROUTINE SHOW_URL_WEB(CAPTION, TMPPATH)
! ========================
IMPLICIT NONE
INCLUDE <windows.ins>
CHARACTER*( * ) CAPTION, TMPPATH
INTEGER IWIN
IWIN = WINIO@('%CA@&', CAPTION)
IWIN = WINIO@('%80.35wb@&', TMPPATH)
IWIN = WINIO@('%ff%nl%cn%bt[OK]')
END

RESOURCES
tb_web  BITMAP 'capture.bmp'

Here is my copy of the HTML file HTMLsource1.htm...

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
<HTML><HEAD>
<META content='text/html; charset=windows-1252' http-equiv=Content-Type>
<META name=GENERATOR content='MSHTML 11.00.10570.1001'></HEAD>
<BODY>Hello World </BODY></HTML>
Please login to reply.