Silverfrost Forums

Welcome to our forums

Copy and paste from Clearwin transcript window

17 Sep 2013 10:57 #13011

I'm trying to copy and paste from a Clearwin window (an ordinary Fortran output stream) but it's very unreliable.

opening window with ---
      wcaption = 'VMINE DEVELOPMENT VERSION '//verno//' '//verdate
      kkk = winio@('%ww[casts_shadow]%lw&',ictrl)  
      kkk = winio@('%ca@&',wcaption)
      kkk = winio@('%mn[Copy]&','COPY')
      kkk = winio@('%pv%`100.25cw[hscroll,vscroll]&',idsply,ihndcw)
      kkk = winio@('%ac[Ctrl+C]','COPY')
      call set_max_lines@ (ihndcw,100000)
      kkk = set_default_window@ (ihndcw)

writing Fortran standard stream to it (on LUN idsply)...

then I want to copy and paste some the output elsewhere (usually into Notepad)

and finally I close the window with

      ictrl = 1
      call window_update@(ictrl) 

What am I doing wrong? I select the section I want. Sometimes it copies one character or one line from the selection, sometimes more.

CTRL/C seems to work better than COPY from the menu item, but whether either of them works is completely unpredictable.

Help!!

17 Sep 2013 11:59 #13012

Are you using a recent salflibc.dll? I did fix a bug in this area not too long ago.

17 Sep 2013 12:27 #13013

Hi Paul -

I'm using the latest (last week's?) salflib beta.

I notice from the documentation that although the COPY callback works, there's no mention of other standard callbacks like SELECT_ALL that are available on edit-box windows. Just a thought though - is it possible to attach an I/O stream to a %eb window instead, to use it just like a %cw window?

Having said all that, one thing I like about Clearwin+ is that there always seem to be workarounds. I've just solved my immediate problem with a call to GET_CLEARWIN_TEXT@ and then dumping the buffer to an external .txt file.

-Steve

17 Sep 2013 2:51 #13014

%eb does not take a Fortran unit number.

The follow sample appears to work with COPY...

      WINAPP  
      integer kkk,winio@,ctrl
      kkk = winio@('%ww&')  
      kkk = winio@('%ca[Caption]&') 
      kkk = winio@('%mn[Copy]&','COPY') 
      kkk = winio@('%pv%100.25cw[hscroll,vscroll]&',10)
      kkk = winio@('%lw', ctrl)
      write(10,*) 'First Line' 
      write(10,*) 'Second Line' 
      write(10,*) 'Third Line' 
      end
17 Sep 2013 3:35 #13015

Odd. Even your simple sample doesn't work reliably on my development machine (Win XP). Just tried on Win 7 but same result. I've checked that the only Salflibc.dll it can be using is the 31st Aug 2013 beta version. Sometimes the copy works, sometimes it doesn't.

Please login to reply.