Silverfrost Forums

Welcome to our forums

Beta release of ClearWin+

28 Jan 2015 1:35 #15517

We have uploaded a beta copy of salflibc.dll so that users can test out recent fixes. This is mainly for ClearWin+ but there will be the occasional fix elsewhere (e.g. run time IO).

The download is in the form of a self-extracting archive. Don't forget to create backup files before copying.

http://www.silverfrost.com/beta/salflibc.exe

28 Jan 2015 4:40 (Edited: 28 Jan 2015 5:44) #15518

Paul, I start working with the new DLL and immediately I found the first funny thing:

      winapp 
      program test 
      implicit none
      include <windows.ins> 

      external      results
      integer*4     j,i_azim

      common  /angle/   i_azim

      i_azim = 100
      j = winio@('%ac[Esc]Azimut =%dd%^`3rd','exit',5,i_azim,
     *    results)
      end 

      integer*4 function results()
      implicit none

      integer*4     i_azim

      common  /angle/   i_azim

      print*,i_azim
      results = 1
      end

Using the spin wheel, the callback 'results' should be activated. With the new DLL this only works if the numerical field %3rd is NOT greyed. With my old DLL this works also if it is greyed (and this must be possible).

Wilfried

28 Jan 2015 4:44 #15519

A second funny thing:

Before, %7bt[] creates the empty button as it should look. Now, a blank must be between the brackets: %7bt[ ]. Not a serious thing, but several work in many routines.

Wilfried

29 Jan 2015 8:51 #15524

I have logged Wilfried's comments for investigation.

Yes it is a self-extracting exe with copy of the ClearWin+ enhancements included.

Windows 8.1 objects to this kind of download but I hope 8.1 users can manage.

29 Jan 2015 10:26 #15525

The regression with the spin control %dd has been fixed for the next release. A classic case of a new fix making an old one elsewhere redundant.

29 Jan 2015 11:35 #15527

Thanks a lot!

Here comes the next (sorry...):

From http://www.silverfrost.com/ftn95-help/clearwinp/library/get_multiple_filenames_.aspx I've loaded the example given there:

      WINAPP
      INCLUDE <windows.ins>
      LOGICAL L,next
      CHARACTER*256 filename,filter,defpath
      filter = 'Free Fortran files (*.f90)'//char(0)//'*.f90'//char(0) &
                //'All files (*.*)'//char(0)//'*.*'//char(0)//char(0) 
      defpath = char(0) !Gives the current working directory
      L = .TRUE.
      next = .FALSE.
      DO WHILE(L)
        filename = char(0)
        L=GET_MULTIPLE_FILENAMES@(0,'Dialog Title',filename,256,filter,defpath,next) 
        next = .TRUE. 
        IF(L) PRINT*, trim(filename)
      END DO 
      END

Compiling this, I get the 'error 250: you cannot assign an expression of type REAL(KIND=1) to a variable of type LOGICAL(KIND=3)'. What is wrong in the example code?

Wilfried

29 Jan 2015 12:42 #15529

Hi Paul,

Pleased to report that this update seems to work fine for me using V7.1 and the new files downloaded. Tested on quite a range of programs and all OK so far.

Many Thanks

Bill

29 Jan 2015 3:06 #15530

Wilfried

The problem with %bt[] has now been fixed.

The last sample that you have posted is OK for me. I have assumed that the Fortran is free and not fixed format otherwise there are line truncation issues.

29 Jan 2015 3:16 #15531

Paul,

once again many thanks! If it is possible to get the updated DLL it would be great.

My last posted problem seems to come from my very old compiler, version 5.50. In the 'ins' files (windows.ins etc) there is no entry of get_multiple_filenames@, and the error message relates to this line.

I promise to buy a compiler update soon 😉

Wilfried

30 Jan 2015 1:28 #15533
  1. Get_dib_size@ with PNG works OK but get_dib_block@ does not display it.

  2. %wp - the transparent text option over graphics background works OK, and without any changes in the current source code (i.e. without adding ~ you have mentioned)

30 Jan 2015 7:56 #15534

Thanks Dan. Do you have a short sample for item (1)?

30 Jan 2015 11:07 #15537

Paul/Wilfied

Could you clarify the exact behaviour of %dd when the associated %rd is greyed.

I would expect the %dd to have no action (variable not increment or callback activated). The whole point of greying a control is to say to the user 'you cannot change this' so why provide a mechanism circumvent this?

