View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2813 Location: South Pole, Antarctica
|
Posted: Fri May 31, 2013 6:49 pm Post subject: %ff causing the problem with %ob/%cb |
|
|
If remove the marked by arrow line all is OK
Code: | 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 |
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Fri May 31, 2013 8:13 pm Post subject: |
|
|
My gut feeling is that %ff is not designed for use within %ob ..%cb.
%nl might be more appropriate. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sat Jun 01, 2013 6:37 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2813 Location: South Pole, Antarctica
|
Posted: Mon Jun 03, 2013 6:37 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon Jun 03, 2013 9:11 pm Post subject: |
|
|
Sorry Dan, I'll try again when I get back to base.
E |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Jun 06, 2013 12:16 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
|