I’m trying to create a simple app with two tabs, each tab allowing a file to be dragged and dropped onto it. I’ve created a large box in each tab and given the boxes a “drop” handler. I’ve then added a “register drag types {“file names”}” to “awake from nib.” However, when I turn on “awake from nib” for each box, the program throws up a NSCannotCreateScriptCommandError(10) error at launch, yet functions perfectly well. If I turn off “awake from nib” for one box, the problem goes away, but this box loses its drag and drop functionality. What might I be doing wrong?
My second issue is that I have a large image inside each box. Right now the images function as a dead zone for drops - I have to drop the files in the blank space of the box in order for them to register. Is there a way to have drag and drop ignore the images all together? Thanks!
The problem seems to have dislodged itself. :o I realized that I only had XCode 2.0 installed on this computer and so upgraded to 2.2. I then kept working on an unrelated part of the app, and the problem disappeared on the next compile. Before I posted this thread I had tried setting the two boxes and two images to have drop handlers (this created three errors). Now doing this same setup causes no errors and works perfectly. Strange…
Thanks for the suggestion - if it starts acting up again I’ll give that a shot. I was originally going to do it that way but found that dragging in an image would cause it to incorrectly replace the image that was already there. After digging into Apple’s drag and drop example project I see that an empty “conclude drop” will solve that.