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 

Using multiple %ww to set options

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



Joined: 13 Oct 2014
Posts: 749
Location: Morrison, CO, USA

PostPosted: Sat May 02, 2020 6:22 pm    Post subject: Using multiple %ww to set options Reply with quote

I had a curiosity.

Can you place separate %ww's with different options for the same window? It appears that 2 (or more?) %ww's can occur (unlike some other commands). I was unsure that the options would be used on %ww's after the first. It would appear to be so; just checking.

It would be very useful to apply some window options (like [independent] or [topmost]) outside of some window preamble function.
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



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

PostPosted: Sat May 02, 2020 9:11 pm    Post subject: Reply with quote

Of course. You can divide your WINIO@ statements across many calls, and put the %ww in its separate forms in an IF THEN ELSE sequence, as in:

Code:
      IF (NOPT .EQ. 1) THEN
      IA = WINIO@('%ww[independent]&')
      ELSE IF (NOPT .EQ. 2) THEN
      IA = WINIO@('%ww[topmost]&')


and so on. You can also splice in things into the WINIO@ format string.

Code:
      IA = WINIO@('%ww['//whatever you want//']&')


There are probably other ways too.

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1374
Location: Aerospace Valley

PostPosted: Sat May 02, 2020 10:24 pm    Post subject: Reply with quote

a nice technique Eddie but isn't that particular type of insertion likely to upset the status quo of your program structure ? Smile
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 749
Location: Morrison, CO, USA

PostPosted: Sun May 03, 2020 3:40 am    Post subject: Reply with quote

Eddie, your second example is something I have been using for quite a while.

Some (most?) format codes are not allowed to appear twice. Some are, but syntactically, they must differ (%sc comes to mind). Some require additional information in the same line (syntax rules for menu items). Others have loose rules; for example, you can have two menu items that refer to the same shortcut key sequence, but no error generated.

It would make some sense that a %ww with it numerous arguments could be split across multiple lines. Your first example is NOT what I was looking for. The syntax would be more like:

Code:

    i = winio@('%ww[independent]&')
.
.
.
.
    i = winio@('%ww[topmost]&')


Granted, in this simple example, it would make more sense to have it all in one line. Just imagine for a moment that the first statement is in a routine that creates a preamble to a window (with standard menu items, accelerator keys, %sc callbacks, etc.) and the second line is in the routine that requires this window have topmost status. Rather than complicating the situation with mostly unused arguments in the preamble call, just place the specific calls needed in the original module.

A bit different that your example.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Sun May 03, 2020 8:20 am    Post subject: Reply with quote

Bill

Yes, you can use %ww more than once within one winio@ continuation sequence and the options will be combined in the order that they are presented. So if an option conflicts with an earlier option then the latter will apply.
Back to top
View user's profile Send private message AIM Address
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