Subj : Frame and Scrollbar issue when re-using them To : Nightfox From : echicken Date : Wed Jan 11 2017 08:37 am Re: Frame and Scrollbar issue when re-using them By: Nightfox to All on Tue Jan 10 2017 21:44:56 Ni> I'm working on a Synchronet JS door that uses the Frame and Scrollbar Ni> objects defined in frame.js and scrollbar.js. My door, a voting door, has Ni> time I re-use it for new data. I've noticed that the scrollbar doesn't Ni> always seem to update properly with the length of the message in the Ni> frame. I'm wondering if I'm not using it properly though. I haven't looked at scrollbar.js in a while, but I haven't seen this problem with it before. I'll take a peek at how SlyVote is using it (if these changes are in CVS) to see if I can think of any ideas. Ni> Then my script enters the loop, where displayFrame.putmsg() is called for Ni> each piece of data I want to display. When I display the Frame, I call Ni> displayFrame.invalidate(), displayFrameScrollbar.cycle(), and Ni> displayFrame.cycle(). Ni> longer than the terminal height). For screen redraw optimization, I'd like It shouldn't be necessary to invalidate a Frame every time through the loop. In fact if you do that, you lose any screen redraw optimization since (IIRC) this will force the contents of the Frame to be redrawn / resent to the client. (I've found it necessary to use Frame.invalidate() on occasion, can't remember why, but not usually in a loop.) In the ScrollBar example, ScrollBar.cycle() is called after Frame.cycle(). I can't remember if this is for a reason, but it may be. However, in that case the changes to the ScrollBar won't be displayed until the next time the parent Frame is cycled. Depending on how your loop works and if there's a blocking input prompt in there, that could be part of it. --- echicken electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230 þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com .