forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%ff causing the problem with %ob/%cb

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri May 31, 2013 6:49 pm    Post subject: %ff causing the problem with %ob/%cb Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri May 31, 2013 8:13 pm    Post subject: Reply with quote

My gut feeling is that %ff is not designed for use within %ob ..%cb.
%nl might be more appropriate.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sat Jun 01, 2013 6:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Mon Jun 03, 2013 6:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Jun 03, 2013 9:11 pm    Post subject: Reply with quote

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

E
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Jun 06, 2013 12:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group