Re: Scripting of buttonproducing field to give buttons backgroundBehavior

2005-01-23 Thread Bob Hartley
At 01:16 23/01/2005, you wrote:
I have met with the problem, that the handler of a field, which shall 
enable user to produce pre-scripted buttons, is able to produce the 
buttons with the scripts required, and place them where they shall be 
placed, - but all attempts  to, after group  set  backgroundBehavior to 
true is failing. Best would be, if they could be set to include 
themselves, as they are produced - now and then-by the user, in one big 
shared group. Anybody have a solution?

Hi there
You could always make a button on one stack that groups all buttons on 
yourStack and sets the background to true using this script.

on mouseUp
  repeat with i=1 to the number of controls of card 1 of stack yourStack
  put the long ID of control i of cd 1 of  stack yourStackandspace 
after theControls
end repeat
delete word -1 of theControls
put grouptheControls into toDoList
do toDoList
set the backgroundbehavior of the last group of cd 1 of stack yourStack 
to true
end mouseUp

If you wanted the button on the same stack then you could always set that 
button to hide after execution.

see revonline - user - nijinsky - and the stack group all fields via button
Cheers
Bob 

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting of buttonproducing field to give buttons backgroundBehavior

2005-01-23 Thread Bob Hartley
At 01:16 23/01/2005, you wrote:
I have met with the problem, that the handler of a field, which shall 
enable user to produce pre-scripted buttons, is able to produce the 
buttons with the scripts required, and place them where they shall be 
placed, - but all attempts  to, after group  set  backgroundBehavior to 
true is failing. Best would be, if they could be set to include 
themselves, as they are produced - now and then-by the user, in one big 
shared group. Anybody have a solution?

Ahhh sorry I realise you want to add to a group. I want to do this as well 
so I'll mail you if I get an answer.

You could use the earlier script I sent to group the objects and also add a 
line to rename the group to MasterGroup
Then use a button to ungroup the group MasterGroup.

cheers
bob


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting of buttonproducing field to give buttons backgroundBehavior

2005-01-23 Thread Bob Hartley
At 12:00 23/01/2005, you wrote:
At 01:16 23/01/2005, you wrote:
I have met with the problem, that the handler of a field, which shall 
enable user to produce pre-scripted buttons, is able to produce the 
buttons with the scripts required, and place them where they shall be 
placed, - but all attempts  to, after group  set  backgroundBehavior 
to true is failing. Best would be, if they could be set to include 
themselves, as they are produced - now and then-by the user, in one big 
shared group. Anybody have a solution?

Ahhh sorry I realise you want to add to a group. I want to do this as well 
so I'll mail you if I get an answer.

You could use the earlier script I sent to group the objects and also add 
a line to rename the group to MasterGroup
Then use a button to ungroup the group MasterGroup.

OK I posted a group and ungroup stack on revonline in the programming category.
Also on nijinsky's user space.
cheers
bob

cheers
bob


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting of buttonproducing field to give buttons backgroundBehavior

2005-01-23 Thread Alex Tweedly
Bob Hartley wrote:
At 01:16 23/01/2005, you wrote:
I have met with the problem, that the handler of a field, which shall 
enable user to produce pre-scripted buttons, is able to produce the 
buttons with the scripts required, and place them where they shall be 
placed, - but all attempts  to, after group  set  
backgroundBehavior to true is failing. Best would be, if they could 
be set to include themselves, as they are produced - now and then-by 
the user, in one big shared group. Anybody have a solution?
Ahhh sorry I realise you want to add to a group. I want to do this as 
well so I'll mail you if I get an answer.

You could use the earlier script I sent to group the objects and also 
add a line to rename the group to MasterGroup
Then use a button to ungroup the group MasterGroup.
An alternative approach MIGHT be to use the clone command.
If you clone a control which is already part of a group, then it to will 
be part of that group. So if there is at least one initial button in the 
background group, you could clone it and then modify the name / script 
/etc. of the newly created one.  Only an option if there is an initial 
background group with an initial button.

If you follow Bob's approach of ungrouping and regrouping, you could add 
a filter command to allow the option of having other controls which are 
not part of the background group (if you need that). Something like

on mouseUp
 addToGroup card id 1002, My Group, My Button
end mouseUp
on addToGroup pCard, pGroupName, pButton
 -- Adds button pButton to the group pGroupName on card pCard
 -- assumes controls and groups have unique names
 local L, tControls, toDo
 repeat with L = 1 to the number of controls of card pCard
   put the  long name of control L  cr after tControls
 end repeat
 filter tControls with (*of group   quote  pGroupName  quote  *)
 ungroup group pGroupName of card pCard
 put group  into toDo
 repeat with L = 1 to the number of lines in tControls
   put word 1 to 2 of line L of tControls   and  after toDo
 end repeat
 put button  quote  pButton  quote after toDo
 do toDo
 set the name of  last group to pGroupName
end addtoGroup
-- Alex.


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.1 - Release Date: 19/01/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting of buttonproducing field to give buttons backgroundBehavior

2005-01-23 Thread J. Landman Gay

I have met with the problem, that the handler of a field, which
shall enable user to produce pre-scripted buttons, is able to
produce the buttons with the scripts required, and place them where
they shall be placed, - but all attempts  to, after group  set
backgroundBehavior to true is failing. Best would be, if they
could be set to include themselves, as they are produced - now and
then-by the user, in one big shared group. Anybody have a solution?
Can you use create button buttonName in grp theBgGrp ?
This avoids all the grouping issues. You do have to have an existing 
group that is already set up with background behavior turned on. You can 
do that via script if you need to. Then add buttons as needed.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting of buttonproducing field to give buttons backgroundBehavior

2005-01-23 Thread Jeanne A. E. DeVoto
At 2:16 AM +0100 1/23/05, Kresten Bjerg wrote:
I have met with the problem, that the handler of a field, which 
shall enable user to produce pre-scripted buttons, is able to 
produce the buttons with the scripts required, and place them where 
they shall be placed, - but all attempts  to, after group  set 
backgroundBehavior to true is failing. Best would be, if they could 
be set to include themselves, as they are produced - now and then-by 
the user, in one big shared group. Anybody have a solution?
How are you creating the buttons? Do you use the create command, or 
some other method, in the handler of the field?
--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution