Suppose a user inputs a list of CellObject
-s to operate on. How might one check these objects to determine if they actually belong to the EvaluationNotebook
? Here is a given sample:
cells = Cells[CellStyle->"Input"]
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityYou can do this to check whether they all belong there:
DeleteDuplicates[ParentNotebook /@ cells] === { EvaluationNotebook[] }
ParentNotebook[_CellObject]
, this gives you information about cell's notebook, then you can do whatever you need. I chose this way, it should do the job but feel free to do whatever you wish.
$\endgroup$