problem: I'd like to have a graphics output placed in a particular cell <outputRegion> in another notebook <pad> whenever a certain function <generate> is called. For textual output, the following works,
generate:= (SetSelectedNotebook[pad]; NotebookLocate["outputRegion"]; SelectionMove[pad,All, CellContents]; NotebookWrite[pad, Cell[BoxData[ToBoxes["This goes to outputRegion in pad"]], CellFrame->2, CellTags-> "outputRegion"]])
Line 5 clearly needs to be changed for graphical output. I want to output the results of a user-defined command <draw[A,B]> , which produces a generalized barchart.