FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bool flag options

 
Post new topic   Reply to topic     Forum Index -> Doost
View previous topic :: View next topic  
Author Message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Wed Oct 10, 2007 1:48 am    Post subject: bool flag options Reply with quote

It seems right now that the boolSwitch is only useful for affirmative values. (I.e. value defaults to 'false' and changes to 'true' if the "--switch" is specified.) I think if you explicitly set defaultValue(true) it should be act as true unless the "--switch" appears.

Actually it would also be nice if --switch=false and --switch=true would work always too, rather than giving an error. And maybe --switch=0 and --switch=1, as well.
Back to top
View user's profile Send private message
aarti_pl



Joined: 25 Jul 2006
Posts: 28

PostPosted: Fri Oct 12, 2007 2:12 am    Post subject: Reply with quote

I agree with you about boolSwitches. They should work as switch, so when default value is set to true, option in command line should set value of option to false. It should be rather easy to implement this, and I will make it in next update.

There is a problem with allowing two forms of option - with parameter/ without parameter. Please see answer in "optional, with default value".
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Doost All times are GMT - 6 Hours
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