« first day (1741 days earlier)      last day (2733 days later) » 

user147238
12:06 AM
The tag holdall has three questions so far. Looking at the info of the other tag hold, it seems that the former could be made a synonym of the latter.
 
user147238
I cannot suggest holdall as a synonym of hold as I do not have 5 scores in this tag. Could someone suggest it, or should I ask the question on Meta?
 
1:14 AM
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.
 
 
7 hours later…
7:52 AM
@William I believe that can be done programmatically!
 
8:06 AM
@William Well, maybe it a bit clunky, but it works. Keep your hands away from mouse and keyboard while its running!
(*this requires that targetNb is set. You can use
targetNB = EvaluationNotebook[];
in the other notebook for example.*)

sourceNb = EvaluationNotebook[];
outCells = Cells[CellStyle -> "Output"];
readOutCells = NotebookRead /@ outCells;
intermNb = NotebookPut@Notebook[readOutCells]
SetSelectedNotebook[intermNb];
SelectionMove[intermNb, All, Notebook];
FrontEndTokenExecute["Copy"];
NotebookClose[intermNb];
SetSelectedNotebook[targetNB]
SelectionMove[targetNB, After, Notebook];
FrontEndTokenExecute["Paste"];
@William Ah, I guess I was using the same approach as Mike in his answer to the question you posted here
 
 
1 hour later…
9:22 AM
could someone kindly guide me as to how to extract value of 'list' variable from DynamicModule
DynamicModule[{list = {}},
EventHandler[{Magnify[HighlightImage[img, imgmask], 5],
Dynamic@list}, {"MouseClicked", 1} :>
AppendTo[list, MousePosition["Graphics"]]]]
 
10:02 AM
@AliHashmi What do you mean, extract?
 
sorry i mean just get the variable
i have not done anything with dynamic module before and am having trouble :)
 
@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.
 
so i am pretty much scratching my head as to how to do basic Control object implementation
oh ok. so does that mean i can just use Dynamic instead
 
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.
 
you mean with dynamic modules i can create multiple interfaces each working independently of one another
and that Dynamic just ensures that the expression is updated whenever modified
 
10:11 AM
@AliHashmi Yes, read the example under "Basic examples" in the documentation for DynamicModule. That example shows what the purpose of DynamicModule is.
and yes
 
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.
 
Thanks will read up on it. any suggestion as to what would be the most appropriate architecture to create this functionality
sorry i mean to solve the problem
 
10:35 AM
@AliHashmi Well, I think it would look something like this:
DynamicModule[{
  var1 , var2, var3
  },
 Column[{
   Dynamic[graphics],
   Button["Add", f],
   Button["Delete", g],
   Button["Undo", h]
   }]
 ]
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.
 
and similarly the delete button might call for a second eventhandler to get the list of coordinates first before applying g
oh thanks.
i just need to see whether an eventhandler can be passed to a button
 
You don't want to do that.
 
so would not add button first be calling the user to get the list coordinates and thereafter apply function f
 
10:48 AM
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.
gtg
 
11:04 AM
thanks. will try to see it
 
 
4 hours later…
3:02 PM
thanks @C.E. and @Karsten7.
 
3:28 PM
@R.M. Ok, cool. Thanks ;)
 
 
7 hours later…
10:47 PM
0
Q: How can the CrossValidated Stack Exchange site be added to the re-direct listing?

Jim BaldwinFor 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...

 

« first day (1741 days earlier)      last day (2733 days later) »