Page 1 of 1

UI updates

Posted: May 19th, 2006, 8:16 am
by knubile
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.

refresh

Posted: May 19th, 2006, 10:16 pm
by redefinery
Hi knubile,

I haven't found a way to force a refresh while a script is running, other than dumping the info to the ExtendScript Toolkit's console or Info panel. Are you updating a statictext control? If so, does it work any better if you use an edittext control (assuming it'd be OK for your needs)?

Jeff

Posted: May 20th, 2006, 7:36 am
by knubile
Really?!? So there's no way to provide feedback to screen during a long process without having the editor open?

That's very strange that adobe would leave it like that.

I'll try the edittext idea, but in theory the UI simply won't update anything until the function returns. Very basic threading principle. I'm surprised Adobe didn't take care of this.
Probably a limitation of javascript.

What's the point of the progress bar control then? Have you ever used that and got it to work?

Posted: March 4th, 2007, 5:13 pm
by explorer
does any one know of an alternative java editor for AE? i thought about using eclipse, but then i think i'd have to install some extension to be able to do that.

i'm just wondering what do you guys use for your jsx scripting, because what adobe gave us is a mess...

Posted: March 5th, 2007, 7:42 am
by byronnash
I have used TextPad a lot for editing scripts. Someone wrote a syntax coloring template for it so it made it much easier to read.

alternative javascript editor

Posted: March 9th, 2007, 11:47 pm
by zold
Hi explorer,
explorer wrote:does any one know of an alternative java editor for AE? i thought about using eclipse, but then i think i'd have to install some extension to be able to do that.

i'm just wondering what do you guys use for your jsx scripting, because what adobe gave us is a mess...
see viewtopic.php?t=332
(including screenshot at bottom of page)

Incidentally, Java and JavaScript are totally different animals.