FIXMEs
I'm trying to get down to 0 warnings. If there's anything I can do to help with the #FIXME items in the code, let me know.
This one sounds easy enough, but I'm not sure what it should do if the function is nil.
#pragma message "FIXME: Check to see if function is nil or not."
Similarly, this one could do with a bit more explanation:
#pragma message "FIXME: we should stash a weak ref to the COScript at creation time, because who knows what other COScript might be around"
Of course it may be that it would take more time to explain what needs doing than to do it - in which case ignore me and close this ;)
The first one should probably throw an error (a JS exception at least).
The for the second one- the problem is that when callAction: is used, it looks at the current thread and whatever COScript is around and uses that jscontext. That's a bad idea if it's not the context which the COSTarget was created for. So initWithJSFunction: should somehow grab the current COScript that it's executing in and stash that in a weak ivar.