How to use progress bar
Ken Ray
kray at sonsothunder.com
Sun Jun 6 21:29:49 EDT 2004
Bill,
I'll bet you converted a HyperCard stack, right? If so, check the
'hcAddressing'; if it's turned on, you have to refer to scrollbars in
background groups as "bg scrollbar"; if you turn it off, you can just
address it as "scrollbar".
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Bill
> Sent: Sunday, June 06, 2004 5:05 PM
> To: use-revolution at lists.runrev.com
> Subject: Re: How to use progress bar
>
>
> Thanks for all your answers. Since they still had no effect
> on my scroll bar when I tried them I decided that I have
> something wrong with my stack. First I put a progress bar in
> the group (assuming it would have to be there so it would be
> visible on every card as I cycle through the cards) and I get
> no such object so I changed the progress bar to a scroll bar
> (also named "Progress Scrollbar") and send a one line message
> to it and I get no such object.
>
> So then I made a clean stack with just one progress bar with
> the correct name and I get:
>
> Message execution error:
> Error description: Chunk: no such object
>
> So then I decide that maybe these things are not called
> "scrollBar" so I find out they are called "scrollbar" in the
> documentation (should make no difference . This makes a
> difference on my simple test stack so I move on to the big
> stack and find out I have to call it "bg scrollbar" and then
> it is happy except then set the lock screen to true so that
> going through all those cards won't take so long and the lock
> screen also makes my nice little progress bar do nothing.
>
> So how do you get a progress bar to work while lock screen is
> in effect? Perhaps I make a special pallette stack that holds
> it? Otherwise without lock screen things take way to long. It
> must be possible as you can make the spinning beachball with
> lock screen in effect.
>
>
> On 6/6/04 12:00 PM, "use-revolution-request at lists.runrev.com"
> <use-revolution-request at lists.runrev.com> wrote:
>
> > put the number of cards into recordCount
> > set the thumbPosition of scrollBar "Progress Scrollbar" to
> 0 set the
> > endvalue of scrollBar "Progress Scrollbar" to recordCount show
> > scrollBar "Progress Scrollbar" put 0 into recordsProcessed
> > put round(recordCount/(the width of scrollBar "Progress Scrollbar"))
> > into progressInterval -- the minimum change in
> thumbPosition value to
> > move the bar 1 pixel
> > put max(1,progressInterval) into progressInterval -- adjust
> for intervals < 1
> > repeat with x=1 to recordCount
> > set cursor to busy
> > [card processing logic here]
> > add 1 to recordsProcessed
> > if (recordsProcessed mod progressInterval)=0 then set the
> > thumbPosition of scrollBar "Progress Scrollbar" to recordsProcessed
> > end repeat
> > set the thumbPosition of scrollBar "Progress Scrollbar" to
> > recordCount -- yes, recordCount: make sure progress shows 100%
> > complete
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list