Can we move the index of events to a seperate page or maybe just a create sub pages for each lable/grouping of Actions/Events/Conditions/Functions so the overview page isn't cluttered up? I may do it, just want your thoughts so it doesn't make a mess of anyone's plans.
Correct, the distinction is purely for the GUI. Conditions are simply functions that have a return type of boolean. So any place that demands a condition will only allow conditions, but you can certainly use functions that return boolean in other places, which include conditions.
In programming terms, Actions/Conditions/Functions are all functions
Action = void someFunc();
Condition = boolean someFunc();
Function = anyType someFunc();
I know this is pretty low level, so I will probably have to make a page or two on this if I do pages regarding the flags and creating your own GUI constructs.
When I say GUI constructs, I mean things like For Each Unit in Unit Group, and Switch/Case.
Conditions are functions, but they are boolean only functions. When defining a GUI construct, you can control what GUI element can be used in specific locations, so in this way, the GUI can guarantee a boolean function is used where a boolean is expected, so you can't cause subtle logic errors that arise otherwise.
This is a product of the fact that the underlying language is C like, so the return of integers is perfectly valid for boolean comparisons and many of the GUI types are expressed as integer handles. Without the limits on the conditions, I could very easily do a function that returns a dialog item into a boolean, and it would be accepted (this can be used a short hack to verify that a non null/valid dialog item was returned, considered poor coding).
Also I'll see about, if you haven't already, adding documentation on each flag, since many of them are conditional and rely on underlying macros to work correctly (many of them simply force the macros to actually be evaluated).
Perhaps we might want a page on macros in galaxy?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Can we move the index of events to a seperate page or maybe just a create sub pages for each lable/grouping of Actions/Events/Conditions/Functions so the overview page isn't cluttered up? I may do it, just want your thoughts so it doesn't make a mess of anyone's plans.
Correct, the distinction is purely for the GUI. Conditions are simply functions that have a return type of boolean. So any place that demands a condition will only allow conditions, but you can certainly use functions that return boolean in other places, which include conditions.
In programming terms, Actions/Conditions/Functions are all functions
Action = void someFunc();
Condition = boolean someFunc();
Function = anyType someFunc();
I know this is pretty low level, so I will probably have to make a page or two on this if I do pages regarding the flags and creating your own GUI constructs.
When I say GUI constructs, I mean things like For Each Unit in Unit Group, and Switch/Case.
I'll review the pages.
Conditions are functions, but they are boolean only functions. When defining a GUI construct, you can control what GUI element can be used in specific locations, so in this way, the GUI can guarantee a boolean function is used where a boolean is expected, so you can't cause subtle logic errors that arise otherwise.
This is a product of the fact that the underlying language is C like, so the return of integers is perfectly valid for boolean comparisons and many of the GUI types are expressed as integer handles. Without the limits on the conditions, I could very easily do a function that returns a dialog item into a boolean, and it would be accepted (this can be used a short hack to verify that a non null/valid dialog item was returned, considered poor coding).
Also I'll see about, if you haven't already, adding documentation on each flag, since many of them are conditional and rely on underlying macros to work correctly (many of them simply force the macros to actually be evaluated).
Perhaps we might want a page on macros in galaxy?