1 # Copyright 2002-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: control_set.coretag,v 1.4 2007-03-30 23:40:49 pajamian Exp $
10 UserTag control-set Order index
11 UserTag control-set addAttr
12 UserTag control-set hasEndTag
13 UserTag control-set PosNumber 1
14 UserTag control-set Version $Revision: 1.4 $
15 UserTag control-set Routine <<EOR
16 # Batch sets a set of controls without affecting Scratch
17 # Increments the index afterwards unless index is defined
19 my ($index, $opt, $body) = @_;
23 $index = $::Scratch->{control_index} || 0;
27 while($body =~ m{\[([-\w]+)\](.*)\[/\1\]}sg) {
31 $::Control->[$index]{$name} = $val;
33 $::Scratch->{control_index}++;