I bought a PS4 a month or two ago. One of the games I got was Madden 17. I haven't played a Madden game in 5 years or so. I must say, I am so impressed by the steady stream of free content updates. Weekly commentary updates (so the announcers in the game are actually referencing things that happened in the NFL the past weekend), new challenges, and things like the players got updated uniforms during the NFL breast cancer awareness push.
Now all the menus are themed for Halloween and fresh challenges themed around that as well. It's been so long since I've worked on a team that could even dream of pulling something like that off.
@AliHashmi It only exists inside DynamicModule, but if you don't want it to be a local variable like that you don't have to use DynamicModule. DynamicModule's only purpose is to make it local.
DynamicModule is like Module, but better suited for dynamic variables because if you copy the output cell and paste it then you get an independent copy, with its own local variables. This is good if your output is an interface, it means that you get two independent interfaces. When you change something in one cell, it doesn't affect the other.
Well, Dynamic and DynamicModule don't do the same thing.
Dynamic[expr] keeps expr up to date, DynamicModule[{...}, ...] localises variables. Two very different things.
@AliHashmi Yes, read the example under "Basic examples" in the documentation for DynamicModule. That example shows what the purpose of DynamicModule is.
i am trying to create an interface where i can import an image and then do two operations to it. "add an edge" one function and "delete an edge" another function
for applying either of these functions i need a list of coordinates that i wish to take from MousePosition["Graphics"]
then if i have specified "add edge" functionality then it takes the list of points and executes the "add edge" protocol
similarly if i had specified "delete edge" functionality then it takes the list of points and executes "delete edge" protocol
once the functions are executed i wish to save the results
or undo the function and get the previous image back if i call an "undo" command.
So now i am very confused as to how to put all this together as a control object which can process all this
I do not have any knowledge about the Control Objects functionality and therefore do not know where to begin
There are many examples is simple interfaces on the main site that you can learn from. Also I just remembered this which seems relevant to your original question.
Where graphics depends on a list of coordinates that are manipulated by the function f, g, h. Obviously this is not a detailed plan, just to give you an idea about what I expect the overall layout of your function to look like. var1, var2, var3 being local variables that you need to keep things in memory.
I guess theres should be an EventHandler in there as well, to add coordinates to a list when the mouse is clicked.
thanks. great. but since it is in dynamic module, the final result will be an interface? so if i have to save the output image as a result of applying "Add" or "Delete" or lets say even see the final output after repeatedly applying "Add" "Delete" a hundred times, how would i get the image out at the end for saving
yes maybe the add button calls for some eventhandler before applying function f
@AliHashmi Seeing the output should be no problem, just put the object your manipulating inside Dynamic, that's essentially what Dynamic[graphics] was meant to do. When you're done you could export it as an image I guess, just add a fourth button called "Export". But this was also the problem that was dealt with in this question that I posted above.
Just add an EventHandler that is always listening for mouse clicks, and if it's appropriate then do something when the mouse is clicked, if not, then don't.
Well, it depends on how you want your interface to work, but an EventHandler is not a function that you call on to listen for "ten clicks", it's a background process that you set up to listen for a certain type of events. Doesn't make any sense to do that based on user interaction I think.
For this recent question (goodness of fit for two histograms) it seems that CrossValidated would be a much more appropriate site than the Mathematics or Meta Mathematics Stack Exchange sites to transfer the question (as the question currently does not involve Mathematica software).
Can CrossVali...