problem with grouped field

MisterX b.xavier at internet.lu
Mon Nov 14 11:10:05 EST 2005


looks like a bug. I can reproduce it too (w2k).

try this instead.

use a vertical scroll bar:
 - start to endvalue = 0-32000 
 - page increments 1..

put the scrollbar right of the field as if it was the fields' 
scrollbar... Should fool anyone ;)

im still experimenting with a smooth movement (number wise...)

on scrollbardrag w
  put w
  put the height of fld 1 div the textheight of fld 1 into mylines
  put (the endvalue of me / the height of me) / (the endvalue of me /
mylines) into movementfactor
  put round(w * movementfactor) into myvalue
  repeat with x = 1 to mylines
    put myvalue + x into line x of fld 1
  end repeat
end scrollbardrag

it's not fast but it works linearly for number movement...
Alas it's not correct to get to the big numbers...

The mylines (the number of lines in the field) should increase like:

on scrollbardrag w
  put w
  put the height of fld 1 div the textheight of fld 1 into mylines
  put (the endvalue of me / the height of me) into movementfactor
  put round(w * movementfactor) into myvalue
  repeat with x = 1 to mylines
    put myvalue + x into line x of fld 1
  end repeat
end scrollbardrag

which almost gets to 32000... I'll let you find the quirks ;)

hope it's what you want... If you want the stack I made it in
let me know off list ;)

cheers
Xavier
http://monsieurx.com


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Wouter
> Sent: Monday, November 14, 2005 16:22
> To: How to use Revolution
> Subject: problem with grouped field
> 
> Hi all,
> 
> I encountered some problems with grouped fields with RR 2.6.1 
> (but also in former versions) on OS X 10.4.1
> 
> 1.  problem with scroll of group starting at 32779, field 
> disappears (at 32778 it still shows)), scroll is reset at zero.
> But clicking where the field is supposed to be reveals some lines.
> 2.  problem with height of field in group if  >  65535.
> The height of the field is reset to zero and starts growing 
> again when more lines are added.
> 
> Recipe:
> ingredients:
> - 1 field (no vScroll)  in a group (with vScroll)
> - 2 buttons
> - 2 scripts, one for each button:
> 
> on mouseUp
>    put "" into fld 1
>    repeat with i = 1 to 3200
>      put i & cr after tList
>    end repeat
>    put tList into fld 1
>    set the height of fld 1 to the formattedheight of fld 1
>    set the rect of grp 1 to 10,10,138,bottom of this cd - 50
>    put 32760 into a ### approximation of start of problem
>    repeat
>      add 1 to a
>      set the scroll of grp 1 to a
>      put the scroll of grp 1 into b
>      put a & cr & b
>      if a > b then exit repeat
>      wait 100 millisecs with messages
>      if the commandkey is down or the controlkey is down then 
> exit repeat
>    end repeat
> end mouseUp
> 
> on mouseUp
>    put "" into fld 1
>    repeat with i = 1 to 65400 div the effective textheight of fld 1
>      put i & cr after tList
>    end repeat
>    put tList into fld 1
>    set the height of fld 1 to the formattedheight of fld 1
>    set the rect of grp 1 to 10,10,138,bottom of this cd - 50
>    repeat
>      add 1 to i
>      put i & cr after fld 1
>      put the formattedheight of fld 1 into a
>      set the height of fld 1 to a
>      put the height of fld 1 into b
>      set the rect of grp 1 to 10,10,138,bottom of this cd - 50
>      put  i & cr & a & cr & b
>      lock screen
>      unlock screen
>      if a > b then exit repeat
>      if  the commandkey is down or the controlkey is down 
> then exit repeat
>    end repeat
> end mouseUp
> 
> beware of mail line wraps
> 
> I wanted to ask if someone could confirm this and if this is 
> also the case on other platforms.
> TIA,
> 
> Wouter
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list