Silverfrost Forums

Welcome to our forums

%ff causing the problem with %ob/%cb

31 May 2013 5:49 #12298

If remove the marked by arrow line all is OK

  Winapp
	
  i=winio@('%ww%sy[3d_raised]%ca[Fast XY plot: Drop window]&') ! 

  i=winio@('%1.4ob[raised]&')
    i=winio@('%cn DROP DATA FILES HERE %ff %ff&') 
  i=winio@('%cb&')
    i=winio@('X axis%ta%`rb[Linear]&', kXlinearFastXYplot) 
  i=winio@('%cb&')
    i=winio@('Y axis%ta%`rb[Linear]%ff %ta%`rb[Log]&', kYlinearFastXYplot, kYlogFastXYplot) 
  i=winio@('%cb&')
    i=winio@('%ff&') ! <--- causing problems
    i=winio@(' Y columns%ta%dd%il%2rd%`il %ff&',1,1,nDroppedFilesMax, nYColumnsFastXYplot)
  i=winio@('%cb&')

  i=winio@('%ac[esc]&','exit') 
  i=winio@('%ff %ff%cn%tt[Plot]%tt[OK]') 
  end
31 May 2013 7:13 #12301

My gut feeling is that %ff is not designed for use within %ob ..%cb. %nl might be more appropriate.

1 Jun 2013 5:37 #12307

Dan,

%ff has no meaning here, because you are inside a block of boxes specified 1 wide and 4 high. It would work fine if you had 4 separate %ob ... %cb constructs. Box #4 comes below box #3 anyway. The multiple box definition is a way of making all the boxes have a common width in this example. My guess if the CWP looks for some coordinates to position relative to and the only ones it can find are at the start/end of the pile of boxes, not the start/end of each idividual box.

Eddie

3 Jun 2013 5:37 #12313

Did not quite get the explanation, Eddie. According to the definition it's a 'form feed. To move down to below any existing controls'. So it should move everything below the border line moving by one line down (generally repeating %nl) as it is doing with absolutely everything else in CWP, i do not see why it should be any different with the block of boxes

3 Jun 2013 8:11 #12314

Sorry Dan, I'll try again when I get back to base.

E

6 Jun 2013 11:16 #12325

Dan,

This is just a guess, but it seems probable to me that somewhere in Clearwin it contains a y coordinate for the end of the previous control (say Y1) and a value for the previous maximum y coordinate (say Y2). %nl then positions the current insertion point one line below Y1, and %ff one line below Y2.

It also occurs to me that Y1 and Y2 are not updated until the final %cb (the 4th one in your example) and not after each one.

You could argue that they should be.

You could also argue that since any but the last %cb actually positions the next insertion point immediately below the bottom of the last sub-box, both %nl and %ff are redundant anyway.

Solutions to this could be:

Updating at every %cb Updating the documentation Causing a compile or run-time error if %ff is used inside a multi-box arrangement.

Solution 2 looks to me to be the easiest, and least likely to have side effects!

Eddie

Please login to reply.