I'm confused why the first one doesn't work, but the second one does. Can someone help me understand?
Append to the local variable "disks"
DynamicModule[{pt = {0, 0}, size = 0.001, addDisk, disks},
addDisk[pt_, size_] := AppendTo[disks, Disk[pt, size]];
disks = {Disk[pt, size]};
ClickPane[
Dynamic@
Graphics[
Join[Flatten@Table[Text["X", {a, b}], {a, -2, 2}, {b, -2, 2}],
disks]], (addDisk[disks, #, .2]) &]]
Append, but return to a "Set" evaluation within the "ClickPane" argument
DynamicModule[{pt = {0, 0}, size = 0.001, addDisk},
addDisk[disks_, pt_, size_] := Append[disks, Disk[pt, size]];
disks = {Disk[pt, size]};
ClickPane[
Dynamic@
Graphics[
Join[Flatten@Table[Text["X", {a, b}], {a, -2, 2}, {b, -2, 2}],
disks]], (disks = addDisk[disks, #, .2]) &]]