Never mind. Got it working! If anybody else struggles with this, the issue was that the callback function can't have an argument, so the line:
Code:
currentItem.onStatusChanged=statusChange(i);
should have read:
Code:
currentItem.onStatusChanged=statusChange;
And instead of defining the function:
Code:
function statusChange(index)
It should be:
Code:
function statusChange()
You can use the "this" keyword to get the current RenderQueueItem, which is what I was trying to do all along by having the argument in the function call (although I couldn't figure out how to get the item index if I only knew the RenderQueueItem, but I was able to work around that). Maybe this is obvious for long-time javascript-ers (which I'm not), but it would have been nice if there was something in the documentation about that.
Anyway, this is a great site; looking at the archives has been a fantastic resource for delving into AE scripting.
- David