Steve

30 Jan 2015 1:15 #15544

In this context the %rd is 'read only' rather than disabled. The idea is that the user is only allowed to change the value via the spin control.

30 Jan 2015 1:57 #15548

Paul

I can understand your logic in the context you describe but it means that you need to put the 'grey control' logic in the call back function.

A relatively easy solution (easy from a non-export viewpoint....) would be to permit the %dd to take an optional grey control

thanks

steve

30 Jan 2015 3:19 #15551

Steve,

in my first posting to this topic I meant what Paul described more exactly: Not 'greyed' but 'read-only'. In the Clearwin documentation (clearwin.pdf from Salford times) you find this together with an example on page 41.

Wilfried

31 Jan 2015 4:54 #15555

Paul,

  1. JPG and BMP are OK but GIF or PNG are not. Other types were not checked

  2. The code i made in the hurry has some defect: Program crashes when you push esc, no time to investigate why. Just ignore

  3. Some additional suggestions: confusing diagnostics. if you by mistake do not declare hres and vres as integer the compiler gives confusing diagnostics below instead of clearly saying that it expected integers

  4. allocate ( ImageArr(3,hres, vres), stat = kAllocOK) *** Operand incompatible with opcode

Here is code

INTEGER , EXTERNAL :: DropFiles
      i=winio@('%ww[no_border]&')
      i=winio@('%bg[#cc9999]&') 
      i=winio@('%si! Drag-n-drop BMP file here   %ff %ff&')
      i=winio@('%dr&', DropFiles)

      i=winio@('%ac[Alt+X]&','exit')
      i=winio@(' %ff %cn%tt[OK]')
END PROGRAM     	

   integer function  DropFiles()
   use clrwin
   character*128 filename1
   integer*1, dimension(:,:,:), allocatable :: ImageArr
   integer hres, vres, colours, ier

   filename1 = clearwin_string@ ('DROPPED_FILE')
   call get_dib_size@(filename1, hres, vres, nb_colours, ier)
   print*,' hres,vres,nb_colours=',hres, vres, nb_colours

   kAllocOK=0
   allocate ( ImageArr(3,hres, vres),  stat = kAllocOK) 
   if (kAllocOK /= 0) write (*,*) 'Allocation problem #', kAllocOK, hres, vres

   call get_dib_block@(filename1,ImageArr,hres, vres,0,0,hres, vres,0,0,ier)
   if(ier.ne.0) Print*, 'get Err=',ier

   i=winio@('%ww&')
   i=winio@('%gr[full_mouse_input,rgb_colours,popup]&',hres,vres)
   i=winio@('%ac[Alt+X]&','exit')
   i=winio@('%ac[esc]&','set', LWwindow_control,0) ! 'exit')
   i=winio@('%lw', LWwindow_control)

   call display_dib_block@(0,0,ImageArr,hres,vres,0,0,hres,vres,0,0,ier)
   if(ier.ne.0) Print*, 'Display Err=',ier

!   deallocate(ImageArr, stat = ios)
!   if (ios /= 0) then
!     print *, 'Was nothing to deallocate'
!   end if

    DropFiles=2
   end function
31 Jan 2015 4:38 #15562

You need a call to USE_GDIPLUS_IMAGE_FILES@ in order to activate the new feature.

1 Feb 2015 5:41 #15567

Added two lines

istate=1 istate0= USE_GDIPLUS_IMAGE_FILES@(istate)

got that this function is missing

NO ERRORS, 2 WARNINGS FTN95/Win32 v7.10.0] WARNING the following symbols are missing: USE_GDIPLUS_IMAGE_FILES#

2 Feb 2015 10:27 #15574

My apologies for the omission, you will need

      C_EXTERNAL USE_GDIPLUS_IMAGE_FILES@ '__use_gdiPlusForImageFiles'  &
     &(VAL):INTEGER*4

in your clearwin.ins or as temporary line in your program.

3 Feb 2015 7:20 (Edited: 4 Feb 2015 10:04) #15582

Works like charm. And does not crash

ADDITION: inserted that into a bit larger code and it does not work. Same story like with LexicalSort. Devilry. Anyone wants to tell me where error is if i post the whole code? Interesting why this @#$% always happen, specifically when i'm in the hurry and pay a lot of attention to not make any mistakes? Nothing works, even posting of this message took several attempts (forum showed just empty post - does not like my OneDrive link)

Please login to reply.