set the tool of a stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
set the tool of a stack
Hi All,
I want set the tool of a main stack by a click to a btn of a substack and keep the browse tool for the substack
This script work well but you have maeby others ways more elegants
on mousemove --•• in the stack script of the main stack
global gLaCurTool
put "TestJLS 1.03" into LeMainStack
put "UnePalette" into LeSubStack
put the mousestack into LeCurStack
put the tool of this stack into bufTool
if LeCurStack = LeMainStack and bufTool <> gLaCurTool then
set the tool of this stack to gLaCurTool
end if
if LeCurStack = LeSubStack and bufTool <> "browse" then
set the tool of this stack to "browse"
end if
end mousemove
Thank for your help
I want set the tool of a main stack by a click to a btn of a substack and keep the browse tool for the substack
This script work well but you have maeby others ways more elegants
on mousemove --•• in the stack script of the main stack
global gLaCurTool
put "TestJLS 1.03" into LeMainStack
put "UnePalette" into LeSubStack
put the mousestack into LeCurStack
put the tool of this stack into bufTool
if LeCurStack = LeMainStack and bufTool <> gLaCurTool then
set the tool of this stack to gLaCurTool
end if
if LeCurStack = LeSubStack and bufTool <> "browse" then
set the tool of this stack to "browse"
end if
end mousemove
Thank for your help
Last edited by jmburnod on Thu Apr 30, 2009 8:40 pm, edited 1 time in total.
Bon soir jmburnod,
I'm not sure if I understand what you are looking for but maybe this helps:
If a stack is opened as a "palette" (looks like your substack "UnePalette"
IS in fact a palette window, right?) then the "tool" of this stack will ALWAYS
be the browse tool!
(As you can see with the REV tools palette!)
So in this palette stack your button to change the "tool" could use this simple script:
And the rest will happen automatically 
(IF I understand you correctly!)
Anyway, that's the way you should implement a "tools" palette at all.
Au revoir d'allemagne
Klaus
I'm not sure if I understand what you are looking for but maybe this helps:
If a stack is opened as a "palette" (looks like your substack "UnePalette"

IS in fact a palette window, right?) then the "tool" of this stack will ALWAYS
be the browse tool!
(As you can see with the REV tools palette!)
So in this palette stack your button to change the "tool" could use this simple script:
Code: Select all
on mouseup
choose pointer tool
end mouseup

(IF I understand you correctly!)
Anyway, that's the way you should implement a "tools" palette at all.
Au revoir d'allemagne
Klaus
set the tool of a stack
Guten Abend Klaus,
Und danke für deine hilfe.
Yes, you have understand perfectly my need.
I tested "choose pointer tool " but the tool of the substack change also to pointer (with revolution 2.9)
It work for you ?
Mit freudlischen grüssen von Genf
Jean-Marc
Und danke für deine hilfe.
Yes, you have understand perfectly my need.
I tested "choose pointer tool " but the tool of the substack change also to pointer (with revolution 2.9)
It work for you ?
Mit freudlischen grüssen von Genf
Jean-Marc
Ah, ein Schwyzer 
Bonjour Jean-Marc,
you need to open your substack as palette like:
...
go stack "UnePalette" as palette
...
to make it work.
Try this and come back if it does not work.
Remember to keep the GUI (Graphical User Interface) standards where a "tools" stack should be a palette window (like the REV tools palette).
Au revoir
Klaus

Bonjour Jean-Marc,
you need to open your substack as palette like:
...
go stack "UnePalette" as palette
...
to make it work.
Try this and come back if it does not work.
Remember to keep the GUI (Graphical User Interface) standards where a "tools" stack should be a palette window (like the REV tools palette).
Au revoir
Klaus
set the tool of a stack
Vielen dank noch einmal Klaus,
I try with "as palette" and i can set the tool for browse,image,select
but
the others change only after a selection of the tool on the revtool
Is there an "initPaintTool" or something like that ?
Jean-Marc
I try with "as palette" and i can set the tool for browse,image,select
but
the others change only after a selection of the tool on the revtool
Is there an "initPaintTool" or something like that ?
Jean-Marc
set the tool of a stack
Hi Klaus
Sorry for my poor english
I trying to do a toolpalette for paint an image on the main stack
The tool palette is open as palette and there is a fld with a list of tools
One clic on a line change the tool of the main stack
It work for some tools immediately (browse,image and pointer) but not for
brush, bucket, eraser and spray :
For exemple, the tool of the stack return "brush tool" but the cursor dont change and the brush dont work.
Jean-Marc
Sorry for my poor english
I trying to do a toolpalette for paint an image on the main stack
The tool palette is open as palette and there is a fld with a list of tools
One clic on a line change the tool of the main stack
It work for some tools immediately (browse,image and pointer) but not for
brush, bucket, eraser and spray :
For exemple, the tool of the stack return "brush tool" but the cursor dont change and the brush dont work.
Jean-Marc
Jean-Marc,
try
or
for the cursor to change you have to set a brush etc on top of choosing the brush tool
regards
Bernd
try
Code: Select all
on mouseUp
choose brush tool
set the brush to 8
--set the brushcolor to black
end mouseUp
Code: Select all
on mouseUp
choose eraser
set the eraser to 12
end mouseUp
regards
Bernd
set the tool of a stack
YES,
bucket, brush, eraser and spray work fine now
many thanks
Jean-Marc
bucket, brush, eraser and spray work fine now
many thanks
Jean-Marc