AutoHotkey Community

It is currently May 27th, 2012, 12:07 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Gui, +Delimeter
PostPosted: February 25th, 2011, 5:48 pm 
Offline

Joined: November 1st, 2010, 3:13 pm
Posts: 62
I coded the following statement:
Code:
Gui, +Delimeter}


This statement is incorrect; however, AHK did not flag it as in error when the program was executed. Nor did AHK consider the statement correct (and use "}" as the delimiter).

Apparently, this spelling error is common. I got 29 hits when I searched the forum for "delimeter"!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2011, 7:57 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
AHK can't know every possible style for a GUI. It just tries to work with what you give it, like it does pretty much everywhere. It will accept this as well.
Code:
Gui, +MyTotallyRandomAndMadeUpOption


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2011, 2:15 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Does the documentation state it will reject invalid options? If not, this is not a bug.
Quote:
Bug Reports
Report problems with documented functionality.

Source: AutoHotkey Forum Index

Actually, it appears unknown options are intentionally ignored:
In script_gui.cpp, Chris wrote:
// If the item was not handled by the above, ignore it because it is unknown.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2011, 5:22 pm 
Offline

Joined: November 1st, 2010, 3:13 pm
Posts: 62
I understand why AHK can not know every style. But, from what I see about coding a STYLE or ExSTYLE, one must simply "Specify a plus or minus sign followed immediately by a decimal or hexadecimal style number." AHK might not care WHAT the numbers are--and need not--but, AHK CAN DETERMINE if the value is a value decimal or hexadecimal number, and thus if it is a valid (although possibly useless) option.

The other case I see where there is virtually an infinite number of options is the LABEL option. But, that too is parsable. That is, it must at least begin with the word LABEL. What the remaining text might be is indeterminant; however, it does not mean the option can not validated.

From what I see under the documentaion for GUI, there is a finite set of options, and thus AHK can validate them all. Have I missed some fine point? Are the options not all documented in the ONE place (the "GUI" topic)?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2011, 10:51 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Quote:
Have I missed some fine point?
Yes. It's not a matter of whether it can be done; I already suggested they were ignored intentionally. At the point of that comment, it's already known that the option is unknown (has no effect). As it is, if a non-essential option is invented in the next release and scripts use it, they will still run on older versions. Maybe it should raise an error dialog; maybe there are other reasons it doesn't.

Either way, it's not a "problem with documented functionality", so it doesn't really belong in Bug Reports. Wish List might be more appropriate, assuming you want it to be changed.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 17th, 2011, 2:33 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
After some consideration, I've decided to leave it how it is. There are a number of other commands which similarly ignore invalid options: Click, continuation sections, LV/TV functions, GuiControl. (Search the source code for "ignore it because it is unknown").


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group