Solution: Display of groups in Control Browser

Wilhelm Sanke sanke at hrz.uni-kassel.de
Fri Nov 26 21:40:38 EST 2004


On Fri, 26 Nov 2004 , Ken Ray wrote:

> On 11/26/04 11:25 AM, "Wilhelm Sanke" <[EMAIL PROTECTED]> wrote:

> > The problem - on our side - is located in the "refresh" handler of the
> > card script of the Control Browser. Presumeably the engine now treats
> > the number of layers in groups somewhat differently since version 2.6.1
> > (Metacard reading).
>
> Can you ellucidate, Wilhelm? What exactly changed?
>
> Just curious...
>
> Ken Ray
> Sons of Thunder Software


Ken,

what really changed escapes me, but it must be connected to the manner 
of reading the numbers of layers in a group.

You can easily see that for yourself. Add two lines in the part of the 
script determining the width of the indents, like in the following script

 if word 1 of the name of control i is "group" then
       if pad is empty then
         put the number of layers of control i into groupcontrols
        # ===========new line for testing=================       
         put CR&groupcontrols after last line of fld "test groupcontrols1"
        #===================================
       else
         subtract the number of layers of control i from the last item 
of groupcontrols
         put comma & the number of layers of control i after groupcontrols
        #====second line for testing==========================
         put CR&groupcontrols after last line of fld "test groupcontrols2"
        #===============================================
       end if
       put "  " after pad
     end if
     if pad is not empty then
       repeat while pad is not empty and last item of groupcontrols <= 0
         delete last item of groupcontrols
         delete char 1 to 2 of pad
       end repeat
       if pad is not empty then subtract 1 from last item of groupcontrols
     end if

and you will see that the results in both fields "test groupcontrolsX" 
differ with engines before and after version 2.6.1.

E.g., I got a card with 3 groups - and a couple more controls in between 
- the first two groups contain 2 controls each, the third group is a 
nested one with 4 controls altogether.

The result of the testlines is:

engine < 2.6.1

2
2
4
for "test groupcontrols1"

and

1,2

for "test groupcontrols2"

whereas for engines =< 2.6.1 the respective results are

2
4

and

2,2
4,2

If you test the other "groupcontrols" values farther down you get 
similar deviations.-

Maybe this is a so far unnoticed engine bug introduced with engine 
version 2.6.1 and affecting somehow - I really cannot elucidate (this 
could be answered probably by Tuviah?) - how layers in groups ar accessed.


Regards,

Wilhelm Sanke
<www.sanke.org>




More information about the metacard mailing list