If it is all in the same file, then you can use the local variable "cp" instead of the global "cp_frame"
If the frame is being created in one file and accessed in another, you can access it like this...
local cp_frame = _G["cp_frame"];
which looks in the global table for the global variable named "cp_frame"
|