UI updates
Posted: May 19th, 2006, 8:16 am
Hey all,
I have a script that loads values from a file into keyframes in a composition. There are approximately 5000 keyframes being set.
I'm new to the scriptui components, but I followed some examples and have a palette up showing a label and a start button.
My problem is, when I hit start, it begins the whole keyframe generation process and the palette goes blank and won't update the text. I only update the text once every 1000 lines, so its only updating the label in the palette 5 times.
I'm using window.messageLabel.text = "blahblah";
Is that the right way to update the text so it redraws properly?
I'm a software developer and I understand that its probably running my code in the UI's thread and that's why it won't repaint. Its waiting for my code to end 1st.
How can I go about correcting this in javascript? I can't create a new thread can I?
Any help would be appreciated.
I have a script that loads values from a file into keyframes in a composition. There are approximately 5000 keyframes being set.
I'm new to the scriptui components, but I followed some examples and have a palette up showing a label and a start button.
My problem is, when I hit start, it begins the whole keyframe generation process and the palette goes blank and won't update the text. I only update the text once every 1000 lines, so its only updating the label in the palette 5 times.
I'm using window.messageLabel.text = "blahblah";
Is that the right way to update the text so it redraws properly?
I'm a software developer and I understand that its probably running my code in the UI's thread and that's why it won't repaint. Its waiting for my code to end 1st.
How can I go about correcting this in javascript? I can't create a new thread can I?
Any help would be appreciated.