Timeline for Passing a list of choices with different arguments for each choice
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 10, 2015 at 13:05 | vote | accept | 9a3eedi | ||
| Nov 9, 2015 at 18:21 | comment | added | 9a3eedi | The "execute" function will still be exposed though. But I figured that I can still make it so that the UI has no way of providing the parameters it needs to execute it :) You're right. And maybe I'm obsessing about this too much.. | |
| Nov 9, 2015 at 16:26 | comment | added | Euphoric | @9a3eedi Well. UI doesn't need to execute anything. It can just pass it back to the Core Logic where it will be executed. | |
| Nov 9, 2015 at 16:18 | comment | added | 9a3eedi | After thinking about it for a while, the Visitor pattern along with the rest of your answer sounds like the way to go, with one problem: how can I make sure that the UI executes only one of the choices that the Core has given it? I think I can work that out though. | |
| Nov 9, 2015 at 9:54 | history | edited | Euphoric | CC BY-SA 3.0 |
added 1 character in body
|
| Nov 9, 2015 at 9:54 | comment | added | Euphoric | @9a3eedi Right. | |
| Nov 9, 2015 at 9:33 | comment | added | 9a3eedi | Isn't typeof a static operator (i.e. resolved in compile time)? I think I would need to use GetType() in this case (which is not a problem) because the type passed to the UI is not known during compile time. Either way, it's a very good point to use types instead of enums. | |
| Nov 9, 2015 at 7:35 | history | answered | Euphoric | CC BY-SA 3.0 |