backgroundgroup get changed when I place it on a card (Now in TEXT format)

J. Landman Gay jacque at hyperactivesw.com
Tue Jan 17 22:33:14 CST 2006


Reinhold Venzl-Schubert wrote:
> Ok,
> 
> I found the button to switch of the html-code.
> ;-)

Thanks. Text-based mailing list don't like HTML code. ;)

> Here is my question again:
> 
> I have a stack with three different backgrounds. To create a new card
> the program ask for the desired background.
> Then it goes to the last card, and creates a new one. The new card
> gets the background of the formerly last card.
> Then the program asks for the background of the new card. When it is
> different to the desired one, it removes the wrong background and
> replaces the desired one onto the card.
> 
> The available backgrounds are "BgKonjug", "BgWorSat" and "BgInfPar"
> When it replaces the background "BgWorSat" then "BgWorSat" changed:
> One field of if gets a little bit bigger then before. All cards with
> this background are concerned.
> The normal field-size is height/width 24/584 and afterward it is
> 28/588. 4 point larger in each direction.
> 
>   The program memorize the desired background in the variable "BgWhl"
> 
> This is my script to change the backgrounds:
> 
>    if BgWhl = "BgKonjug" then
>      repeat for each item k in "BgWorSat,BgInfPar"
>        if there is a grp k then
>          remove grp k from this cd
>          place bg "BgKonJug" onto this cd
>        end if
>      end repeat
>    else
>      if BgWhl = "BgWorSat" then
>        repeat for each item k in "BgKonJug,BgInfPar"
>          if there is a grp k then
>            remove grp k from this cd
>            place bg "BgWorSat" onto this cd
>          end if
>        end repeat
>      else
>        if BgWhl = "BgInfPar" then
>          repeat for each item k in "BgWorSat,BgKonJug"
>            if there is a grp k then
>              remove grp k from this cd
>              place bg "BgInfPar" onto this cd
>            end if
>          end repeat
>        end if
>      end if
>    end if
> 
> All fields in the backgroundgroups has the same fieldproperties and
> the "Lock Location" is selected.
> 
> What can I do to fix this mistake?

There must be something else that is changing the field because the 
behavior you describe isn't normal. See if you have any scripts that 
change the size of background objects. Or, as Chipp suggested, make sure 
that you don't have two copies of the same backgrouund on the card.

It might help if you change the way your script works. I think I would 
do something like this instead:

on makeCard BgWhl
   go bg BgWhl -- the group must have backgroundBehavior set to true
   create card -- automatically copies the bg to the new card
   set the number of it to the number of cds -- change the card order
end makeCard

This handler does what your long one does, but doesn't need to add and 
remove background groups. It uses Rev's native background behavior to 
automatically copy a background during the creation of a new card. Then 
it changes the card number to be the last one in the stack.

The handler will work no matter how many background groups you are 
working with, so you don't have to rewrite it if you add more 
backgrounds. It's a lot shorter too. :)


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the metacard mailing list