UI updates

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
knubile
Posts: 8
Joined: May 18th, 2006, 10:25 pm

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.
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

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
knubile
Posts: 8
Joined: May 18th, 2006, 10:25 pm

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?
explorer
Posts: 17
Joined: March 1st, 2007, 11:12 pm
Location: Poland, Warsaw

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...
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

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.
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.
Post Reply