Line	Calls	Milliseconds
button "GreyTranspa_switch" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		1633	turnToGrayTranspa
53	1	0	on turnToGrayTranspa pixSourceName, pixDestName, imgWidth, imgHeight, xRed, xGreen, xBlue, brightness, fc, invertBWboolean
54	1	0	   put "" into log
55	1	0	   addToLog log, "Button:" && the short name of me
56	1	0	   addToLog log, imgWidth && "x" && imgHeight && "pixels"
57	1	0	   addToLog log, "r = " & xRed && "  g = " & xGreen && "  b = " & xBlue
58	1	0	   addToLog log, "brightness = " & brightness
59			   
60			   ----------------------------------------------------- prépa : négatif
61	1	0	   if (invertBWboolean) then
62			      put 255 into grayCorrection
63	1	0	   else put 0 into grayCorrection
64	1	0	   addToLog log, "invertBWboolean = " & invertBWboolean && "  --> grayCorrection = " & grayCorrection
65			   
66			   ----------------------------------------------------- prépa : contraste
67	1	0	   put 0 - (fc^5 + 0.05) into fp5 -- pré-calcul
68	1	0	   put sqrt(fc) into racf -- pré-calcul
69	1	0	   addToLog log, "fc = " & fc
70			   
71			   ----------------------------------------------------- prépa : image et transparence
72	1	0	   put the imageData of image pixSourceName into tImage
73	1	0	   local aImage -- pour alphaData
74			   
75			   ----------------------------------------------------- 
76	1	0	   local tPixel, tChar, tSubPixel, tImgPosition, tGray
77			   # repeat for all the pixels in the image
78	1	0	   put 0 into tPixel
79	65537	182	   repeat for each char tChar in tImage 
80	65536	186	      add 1 to tPixel
81	65536	210	      put tPixel mod 4 into tSubPixel
82	65536	271	      switch tSubPixel
83			         case 1 #trasparency
84			            #	put tChar after tImage2
85	16384	44	            break
86			            ----------------------------------------------------- extractions des composantes RGB   	
87			         case 2 #red
88	16384	55	            put chartonum(tChar) into tRed
89	16384	47	            break
90			         case 3 #green
91	16384	76	            put chartonum(tChar) into tGreen
92	16384	49	            break
93			         case 0 #blue
94	16384	45	            put chartonum(tChar) into tBlue
95			            --------------------- application auto "négatif"
96	16384	59	            put abs(grayCorrection - ((xRed * tRed) + (xGreen * tGreen) + (xBlue * tBlue))) into tGray
97			            		
98			            ----------------------------------------------------- contraste
99	16384	56	            if (f > 0) then
100	16384	61	               put (tGray * (1 - racf)) + racf * (255 / (1 + (0.9921875 * exp(fp5 * (tGray - 128))))) into tGray
101			            end if
102			            	
103			            ----------------------------------------------------- éclaircissement général
104	16384	45	            put min(255, brightness + tGray) into tGray
105			            	
106			            ----------------------------------------------------- application des nouvelles valeurs de gris
107	16384	46	            put numToChar(tGray) into ntcGray
108	16384	76	            put ntcGray & ntcGray & ntcGray into char (tPixel - 2) to (tPixel + 0) of tImage
109			            	
110			            ----------------------------------------------------- transparence toutes valeurs (alphaData)
111			            --------- transparence proportionnelle à la valeur de gris : plus c'est clair -> plus c'est transparent
112	16384	57	            put binaryEncode("C", 255 - tGray) after aImage -- 0 = transparent et 255 : opaque
113	16384	46	            break
114			      end switch 
115			   end repeat
116			   
117			   -------------------------------------------------------- affectation image dest
118	1	2	   set the imageData of image pixDestName to tImage
119	1	8	   set the alphaData of img pixDestName to aImage
120	2	12	   if (there is a fld "Log") then put log into fld "Log" --/////
121	1	0	end turnToGrayTranspa

button "GreyTranspa_Each" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		1515	turnToGrayTranspa
53	1	0	on turnToGrayTranspa pixSourceName, pixDestName, imgWidth, imgHeight, xRed, xGreen, xBlue, brightness, fc, invertBWboolean
54	1	0	   put "" into log
55	1	0	   addToLog log, "Button:" && the short name of me
56	1	0	   addToLog log, imgWidth && "x" && imgHeight && "pixels"
57	1	0	   addToLog log, "r = " & xRed && "  g = " & xGreen && "  b = " & xBlue
58	1	0	   addToLog log, "brightness = " & brightness
59			   
60			   ----------------------------------------------------- prépa : négatif
61	1	0	   if (invertBWboolean) then
62			      put 255 into grayCorrection
63	1	0	   else put 0 into grayCorrection
64	1	0	   addToLog log, "invertBWboolean = " & invertBWboolean && "  --> grayCorrection = " & grayCorrection
65			   
66			   ----------------------------------------------------- prépa : contraste
67	1	0	   put 0 - (fc^5 + 0.05) into fp5 -- pré-calcul
68	1	0	   put sqrt(fc) into racf -- pré-calcul
69	1	0	   addToLog log, "fc = " & fc
70			   
71			   ----------------------------------------------------- prépa : image et transparence
72	1	0	   put the imageData of image pixSourceName into tImage
73	1	0	   local aImage -- pour alphaData
74			   
75			   ----------------------------------------------------- 
76	1	0	   local tPixel, tChar, tSubPixel, tImgPosition, tGray
77			   # repeat for all the pixels in the image
78	1	0	   put 0 into tPixel
79	65537	220	   repeat for each char tChar in tImage 
80	65536	213	      add 1 to tPixel
81	65536	208	      put tPixel mod 4 into tSubPixel
82	65536	209	      if (tSubPixel = 0) then
83	16384	71	         put charToNum(char(tPixel - 2) of tImage) into tRed
84	16384	53	         put charToNum(char(tPixel - 1) of tImage) into tGreen
85	16384	61	         put chartonum(tChar) into tBlue
86			         ----------------------------------------------------- application auto "négatif"
87	16384	65	         put abs(grayCorrection - ((xRed * tRed) + (xGreen * tGreen) + (xBlue * tBlue))) into tGray
88			         		
89			         ----------------------------------------------------- contraste
90	16384	64	         if (f > 0) then
91	16384	62	            put (tGray * (1 - racf)) + racf * (255 / (1 + (0.9921875 * exp(fp5 * (tGray - 128))))) into tGray
92			         end if
93			         	
94			         ----------------------------------------------------- éclaircissement général
95	16384	60	         put min(255, brightness + tGray) into tGray
96			         	
97			         ----------------------------------------------------- application des nouvelles valeurs de gris
98	16384	39	         put numToChar(tGray) into ntcGray
99	16384	92	         put ntcGray & ntcGray & ntcGray into char (tPixel - 2) to (tPixel + 0) of tImage
100			         	
101			         ----------------------------------------------------- transparence toutes valeurs (alphaData)
102			         --------- transparence proportionnelle à la valeur de gris : plus c'est clair -> plus c'est transparent
103	16384	74	         put binaryEncode("C", 255 - tGray) after aImage -- 0 = transparent et 255 : opaque
104			      end if
105			   end repeat
106			   
107			   -------------------------------------------------------- affectation image dest
108	1	2	   set the imageData of image pixDestName to tImage
109	1	8	   set the alphaData of img pixDestName to aImage
110	2	13	   if (there is a fld "Log") then put log into fld "Log" --/////
111	1	1	end turnToGrayTranspa

button "GreyTranspa_after" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		735	turnToGrayTranspa
53	1	0	on turnToGrayTranspa pixSourceName, pixDestName, imgWidth, imgHeight, xRed, xGreen, xBlue, brightness, fc, invertBWboolean
54	1	0	   put "" into log
55	1	0	   addToLog log, "Button:" && the short name of me
56	1	0	   addToLog log, imgWidth && "x" && imgHeight && "pixels"
57	1	0	   addToLog log, "r = " & xRed && "  g = " & xGreen && "  b = " & xBlue
58	1	0	   addToLog log, "brightness = " & brightness
59			   
60			   ----------------------------------------------------- prépa : négatif
61	1	0	   if (invertBWboolean) then
62			      put 255 into grayCorrection
63	1	0	   else put 0 into grayCorrection
64	1	0	   addToLog log, "invertBWboolean = " & invertBWboolean && "  --> grayCorrection = " & grayCorrection
65			   
66			   ----------------------------------------------------- prépa : contraste
67	1	0	   put 0 - (fc^5 + 0.05) into fp5 -- pré-calcul
68	1	0	   put sqrt(fc) into racf -- pré-calcul
69	1	0	   addToLog log, "fc = " & fc
70			   
71			   ----------------------------------------------------- prépa : image et transparence
72	1	0	   put the imageData of image pixSourceName into tImage
73	1	0	   local newImage
74	1	0	   local aImage -- pour alphaData
75			   
76			   ----------------------------------------------------- 
77	1	0	   local tPixel, tImgPosition, tGray
78			   # repeat for all the pixels in the image
79	16385	47	   repeat with tImgPosition = 0 to 4*((imgWidth * imgHeight) - 1) step 4
80			      ----------------------------------------------------- extractions des composantes RGB
81			      # multiply the image pixel position by 4 (Alpha + Red + Green + Blue)
82			      /* ============================== plus long
83			      # calculate the gray level
84			      put charToNum(char(tImgPosition + 2) of tImage) into tRed
85			      put charToNum(char(tImgPosition + 3) of tImage) into tGreen
86			      put charToNum(char(tImgPosition + 4) of tImage) into tBlue
87			      ----------------------------------------------------- gris
88			      # here you can use any grayscale formula
89			      # set the RGB of the pixel to the same value this gives us the gray level (0-255)
90			      --put (xRed * tRed) + (xGreen * tGreen) + (xBlue * tBlue) into tGray
91			      --------------------- application auto "négatif"
92			      put abs(grayCorrection - ((xRed * tRed) + (xGreen * tGreen) + (xBlue * tBlue))) into tGray
93			      ============================== */
94			      ------------ calcul valeurs gris et application auto "négatif"
95	16384	276	      put abs(grayCorrection - ((xRed * charToNum(char(tImgPosition + 2) of tImage)) + \
96			            (xGreen * charToNum(char(tImgPosition + 3) of tImage)) + \
97			            (xBlue * charToNum(char(tImgPosition + 4) of tImage)))) into tGray
98			      
99			      ----------------------------------------------------- contraste
100	16384	53	      if (fc > 0) then
101			         put (tGray * (1 - racf)) + racf * (255 / (1 + (0.9921875 * exp(fp5 * (tGray - 128))))) into tGray
102			         -- Rislon : (x * (1 - sqrt(fc))) + sqrt(fc) * (255 / (1 + (0.9921875 * exp(-(fc^5 + 0.05) * (x - 128)))))
103			         /* -- plus précis mais plus long
104			         if (fc >=  0.5) then
105			            put exp(-2 * (tGray - 128) * fc^4) into tmg
106			            put floor(128 + 127.5 * (1 - tmg) / ( 1 + tmg)) into tGray
107			         else
108			            put exp(-2 * (tGray - 128) * 0.5^4) into tmg
109			            get 128 + 127.5 * (1 - tmg) / ( 1 + tmg)
110			            put floor(tGray * (1 - 2 * fc) + 2 * fc * it) into tGray
111			         end if
112			         */
113			      end if
114			      
115			      ----------------------------------------------------- éclaircissement général
116	16384	56	      put min(255, brightness + tGray) into tGray
117			      
118			      ----------------------------------------------------- application des nouvelles valeurs de gris
119	16384	59	      put numToChar(tGray) into ntcGray
120	16384	154	      put char(tImgPosition + 1) of tImage & ntcGray & ntcGray & ntcGray after newImage
121			      
122			      ----------------------------------------------------- transparence toutes valeurs (alphaData)
123			      --------- transparence proportionnelle à la valeur de gris : plus c'est clair -> plus c'est transparent
124			      /*
125			      binaryEncode("C",0) --> transparentPixel
126			      binaryEncode("C",255) --> opaquePixel
127			      */
128	16384	68	      put binaryEncode("C", 255 - tGray) after aImage -- 0 = transparent et 255 : opaque
129			   end repeat
130			   
131			   -------------------------------------------------------- affectation image dest
132	1	2	   set the imageData of image pixDestName to newImage
133	1	8	   set the alphaData of img pixDestName to aImage
134	2	12	   if (there is a fld "Log") then put log into fld "Log" --/////
135	1	0	end turnToGrayTranspa

button "GreyTranspa" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		486	turnToGrayTranspa
53	1	0	on turnToGrayTranspa pixSourceName, pixDestName, imgWidth, imgHeight, xRed, xGreen, xBlue, brightness, fc, invertBWboolean
54	1	0	   put "" into log
55	1	0	   addToLog log, "Button:" && the short name of me
56	1	0	   addToLog log, imgWidth && "x" && imgHeight && "pixels"
57	1	0	   addToLog log, "r = " & xRed && "  g = " & xGreen && "  b = " & xBlue
58	1	0	   addToLog log, "brightness = " & brightness
59			   
60			   ----------------------------------------------------- prépa : négatif
61	1	0	   if (invertBWboolean) then
62			      put 255 into grayCorrection
63	1	0	   else put 0 into grayCorrection
64	1	0	   addToLog log, "invertBWboolean = " & invertBWboolean && "  --> grayCorrection = " & grayCorrection
65			   
66			   ----------------------------------------------------- prépa : contraste
67	1	0	   put 0 - (fc^5 + 0.05) into fp5 -- pré-calcul
68	1	0	   put sqrt(fc) into racf -- pré-calcul
69	1	0	   addToLog log, "fc = " & fc
70			   
71			   ----------------------------------------------------- prépa : image et transparence
72	1	1	   put the imageData of image pixSourceName into tImage
73	1	0	   local aImage -- pour alphaData
74			   
75			   ----------------------------------------------------- 
76	1	0	   local tPixel, tImgPosition, tGray
77			   # repeat for all the pixels in the image
78	16385	50	   repeat with tImgPosition = 0 to 4*((imgWidth * imgHeight) - 1) step 4
79			      ----------------------------------------------------- extractions des composantes RGB
80			      # multiply the image pixel position by 4 (Alpha + Red + Green + Blue)
81			      /* ============================== plus long
82			      # calculate the gray level
83			      put charToNum(char(tImgPosition + 2) of tImage) into tRed
84			      put charToNum(char(tImgPosition + 3) of tImage) into tGreen
85			      put charToNum(char(tImgPosition + 4) of tImage) into tBlue
86			      ----------------------------------------------------- gris
87			      # here you can use any grayscale formula
88			      # set the RGB of the pixel to the same value this gives us the gray level (0-255)
89			      --put (xRed * tRed) + (xGreen * tGreen) + (xBlue * tBlue) into tGray
90			      --------------------- application auto "négatif"
91			      put abs(grayCorrection - ((xRed * tRed) + (xGreen * tGreen) + (xBlue * tBlue))) into tGray
92			      ============================== */
93			      ------------ calcul valeurs gris et application auto "négatif"
94	16384	112	      put abs(grayCorrection - ((xRed * charToNum(char(tImgPosition + 2) of tImage)) + \
95			            (xGreen * charToNum(char(tImgPosition + 3) of tImage)) + \
96			            (xBlue * charToNum(char(tImgPosition + 4) of tImage)))) into tGray
97			      
98			      ----------------------------------------------------- contraste
99	16384	49	      if (fc > 0) then
100			         put (tGray * (1 - racf)) + racf * (255 / (1 + (0.9921875 * exp(fp5 * (tGray - 128))))) into tGray
101			         -- Rislon : (x * (1 - sqrt(fc))) + sqrt(fc) * (255 / (1 + (0.9921875 * exp(-(fc^5 + 0.05) * (x - 128)))))
102			         /* -- plus précis mais plus long
103			         if (fc >=  0.5) then
104			            put exp(-2 * (tGray - 128) * fc^4) into tmg
105			            put floor(128 + 127.5 * (1 - tmg) / ( 1 + tmg)) into tGray
106			         else
107			            put exp(-2 * (tGray - 128) * 0.5^4) into tmg
108			            get 128 + 127.5 * (1 - tmg) / ( 1 + tmg)
109			            put floor(tGray * (1 - 2 * fc) + 2 * fc * it) into tGray
110			         end if
111			         */
112			      end if
113			      
114			      ----------------------------------------------------- éclaircissement général
115	16384	44	      put min(255, brightness + tGray) into tGray
116			      
117			      ----------------------------------------------------- application des nouvelles valeurs de gris
118	16384	63	      put numToChar(tGray) into ntcGray
119	16384	87	      put ntcGray & ntcGray & ntcGray into char (tImgPosition + 2) to (tImgPosition + 4) of tImage
120			      
121			      ----------------------------------------------------- transparence toutes valeurs (alphaData)
122			      --------- transparence proportionnelle à la valeur de gris : plus c'est clair -> plus c'est transparent
123			      /*
124			      binaryEncode("C",0) --> transparentPixel
125			      binaryEncode("C",255) --> opaquePixel
126			      */
127	16384	53	      put binaryEncode("C", 255 - tGray) after aImage -- 0 = transparent et 255 : opaque
128			   end repeat
129			   
130			   -------------------------------------------------------- affectation image dest
131	1	3	   set the imageData of image pixDestName to tImage
132	1	9	   set the alphaData of img pixDestName to aImage
133	2	14	   if (there is a fld "Log") then put log into fld "Log" --/////
134	1	1	end turnToGrayTranspa

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/message box/behaviors/revmessageboxsinglelinecardbehavior.livecodescript"
		297	layoutCard
43	8	0	on layoutCard
44	8	0	   set the rect of group "fields" of me to the contentRect of me
45	8	0	   lock screen
46	8	0	   local tLeft, tTop, tRight, tBottom, tWidth
47	8	0	   lock messages
48			   
49	8	0	   put the left of group "fields" of me into tLeft
50	8	0	   put the top of group "fields" of me into tTop
51	8	0	   put the right of group "fields" of me into tRight
52	8	0	   put the bottom of group "fields" of me into tBottom
53			   
54	8	0	   local tHeight
55	8	0	   put the effective textHeight of field "message" of me into tHeight
56			   
57	8	0	   local tMargins
58	8	0	   put the margins of field "message" of me into tMargins
59	8	0	   if the number of items of tMargins is 1 then
60	8	0	      add tMargins to tHeight
61			   else
62			      add item 2 of tMargins to tHeight
63			   end if
64			   
65	8	94	   set the rect of field "message" of me to tLeft,tTop,tRight,(tTop + tHeight)
66	8	20	   set the rect of field "auto complete" of me to tLeft,tTop,tRight,(tTop + tHeight)
67	8	90	   set the rect of field "results" of me to tLeft,(tTop + tHeight),tRight,tBottom
68			   
69	8	0	   put (tRight - tLeft) into tWidth
70	8	0	   set the width of graphic "line" of me to tWidth
71	8	92	   set the loc of graphic "line" of me to (tWidth/2),(tTop+tHeight)
72			   
73	8	0	   unlock messages
74	8	1	   send "positionOpenStacksButton" to me in 0 milliseconds
75	8	0	   unlock screen
76	8	0	end layoutCard

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		201	generateFrame
246	8	1	on generateFrame
247	8	0	   if sHideFrame is true then
248			      exit generateFrame
249			   end if
250			   
251	8	0	   if sShowPreferenceAction is not false then
252			      # Add the preference of header size
253	8	1	      addFrameItem "revPaletteFrameSize", "header", "preference", "Header // Footer Size", "enum","small,medium,large,largest", "revIDEFrameSizeChanged", the long id of me
254			      # Add the preference to use icons / names
255	8	0	      addFrameItem canonicalStackName() & "_displayStyle", "header", "preference", "Tab Display Style", "enum","icons:Icons,names:Labels", "displayPreferenceChanged", the long id of me
256			      # Ensure the display style matches the saved preference
257	8	0	      if sNavStyle is empty then
258	8	0	         put revIDEGetPreference(canonicalStackName() & "_displayStyle") into sNavStyle
259			      end if
260			   end if
261			   
262	8	0	   lock screen
263	8	0	   lock messages
264			   
265	8	0	   reset the templategroup
266	8	0	   set the defaultstack to the long ID of me
267	8	0	   set the backgroundbehavior of the templategroup to true
268	8	0	   set the sharedbehavior of the templategroup to true
269	8	0	   if there is not a group "background" of me then
270			      create group "background"
271			   end if
272	8	0	   reset the templategroup
273			   
274			   # Generate all the button fields 
275			   
276	8	0	   local tPreferences, tNavigation, tHeaderAction
277	8	0	   local tHeaderActionDataA, tHeaderActionCount
278	8	0	   local tHeaderNavDataA, tHeaderNavCount
279	8	0	   local tFooterActionDataA, tFooterActionCount, tHeaderPreferenceCount
280	8	0	   put false into tPreferences
281	8	0	   put false into tNavigation
282	8	0	   put false into tHeaderAction
283			   
284	8	0	   local tPreferenceMenuA, tDataA, tSelected
285			   # Gather the data to set on the widget(s)
286	176	0	   repeat with x = 1 to the number of elements in sData
287	168	0	      local tNavItem
288	168	0	      put sData[x] into tNavItem
289	168	0	      if tNavItem["hidden"] is true then
290	56	1	         next repeat
291			      end if
292			      
293	112	0	      put empty into tDataA
294	112	0	      put tNavItem["name"] into tDataA["name"]
295	112	1	      put tNavItem["label"] into tDataA["label"]
296	112	0	      put tNavItem["icon"] into tDataA["icon"]
297			      
298			      --put tNavItem["icon_selected"] into tDataA["icon_selected"]
299			      
300	112	0	      switch tNavItem["type"]
301			         case "preference"
302			            # Add preference data to the preference menu
303	32	0	            add 1 to tHeaderPreferenceCount
304	32	0	            appendMenuItem tNavItem, tPreferenceMenuA
305	32	0	            break
306			         case "navigation"
307	64	0	            add 1 to tHeaderNavCount
308	64	0	            put tDataA into tHeaderNavDataA[tHeaderNavCount]
309	64	0	            if tNavItem["selected"] then
310	8	0	               put tNavItem["name"] into tSelected
311			            end if
312	64	0	            break
313			         case "toggle"
314			         case "action"
315	16	0	            put tNavItem["enabled"] into tDataA["enabled"]
316	16	0	            if tNavItem["selected"] then
317			               put tNavItem["icon_selected"] into tDataA["icon"]
318			            end if
319	16	0	            if tNavItem["location"] is "header" then
320			               add 1 to tHeaderActionCount
321			               put tDataA into tHeaderActionDataA[tHeaderActionCount]
322	16	0	            else if tNavItem["location"] is "footer" then
323	16	0	               add 1 to tFooterActionCount
324	16	0	               put tDataA into tFooterActionDataA[tFooterActionCount]
325			            end if
326	16	0	            break
327			      end switch
328			   end repeat
329			   
330			   # If we have any preferences, add that to the beginning of the header actions
331	8	0	   if tPreferenceMenuA is not empty then
332	8	0	      put preferenceAction(tPreferenceMenuA) into tHeaderActionDataA[0]
333			   end if
334			   
335	8	0	   if tHeaderNavCount is not 0 or tHeaderActionCount is not 0 or tHeaderPreferenceCount is not 0 then
336	8	0	      if there is not a widget "header_background" of group "background" of me then 
337			         create widget "header_background" as "com.livecode.widget.paletteActions" in group "background" of me
338			      end if
339	8	0	      set the isHeader of widget "header_background" of group "background" of me to true
340	8	44	      set the navData of widget "header_background" of group "background" of me to tHeaderNavDataA
341	8	35	      set the actionData of widget "header_background" of group "background" of me to tHeaderActionDataA
342	8	0	      if sNavStyle is "names" then
343			         set the showNavIcons of widget "header_background" of group "background" of me to false
344			      else
345	8	32	         set the showNavIcons of widget "header_background" of group "background" of me to true
346			      end if
347	8	0	      set the hiliteColor of widget "header_background" of group "background" of me to revIDEColor("edition_color")
348	8	28	      set the borderColor of widget "header_background" of group "background" of me to "178,178,178"
349			   else
350			      if there is a widget "header_background" of group "background" of me then 
351			         delete widget "header_background" of group "background" of me 
352			      end if
353			   end if
354			   
355	8	0	   if tFooterActionCount is not 0 then
356	8	0	      if there is not a widget "footer_background" of group "background" of me then 
357			         create widget "footer_background" as "com.livecode.widget.paletteActions" in group "background" of me
358			      end if
359	8	0	      set the isHeader of widget "footer_background" of group "background" of me to false
360	8	20	      set the actionData of widget "footer_background" of group "background" of me to tFooterActionDataA
361	8	17	      set the navData of widget "footer_background" of group "background" of me to empty
362	8	0	      set the hiliteColor of widget "footer_background" of group "background" of me to revIDEColor("edition_color")
363	8	20	      set the borderColor of widget "footer_background" of group "background" of me to "178,178,178"
364			   else
365			      if there is a widget "footer_background" of group "background" of me then 
366			         delete widget "footer_background" of group "background" of me 
367			      end if
368			   end if
369			   
370	8	0	   layoutFrame true
371			   
372	8	0	   unlock messages
373	8	0	   unlock screen
374	8	1	end generateFrame

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/message box/behaviors/revmessageboxbehavior.livecodescript"
		89	positionOpenStacksButton
500	4	0	command positionOpenStacksButton
501	4	0	   lock screen
502			   
503	4	0	   local tSize, tTextSize, tMargin, tLeft, tWidth, tBottom, tHeight, tXLoc, tYLoc, tPadding, tIcon
504			   
505	4	0	   put revIDEGetPreference("revPaletteFrameSize") into tSize
506	4	0	   switch tSize
507			      case "large"
508			         put 12 into tTextSize
509			         put 18 into tPadding
510			         put 172081 into tIcon
511			         break
512			      case "medium"
513			         put 11 into tTextSize
514			         put 16 into tPadding
515			         put 172080 into tIcon
516			         break
517			      case "small"
518			         put 10 into tTextSize
519			         put 14 into tPadding
520			         put 172079 into tIcon
521			         break
522			   end switch
523			   
524	4	0	   lock messages
525	4	0	   if there is a group "Stacks" of this card of me then
526	4	10	      set the showBorder of button "Open Stacks" of group "Stacks" of me to true
527	4	1	      set the opaque of button "Open Stacks" of group "Stacks" of me to false
528	4	7	      set the textsize of button "Open Stacks" of group "Stacks" of me to tTextSize
529	4	10	      set the icon of button "Open Stacks" of group "Stacks" of me to tIcon
530	4	0	      set the height of button "Open Stacks" to barHeight(tSize)
531	4	0	      set the width of button "Open Stacks" of group "Stacks" of me to (the formattedWidth of button "Open Stacks" of group "Stacks" of me) + tPadding
532	4	0	      put the formattedWidth of button "Open Stacks" of group "Stacks" of me into tWidth
533	4	1	      set the left of button "Open Stacks" to barRight(tSize) + 5
534	4	0	      set the bottom of button "Open Stacks" to barHeight(tSize)
535	4	0	      set the height of graphic "pipe" to barHeight(tSize)
536	4	0	      set the left of graphic "pipe" to barRight(tSize) + 5
537	4	0	      set the bottom of graphic "pipe" to barHeight(tSize)
538			   end if 
539			   
540	4	0	   try
541	4	60	      set the layer of group "background" of card 1 of me to bottom
542			   end try
543	4	0	   unlock messages
544			   
545	4	0	   unlock screen
546	4	0	end positionOpenStacksButton

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		89	contentRect
669	8	0	getProp contentRect
670	8	0	   if sHideFrame is true then
671			      return 0,5,the height of me, the width of me
672			   end if
673			   
674	8	0	   lock messages
675	8	0	   local tTop,tBottom,tBarSize
676			   
677	8	0	   put barHeight(revIDEGetPreference("revPaletteFrameSize")) into tBarSize
678			   
679	8	0	   put the height of me into tBottom
680	72	0	   repeat for each element tElement in sData
681	72	0	      if tElement["location"] is "footer" then
682	8	0	         put the height of me - tBarSize into tBottom
683	8	0	         exit repeat
684			      end if
685			   end repeat
686	8	0	   unlock messages
687			   
688	8	0	   return 0,tBarSize,the width of me,tBottom
689	8	89	end contentRect

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		49	revIDEColor
2488	16	0	function revIDEColor pTag
2489	16	1	   if pTag is "edition_color" then
2490	16	0	      return revEnvironmentEditionProperty("color")
2491			   end if
2492			   
2493			   switch pTag
2494			      case "text_1"
2495			         return "0,0,0"
2496			         break
2497			      case "text_2"
2498			         return "125,125,125"
2499			         break
2500			      case "text_3"
2501			         return "255,255,255"
2502			         break
2503			      case "dataView_rowColor"
2504			         return "255,255,255"
2505			         break
2506			      case "dataView_rowAlternateColor"
2507			         return "238,238,238"
2508			         break
2509			      case "dataView_hiliteColor"
2510			         return "48,160,209"
2511			         break
2512			      case "dataView_alternateHiliteColor"
2513			         return "34,154,206"
2514			         break
2515			      case "dataView_TextHiliteColor"
2516			         return "255,255,255"
2517			         break
2518			      case "dataView_scriptBackgroundColor"
2519			         return "34,154,206"
2520			         break
2521			      case "dataView_scriptErrorBackgroundColor"
2522			         return "255,0,0"
2523			         break
2524			      case "dataView_disclosureIconColor"
2525			         return "99,99,99"
2526			         break         
2527			      case "dataView_disclosureIconHiliteColor"
2528			         return "216,216,216"
2529			         break 
2530			      case "palette_background"
2531			         if the platform is "Win32" then
2532			            return "240,240,240"
2533			         else
2534			            return the effective backgroundColor of this stack
2535			         end if
2536			         break
2537			      case "propertyInspector_multiValueBackground"
2538			         return "200,206,215"
2539			         break
2540			   end switch
2541			   
2542			   return ideColorGet(pTag)
2543	16	48	end revIDEColor

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript"
		35	setButtonHilite
787	52	0	on setButtonHilite pLongId, pValue
788	52	1	   if pValue then
789	4	0	      set the hilite of pLongID to true
790	4	3	      set the textStyle of pLongID to "bold"
791			   else
792	48	5	      set the hilite of pLongID to false
793	48	26	      set the textStyle of pLongID to "plain"
794			   end if
795	52	0	end setButtonHilite

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript"
		34	enableToolbar
804	4	0	private on enableToolbar
805	4	0	   local tControlName
806	76	2	   repeat for each line tControl in the childControlIDs of group "toolbar" of me
807	72	32	      enable control id tControl of stack "revMenubar"
808			   end repeat
809	4	0	end enableToolbar

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript"
		29	updateButtonHilite
811	52	0	on updateButtonHilite pTargetName, pValue
812	52	0	   lock screen
813	52	1	   lock messages
814			   
815	52	0	   local tTargetLongID
816	52	0	   put the long id of button pTargetName of group "toolbar" of me into tTargetLongID
817			   
818	52	0	   local tShowIcon
819	52	0	   put the showIcon of tTargetLongID into tShowIcon
820			   
821	52	0	   setButtonHilite tTargetLongID, pValue
822	52	0	   set the label of tTargetLongID to revMenubarButtonText(pTargetName, pValue)
823	52	0	   if pValue then
824	4	3	      set the icon of tTargetLongID to the cHighlightedIcon of tTargetLongID
825			   else
826	48	24	      set the icon of tTargetLongID to the cIcon of tTargetLongID
827			   end if
828			   
829	52	0	   set the showIcon of tTargetLongID to tShowIcon
830			
831	52	0	   unlock messages
832	52	0	   unlock screen
833	52	1	end updateButtonHilite

button "GreyTranspa" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		25	preProcess
3	1	0	on preProcess
4	2	3	   if ("button" is in the target) then set hilite of the target to true
5	1	1	   set cursor to watch
6			   ------- reset PixEnd (delete image pour full reset si l'alphaData est corrompu)
7	2	0	   if (there is an image arrParams["destName"]) then delete image arrParams["destName"]
8	1	1	   create image arrParams["destName"]
9	1	1	   set threeD of image arrParams["destName"] to (the threeD of image arrParams["sourceName"])
10	1	1	   set borderWidth of image arrParams["destName"] to (the borderWidth of image arrParams["sourceName"])
11	1	0	   set showBorder of image arrParams["destName"] to (the showBorder of image arrParams["sourceName"])
12			   ------- visuel
13	1	12	   set the rect of image arrParams["destName"] to (the rect of image arrParams["sourceName"])
14	1	5	   set the topLeft of image arrParams["destName"] to \
15			         (the left of image arrParams["sourceName"] & "," & the bottom of image arrParams["sourceName"] + 6)
16			   -------
17	1	1	   put the milliseconds into fld "Timer" -- /////
18	1	0	end preProcess

button "GreyTranspa_after" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		22	preProcess
3	1	0	on preProcess
4	2	2	   if ("button" is in the target) then set hilite of the target to true
5	1	0	   set cursor to watch
6			   ------- reset PixEnd (delete image pour full reset si l'alphaData est corrompu)
7	2	0	   if (there is an image arrParams["destName"]) then delete image arrParams["destName"]
8	1	1	   create image arrParams["destName"]
9	1	2	   set threeD of image arrParams["destName"] to (the threeD of image arrParams["sourceName"])
10	1	1	   set borderWidth of image arrParams["destName"] to (the borderWidth of image arrParams["sourceName"])
11	1	0	   set showBorder of image arrParams["destName"] to (the showBorder of image arrParams["sourceName"])
12			   ------- visuel
13	1	11	   set the rect of image arrParams["destName"] to (the rect of image arrParams["sourceName"])
14	1	3	   set the topLeft of image arrParams["destName"] to \
15			         (the left of image arrParams["sourceName"] & "," & the bottom of image arrParams["sourceName"] + 6)
16			   -------
17	1	2	   put the milliseconds into fld "Timer" -- /////
18	1	0	end preProcess

button "GreyTranspa_switch" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		21	preProcess
3	1	0	on preProcess
4	2	3	   if ("button" is in the target) then set hilite of the target to true
5	1	1	   set cursor to watch
6			   ------- reset PixEnd (delete image pour full reset si l'alphaData est corrompu)
7	2	0	   if (there is an image arrParams["destName"]) then delete image arrParams["destName"]
8	1	1	   create image arrParams["destName"]
9	1	0	   set threeD of image arrParams["destName"] to (the threeD of image arrParams["sourceName"])
10	1	1	   set borderWidth of image arrParams["destName"] to (the borderWidth of image arrParams["sourceName"])
11	1	0	   set showBorder of image arrParams["destName"] to (the showBorder of image arrParams["sourceName"])
12			   ------- visuel
13	1	11	   set the rect of image arrParams["destName"] to (the rect of image arrParams["sourceName"])
14	1	3	   set the topLeft of image arrParams["destName"] to \
15			         (the left of image arrParams["sourceName"] & "," & the bottom of image arrParams["sourceName"] + 6)
16			   -------
17	1	1	   put the milliseconds into fld "Timer" -- /////
18	1	0	end preProcess

button "GreyTranspa_Each" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		21	preProcess
3	1	0	on preProcess
4	2	3	   if ("button" is in the target) then set hilite of the target to true
5	1	0	   set cursor to watch
6			   ------- reset PixEnd (delete image pour full reset si l'alphaData est corrompu)
7	2	0	   if (there is an image arrParams["destName"]) then delete image arrParams["destName"]
8	1	1	   create image arrParams["destName"]
9	1	1	   set threeD of image arrParams["destName"] to (the threeD of image arrParams["sourceName"])
10	1	0	   set borderWidth of image arrParams["destName"] to (the borderWidth of image arrParams["sourceName"])
11	1	1	   set showBorder of image arrParams["destName"] to (the showBorder of image arrParams["sourceName"])
12			   ------- visuel
13	1	11	   set the rect of image arrParams["destName"] to (the rect of image arrParams["sourceName"])
14	1	3	   set the topLeft of image arrParams["destName"] to \
15			         (the left of image arrParams["sourceName"] & "," & the bottom of image arrParams["sourceName"] + 6)
16			   -------
17	1	1	   put the milliseconds into fld "Timer" -- /////
18	1	0	end preProcess

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revcommonlibrary.livecodescript"
		15	revTargetStack
14	88	0	function revTargetStack pWhich
15	88	1	   local tParse
16	88	2	   if pWhich is not empty and there is a pWhich and word 1 of pWhich is not "the"
17	40	0	   then put the long id of pWhich into tParse
18	48	1	   else put the long id of the target into tParse
19	88	2	   get wordOffset("stack",tParse)
20			   
21	88	1	   local tStackName
22	88	0	   put word (it) to (it+1) of tParse into tStackName
23	88	6	   put the short name of tStackName into tStackName
24	88	0	   return tStackName
25	88	2	end revTargetstack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript"
		12	setToolbarButtonState
835	20	0	private command setToolbarButtonState pName, pValue
836	20	12	   set the enabled of button pName of group "toolbar" of me to pValue
837	20	0	end setToolbarButtonState

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/message box/behaviors/revmessageboxbehavior.livecodescript"
		11	revIDESetActiveStack
705	4	0	command revIDESetActiveStack
706	4	0	   local tMode, tTraceStack, tLock, tLink, tTopStack
707			   
708	4	0	   lock screen
709	4	0	   put revIDEGetPreference("IDEDebugMode") into tMode
710	4	0	   if tMode is true and the traceStack is not empty then
711			      put the short name of the traceStack into tTraceStack
712			      revIDESetPreference "IDEActiveStack",tTraceStack
713			      disableFrameItem "lockDefaultStack"
714			      disableFrameItem "unlockDefaultStack"
715			      lock messages
716			      set the label of button "Open Stacks" of group "Stacks" of me to tTraceStack
717			      disable button "Open Stacks" of group "Stacks" of me 
718			      unlock messages
719			   else
720	4	0	      put revIDEGetPreference("IDELockedToStack") into tLock
721	4	0	      put revIDEGetPreference("IDELinkedToStack") into tLink
722	4	0	      enableFrameItem "lockDefaultStack"
723	4	0	      enableFrameItem "unlockDefaultStack"
724			      
725	4	0	      if tLock is true and there is a stack tLink then 
726			         revIDESetPreference "IDEActiveStack",tLink
727			         lock messages
728			         set the label of button "Open Stacks" of group "Stacks" of me to tLink
729			         enable button "Open Stacks" of group "Stacks" of me
730			         unlock messages
731			      else
732	4	0	         put the short name of the topStack into tTopStack
733	4	0	         revIDESetPreference "IDEActiveStack",tTopStack
734	4	0	         preferenceChanged "ideMessageBox_lockdefaultstack", true
735	4	0	         lock messages
736	4	0	         set the label of button "Open Stacks" of group "Stacks" of me to tTopStack
737	4	0	         unlock messages
738	4	11	         enable button "Open Stacks" of group "Stacks" of me
739			      end if
740			   end if
741	4	0	   unlock screen
742	4	0	end revIDESetActiveStack 

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		8	layoutFrame
402	16	0	on layoutFrame pForceRecalculate
403	16	0	   lock screen
404	16	0	   lock messages
405	16	0	   if there is not a group "background" of me then
406			      # Place the background from another card
407			      local tCardNumber
408			      put the number of this card into tCardNumber
409			      repeat with x = 1 to the number of cards of me
410			         if there is a group "background" of card x of me and x is not tCardNumber then
411			            place group "background" of card x of me onto this card
412			            exit repeat
413			         end if
414			      end repeat 
415			   end if
416			   
417	16	0	   if pForceRecalculate then
418			      # Setup the size everything should be
419	8	0	      local tIconTextSize, tTextSize, tHeaderHeight
420	8	0	      put  revIDEGetPreference("revPaletteFrameSize") into tHeaderHeight
421			      
422	8	0	      switch tHeaderHeight
423			         case "small"
424			            put barHeight("small") into BAR_HEIGHT
425			            put 7 into ITEM_SPACING
426			            put 1,10,1,0 into FOOTER_ACTION_MARGINS
427			            put 3,3,3,0 into HEADER_ACTION_MARGINS
428			            put round(BAR_HEIGHT * 0.6) into tIconTextSize
429			            if sNavStyle is "names" then
430			               put 10,11,8,0 into HEADER_NAVIGATION_MARGINS
431			            else
432			               put 7,9,5,0 into HEADER_NAVIGATION_MARGINS
433			            end if
434			            put 10 into tTextSize
435			            break
436			         case "medium"
437			            put barHeight("medium")  into BAR_HEIGHT
438			            put 8 into ITEM_SPACING
439			            put 1,10,1,0 into FOOTER_ACTION_MARGINS
440			            put 3,3,3,0 into HEADER_ACTION_MARGINS
441			            put round(BAR_HEIGHT * 0.6) into tIconTextSize
442			            if sNavStyle is "names" then
443			               put 10,11,8,0 into HEADER_NAVIGATION_MARGINS
444			            else
445			               put 8,9,6,0 into HEADER_NAVIGATION_MARGINS
446			            end if
447			            put 12 into tTextSize
448			            break
449			         case "largest"
450	8	0	            put barHeight("largest") into BAR_HEIGHT
451	8	0	            put 12 into ITEM_SPACING
452	8	0	            put 1,10,1,0 into FOOTER_ACTION_MARGINS
453	8	0	            put 1,5,1,0 into HEADER_ACTION_MARGINS
454	8	0	            put round(BAR_HEIGHT * 0.6) into tIconTextSize
455	8	0	            if sNavStyle is "names" then
456			               put 10,11,8,0 into HEADER_NAVIGATION_MARGINS
457			            else
458	8	0	               put 12,13,12,0 into HEADER_NAVIGATION_MARGINS
459			            end if
460	8	0	            put 16 into tTextSize
461	8	0	            break
462			         case "large"
463			         default
464			            put barHeight("large") into BAR_HEIGHT
465			            put 10 into ITEM_SPACING
466			            put 1,10,1,0 into FOOTER_ACTION_MARGINS
467			            put 1,5,1,0 into HEADER_ACTION_MARGINS
468			            put round(BAR_HEIGHT * 0.6) into tIconTextSize
469			            if sNavStyle is "names" then
470			               put 10,11,8,0 into HEADER_NAVIGATION_MARGINS
471			            else
472			               put 10,11,8,0 into HEADER_NAVIGATION_MARGINS
473			            end if
474			            put 14 into tTextSize
475			            break
476			      end switch
477			      
478	8	0	      local tHeaderWidth, tFooterWidth
479	8	0	      if there is a widget "header_background" of group "background" of me then
480	8	0	         set the height of widget "header_background" of group "background" of me to BAR_HEIGHT
481	8	0	         put the minWidth of widget "header_background" of group "background" of me into tHeaderWidth
482			      end if
483	8	0	      if there is a widget "footer_background" of group "background" of me then 
484	8	0	         set the height of widget "footer_background" of group "background" of me to BAR_HEIGHT
485	8	0	         put the minWidth of widget "footer_background" of group "background" of me into tFooterWidth 
486			      end if
487			      
488	8	0	      local tMinWidth
489	8	0	      put max(tFooterWidth, tHeaderWidth) into tMinWidth
490			      
491	8	6	      set the minwidth of me to tMinWidth
492	8	1	      if tMinWidth > the width of me then
493			         local tStackLeft
494			         put the left of me into tStackLeft
495			         set the width of me to tMinWidth
496			         set the left of me to tStackLeft
497			      end if
498			   end if
499			   
500	16	0	   if there is a widget "header_background" of group "background" of me then 
501	16	0	      set the width of widget "header_background" of group "background" of me to the width of me
502	16	0	      set the topleft of widget "header_background" of group "background" of me to 0,0
503			   end if
504	16	0	   if there is a widget "footer_background" of group "background" of me then
505	16	0	      set the width of widget "footer_background" of group "background" of me to the width of me
506	16	0	      set the bottomleft of widget "footer_background" of group "background" of me to 0,the height of me
507			   end if
508	16	0	   unlock messages
509	16	0	   if pForceRecalculate then
510	8	0	      dispatch "resizeStack" to this card of me with \
511			            the width of this card of me, the height of this card of me
512			   end if
513			   
514	16	0	   unlock screen
515	16	1	end layoutFrame

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		8	appendMenuItem
152	32	0	private on appendMenuItem pNavItem, @xMenuArray
153	32	0	   local tMenuItemA
154			   
155	32	0	   local tPreferenceValue
156	32	2	   put revIDEGetPreference(pNavItem["name"]) into tPreferenceValue
157			   
158	32	0	   put pNavItem["label"] into tMenuItemA["label"]
159	32	0	   put pNavItem["name"] into tMenuItemA["name"]
160			   
161	32	0	   switch pNavItem["value_type"]
162			      case "enum"
163			      case "set"
164	24	0	         local tValue, tLabel, tItemCount
165	88	0	         repeat for each item tItem in pNavItem["value"]
166	64	1	            add 1 to tItemCount
167			            # Parse out the value and label from the item
168	64	0	            set the itemdel to ":"
169	64	0	            if the number of items of tItem > 1 then
170	16	0	               put item 1 of tItem into tValue
171	16	0	               put item 2 of tItem into tLabel
172			            else
173	48	0	               put tItem into tLabel
174	48	0	               put tItem into tValue
175			            end if
176	64	0	            set the itemdel to comma
177			            
178			            # Enums can't be empty so use the first value by default
179	64	0	            if tPreferenceValue is empty and pNavItem["value_type"] is "enum" then 
180	8	0	               put tValue into tPreferenceValue
181			            end if
182			            
183	64	0	            put tLabel into tMenuItemA["menu"][tItemCount]["label"]
184	64	1	            put tValue into tMenuItemA["menu"][tItemCount]["name"]
185			            
186	64	0	            local tChecked
187	64	1	            if pNavItem["value_type"] is "enum" then
188	64	1	               put tValue is tPreferenceValue into tChecked
189			            else
190			               if the number of lines in tPreferenceValue > 1 then
191			                  put tValue is among the lines of tPreferenceValue into tChecked
192			               else
193			                  put tValue is among the items of tPreferenceValue into tChecked
194			               end if
195			            end if
196			            
197	64	1	            if tChecked then
198	24	0	               put true into tMenuItemA["menu"][tItemCount]["checked"]
199			            else
200	40	0	               put false into tMenuItemA["menu"][tItemCount]["checked"]
201			            end if
202			         end repeat
203	24	0	         break
204			      case "boolean"
205	8	0	         if tPreferenceValue is true then
206			            put true into tMenuItemA["checked"]
207			         else
208	8	0	            put false into tMenuItemA["checked"]
209			         end if
210	8	0	         break
211			      default
212			         break
213			   end switch
214			   
215	32	0	   local tCount
216	32	0	   put the number of elements in xMenuArray into tCount
217	32	1	   add 1 to tCount
218	32	0	   put tMenuItemA into xMenuArray[tCount]
219	32	0	end appendMenuItem

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		8	deleteImage
834	4	0	on deleteImage
835	4	0	   revIDEHandleObjectDeleted the long id of the target
836	4	0	   if not gREVSuppressMessages or (gREVSuppressMessages and revOKTarget()) then
837	4	0	      pass deleteImage
838			   end if
839	4	8	end deleteImage

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revgeometrylibrary.livecodescript"
		6	revCacheGeometry
728	8	0	on revCacheGeometry pUpdateSizes
729	8	0	  lock messages
730	8	0	  revCheckGeoDefaultStack
731			  
732	8	0	  local tNoControls
733	8	1	  put the number of controls into tNoControls
734	8	0	  delete local lIDArray
735			  
736	8	0	  local tNumber
737	8	0	  put the milliseconds into tNumber
738	128	1	  repeat with i = 1 to tNoControls
739	120	0	    local tAltID
740	120	0	    put the cREVGeneral["revUniqueID"] of control i into tAltID
741			    
742	120	0	    local tAltIDsList
743	120	1	    if tAltID is empty or tAltID is among the lines of tAltIDsList then
744			      set the cREVGeneral["revUniqueID"] of control i to tNumber
745			      add 1 to tNumber
746			      put tNumber into tAltID
747			    end if
748	120	0	    put tAltID & cr after tAltIDsList
749	120	0	    put the id of control i into lIDArray[tAltID]
750			  end repeat
751			  
752	8	0	  local tProfileName
753	128	1	  repeat with i = 1 to tNoControls
754	120	0	    put the cREVGeneral["profile"] of control i into tProfileName
755	240	0	    if tProfileName is empty or tProfileName is the cREVGeneral["masterName"] of control i then put "Master" into tProfileName
756	240	2	    if the cREVGeometry[tProfileName] of control i is not true then next repeat
757			    put the long id of control i into lGeometryObject
758			    if pUpdateSizes then revCalculateGeometryDistances
759			    
760			    local tCardRanking
761			    put the cREVGeometry[tProfilename & comma & "cardRanking"] of control i into tCardRanking
762			    if tCardRanking > 0 then
763			      local tStackDependant
764			      put the cREVGeneral["revUniqueID"] of control i, tCardRanking & return after tStackDependant
765			    else
766			      --the tricky part - go through all the 6 sides and follow them up to find out how far away from the card the object is
767			      local tDistanceCounter
768			      put 0 into tDistanceCounter
769			      repeat for each item l in "scaleLeftObjectRef,scaleRightObjectRef,scaleTopObjectRef,scaleBottomObjectRef,moveHObjectRef,moveVObjectRef"
770			        local tBreakOut
771			        put 0 into tBreakOut
772			        
773			        local tNextObject
774			        put the cREVGeometry[tProfileName,l] of control i into tNextObject
775			        if there is a control id lIDArray[tNextObject] then
776			          put lIDArray[tNextObject] into tNextObject
777			          repeat
778			            add 1 to tDistanceCounter
779			            add 1 to tBreakOut
780			            --cycle through objects, break out if empty, card, no object found or total number of loops exceeds object count
781			            local tNextProfileName
782			            put the cREVGeneral["profile"] of control id tNextObject into tNextProfileName
783			            if tNextProfileName is empty or tNextProfileName is the cREVGeneral["masterName"] of control i then
784			              put "Master" into tNextProfileName
785			            end if
786			            
787			            # OK-2007-08-10 : Previously the first clause of this if condition refered to the variable "tNextProfileNames", which was
788			            # undeclared and not refered to anywhere else. I changed this to tNextProfileName
789			            if tNextProfileName is empty or tNextProfileName is the cREVGeneral["masterName"] of control id tNextObject then
790			              put "Master" into tNextProfileName
791			            end if
792			            put the cREVGeometry[tNextProfileName,l] of control id tNextObject into tNextObject
793			            if tNextObject is "card" or tNextObject is empty then exit repeat
794			            if not (there is a control id tNextObject) then exit repeat
795			            if tBreakOut > tNoControls then exit repeat
796			          end repeat
797			        end if
798			      end repeat
799			      local tStackDistance
800			      put the cREVGeneral["revUniqueID"] of control i,tDistanceCounter & return after tStackDistance
801			    end if
802			  end repeat
803	8	0	  put empty into lGeometryObject
804	8	0	  delete the last char of tStackDependant
805	8	0	  delete the last char of tStackDistance
806	8	0	  sort lines of tStackDependant numeric descending by item 2 of each
807	8	0	  sort lines of tStackDistance numeric ascending by item 2 of each
808	8	0	  repeat with i = 1 to the number of lines in tStackDependant
809			    delete item 2 of line i of tStackDependant
810			  end repeat
811	8	0	  repeat with i = 1 to the number of lines in tStackDistance
812			    delete item 2 of line i of tStackDistance
813			  end repeat
814	8	0	  set the cREVGeometrycache["order"] of this card to tStackDependant & return & tStackDistance
815	8	0	  set the cREVGeometryCache["total"] of this card to the number of controls
816	8	0	  set the cREVGeometryCache["stackID"] of this stack to the ID of this stack
817	8	0	  set the customProperties["cREVGeometryCacheIDs"] of this cd to lIDArray
818	8	0	  put empty into lOrigWidth
819	8	0	  put empty into lOrigHeight
820	8	0	  unlock messages
821	8	0	end revCacheGeometry

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revcommonlibrary.livecodescript"
		5	revRuggedId
1455	4	0	function revRuggedId pObject
1456			   # First get the long id of our object. If pObject is a valid object reference we just get the 
1457			   # object's long id. If its not a valid reference, this does not always mean the object doesn't
1458			   # exist (because of edit group mode), in this case we assume that pObject is the long id of the object
1459			   # we want, and parse it directly to obtain the rugged id, without needing to refer to the actual
1460			   # object at all.
1461	4	0	   local tObject
1462	4	1	   if there is a pObject then
1463	4	0	      put the long id of pObject into tObject
1464			   else
1465			      put pObject into tObject
1466			      # MDW-2015-08-21: [[ bugfix_revRuggedId ]] pObject is empty when creating a new object
1467			      if tObject is empty then
1468			         put the long id of the target into tObject
1469			      end if
1470			   end if
1471			   
1472			   # Find out what the name of the stack owning the object is. We are only interested in the 
1473			   # stack that immediately owns the object, which could be a substack. To find this we can
1474			   # simply search from the front and find the first ocurrence of "of stack".
1475	4	0	   local tSubStack, tMainstack
1476	4	0	   local tStackFound
1477	4	0	   local tWordNumber
1478	4	1	   put 1 into tWordNumber
1479	44	0	   repeat for each word tWord in tObject
1480			      # The first match is always the substack, the second (and last) match is always the mainstack
1481	40	0	      if tWord is "stack" then
1482	4	0	         if tStackFound then
1483			            put tMainStack into tSubStack
1484			            put word (tWordNumber + 1) of tObject into tMainStack
1485			            exit repeat
1486			         else
1487	4	0	            put word (tWordNumber + 1) of tObject into tMainStack
1488			         end if
1489	4	0	         put true into tStackFound
1490			      end if
1491	40	1	      add 1 to tWordNumber
1492			   end repeat
1493			   
1494	4	0	   try
1495	4	0	      local tStack
1496	4	0	      if tSubStack is not empty then
1497			         put "stack " & tSubStack & " of " & (the name of stack (char 2 to -2 of tMainStack)) into tStack
1498			      else
1499	4	0	         put (the name of stack (char 2 to -2 of tMainStack)) into tStack
1500			      end if
1501			   catch tError
1502			      
1503			   end try
1504			   
1505			   # MW-2008-09-08: [[ Bug 7142 ]] If the hcAddressing of the stack is true, then the long id
1506			   #    is in a different form than this expects. Thus we temporarily fetch it while hcAddressing
1507			   #    is false.
1508	4	2	   if there is a tStack and the hcAddressing of tStack then
1509			      set the hcAddressing of tStack to false
1510			      put the long id of pObject into tObject
1511			      set the hcAddressing of tStack to true
1512			   end if
1513			   
1514	4	0	   local tType
1515	4	0	   put word 1 of tObject into tType
1516			   
1517	4	0	   local tId
1518	4	0	   if tType is "stack" then
1519			      # With stacks, the name is the most robust way to refer to them. We assume that the stack exists...
1520			      put tStack into tId
1521	4	0	   else if tType is "audioclip" then
1522			      put "audioclip id" && word 3 of tObject & " of " & tStack into tId
1523	4	0	   else if tType is "videoclip" then
1524			      put "videoclip id" && word 3 of tObject & " of " & tStack into tId
1525			   else
1526			      # With any other object, the safest thing is to return the object id and the name of its owning stack.
1527			      # For cards we use "card id..." for other objects "control id..". This is significant because when in
1528			      # edit group mode, the group being edited can be referred to as "control id.." but *not* "group id..."
1529			      
1530	4	0	      local tPrefix
1531	4	0	      if tType is "card" then
1532			         put "card" into tPrefix
1533			      else
1534	4	0	         put "control" into tPrefix
1535			      end if
1536	4	0	      put tPrefix & " id " & word 3 of tObject & " of " & tStack into tId
1537			   end if
1538			   
1539	4	0	   return tId
1540	4	0	end revRuggedId

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidemessagehandlerlibrary.livecodescript"
		4	nameChanged
269	4	0	on nameChanged pOldName, pNewName
270	4	0	   local tTarget, tParams
271	4	0	   put the long id of the target into tTarget
272	4	0	   if not revIDEObjectIsOnIDEStack(tTarget) then   
273	4	0	      put pOldName into tParams[1]
274	4	0	      put pNewName into tParams[2]
275	4	0	      put tTarget into tParams[3]
276	4	1	      send "ideMessageSendWithParameters ideNameChanged,tTarget,tParams" to stack "revIDELibrary" in 0 milliseconds
277			   end if
278	4	0	   pass nameChanged
279	4	3	end nameChanged

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/home.livecodescript"
		4	revEnvironmentIsInstalled
2167	80	1	function revEnvironmentIsInstalled
2168	80	1	   return sBinariesPath is empty
2169	80	2	end revEnvironmentIsInstalled

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		4	revIDEGetPreference
2321	80	1	function revIDEGetPreference pPreferenceName
2322	80	0	   local tValue
2323			   
2324	80	0	   __DevPreference pPreferenceName, tValue
2325			   
2326	80	0	   if tValue is empty and there is a stack "revPreferences" then
2327	80	3	      put the pPreferenceName of stack "revPreferences" into tValue
2328			   end if
2329			   
2330	80	0	   if pPreferenceName is "cScriptEditor,editor,font" and \
2331			         tValue is empty and \
2332			         "Source Code Pro" is among the lines of the fontNames then
2333			      return "Source Code Pro"
2334			   end if
2335			   
2336	80	0	   return tValue
2337	80	0	end revIDEGetPreference

button "GreyTranspa_switch" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		3	postProcess
37	1	0	on postProcess
38			   ------- visual effect
39	1	0	   show image "PixEnd"
40	1	2	   put (the milliseconds - fld "Timer") && "ms" into fld "Timer"
41	2	1	   if ("button" is in the target) then set hilite of the target to false
42	1	0	end postProcess

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		3	__DevPreference
2345	80	0	command __DevPreference pPreferenceName, @rValue
2346	80	1	   if not revEnvironmentIsInstalled() then
2347			      switch pPreferenceName
2348			         case "cScriptEditor,explicitVariables"
2349			         case "cScriptEditor,preserveVariables"
2350			            put true into rValue
2351			            break
2352			         case "cScriptEditor,editor,commentchar"
2353			            put "--" into rValue
2354			            break
2355			         case "cScriptEditor,editor,tabdepth"
2356			            put 3 into rValue
2357			            break
2358			      end switch
2359			      
2360			   end if
2361	80	2	end __DevPreference

button "GreyTranspa_after" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		2	postProcess
37	1	0	on postProcess
38			   ------- visual effect
39	1	0	   show image "PixEnd"
40	1	1	   put (the milliseconds - fld "Timer") && "ms" into fld "Timer"
41	2	1	   if ("button" is in the target) then set hilite of the target to false
42	1	0	end postProcess

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/script editor/behaviors/revseutilities.livecodescript"
		2	listAffectedEditors
197	8	0	private function listAffectedEditors pObject
198	8	0	   local tEditors
199	8	0	   put revListScriptEditors() into tEditors
200			   
201	8	0	   local tAffectingObject
202	8	0	   put pObject into tAffectingObject
203			   
204	8	1	   local tAffectedEditors
205	16	0	   repeat for each line tEditor in tEditors
206	8	0	      local tObjects
207	8	0	      send "revSEGetTargetObjects" to tEditor
208	8	0	      put the result into tObjects
209			      
210	56	0	      repeat for each line tObject in tObjects
211	48	1	         if tObject is tAffectingObject or seRuggedObjectContainsObject(tAffectingObject, tObject) then
212			            put tEditor & return after tAffectedEditors
213			            exit repeat
214			         end if
215			      end repeat
216			   end repeat
217	8	0	   delete the last char of tAffectedEditors
218			   
219	8	0	   return tAffectedEditors
220	8	0	end listAffectedEditors

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/script editor/behaviors/revseutilities.livecodescript"
		2	revSEObjectNameChanged
142	4	0	command revSEObjectNameChanged pTarget, pOldName, pNewName
143			   # If a stack has had its name changed, its rugged id will have changed
144	4	0	   local tEditors
145	4	2	   if word 1 of the name of pTarget is "stack" then
146			      local tStackId
147			      put revRuggedId(pTarget) into tStackId
148			      put quote & pOldName & quote into word 2 of tStackId
149			      
150			      put listAffectedEditors(tStackId) into tEditors
151			      
152			      repeat for each line tEditor in tEditors
153			         send "revSEObjectRuggedIdChanged pTarget, tStackId" to tEditor
154			      end repeat
155			   else
156	4	0	      put listAffectedEditors(pTarget) into tEditors
157			      
158	4	0	      repeat for each line tEditor in tEditors
159			         send "revSERefreshObjectnames" to tEditor
160			      end repeat
161			   end if
162	4	0	end revSEObjectNameChanged

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revgeometrylibrary.livecodescript"
		2	revUpdateGeometry
62	8	0	on revUpdateGeometry
63	8	0	   lock messages
64			   
65			   -- 2006-05-22:O.K:Fix for 3413
66	8	0	   local tDefaultStack
67	8	0	   put the defaultStack into tDefaultStack
68	8	0	   set the defaultStack to REVTargetStack()
69			   
70	8	0	   if (the cREVGeometryCache["order"] of this card is empty) or (the cREVGeometryCache["total"] of this card is not the number of controls) or (the number of words in the customKeys["cREVGeometryCacheIDs"] of this card is 0) then 
71			      revCacheGeometry
72			   end if
73			   
74	8	0	   local tCardWidth
75	8	0	   put the width of this stack + the cREVGeneral["virtualWidth"] of this cd into tCardWidth
76			   
77	8	0	   local tCardHeight
78	8	0	   put the height of this stack + the cREVGeneral["virtualHeight"] of this cd into tCardHeight
79	8	0	   add the vScroll of this stack to tCardHeight
80			   
81	8	0	   local tCardLoc
82	8	0	   put trunc(tCardWidth / 2), trunc(tCardHeight / 2) into tCardLoc
83			   
84	8	0	   local tIDArray
85	8	0	   put the customProperties["cREVGeometryCacheIDs"] of this card into tIDArray
86			   
87			   # OK-2007-08-10 : The below block of code was modifying the repeat loop control, which would have caused unexpected consequences.
88			   # Added the tControlId variable to fix this problem
89	8	0	   local tControlId
90	8	0	   repeat for each line tControl in the cREVGeometryCache["order"] of this card
91	8	0	      put tIDArray[tControl] into tControlId
92	8	0	      if not (there is a control id tControlId) then
93	8	0	         revCacheGeometry
94	8	0	         exit repeat
95			      end if     
96			   end repeat
97			   
98			   # OK-2007-08-10 : Not sure why these two lines are necessary...
99	8	1	   set the defaultStack to REVTargetStack()
100	8	0	   put the customProperties["cREVGeometryCacheIDs"] of this card into tIDArray
101			   
102			   # OK-2007-08-10 : Modified the below repeat loop to remove the unreadable use of "l", and also to
103			   # prevent the modifying of the repeat loop control variable, which could have had unexpected consequences.
104	16	1	   repeat for each line tControl in the cREVGeometryCache["order"] of this card
105	8	0	      put tIDArray[tControl] into tControlId
106	8	0	      if the number of words in tControlId is 0 then 
107	8	0	         next repeat
108			      end if
109			      
110			      local tProfileName
111			      put the cREVGeneral["profile"] of control id tControlId into tProfileName
112			      if tProfileName is empty or tProfileName is the cREVGeneral["masterName"] of control id tControlId then 
113			         put "Master" into tProfileName
114			      end if
115			      
116			      if the cREVGeometry[tProfileName] of control id tControlId is not true then 
117			         next repeat
118			      end if
119			      
120			      local tGroupLockLocation
121			      if word 1 of the name of control id tControlId is "group" then
122			         put the lockLocation of control id tControlId into tGroupLockLocation[tControlId]
123			         set the lockLocation of control id tControlId to true
124			      end if
125			      
126			      local tObjectRect
127			      put the rect of control id tControlId into tObjectRect
128			      if the cREVGeometry[tProfileName,"moveH"] of control id tControlId is true then
129			         
130			         --HORIZONTAL MOVEMENT
131			         local tObjectH
132			         put item 1 of the loc of control id tControlId into tObjectH
133			         if the cREVGeometry[tProfilename,"moveHAbsolute"] of control id tControlId is true then
134			            --absolute movement of H
135			            if the cREVGeometry[tProfileName,"moveHObjectRef"] of control id tControlId is "card" then
136			               --move H in absolute reference to the card
137			               local tDistance
138			               put the cREVGeometry[tProfileName,"moveHDistance"] of control id tControlId into tDistance
139			               if the cREVGeometry[tProfileName,"moveHObjectSide"] of control id tControlId is "left" then
140			                  local tHMoved
141			                  put the left of this card + tDistance into tHMoved
142			                  
143			                  local tDifference
144			                  put tHMoved - tObjectH into tDifference
145			                  add tDifference to item 1 of tObjectRect
146			                  add tDifference to item 3 of tObjectRect
147			               else if the cREVGeometry[tProfileName,"moveHObjectSide"] of control id tControlId is "right" then
148			                  put tCardWidth + tDistance into tHMoved
149			                  put tHMoved - tObjectH into tDifference
150			                  add tDifference to item 1 of tObjectRect
151			                  add tDifference to item 3 of tObjectRect
152			               else  if the cREVGeometry[tProfileName,"moveHObjectSide"] of control id tControlId is "center" then
153			                  put item 1 of tCardLoc + tDistance into tHMoved
154			                  put tHMoved - tObjectH into tDifference
155			                  add tDifference to item 1 of tObjectRect
156			                  add tDifference to item 3 of tObjectRect
157			               end if
158			            else
159			               --move H in absolute reference to an object
160			               put the cREVGeometry[tProfileName,"moveHDistance"] of control id tControlId into tDistance
161			               
162			               local tObjectRef
163			               put the cREVGeometry[tProfileName,"moveHObjectRef"] of control id tControlId into tObjectRef
164			               put tIDArray[tObjectRef] into tObjectRef
165			               if the cREVGeometry[tProfileName,"moveHObjectSide"] of control id tControlId is "left" then
166			                  put the left of control id tObjectRef + tDistance into tHMoved
167			                  put tHMoved - tObjectH into tDifference
168			                  add tDifference to item 1 of tObjectRect
169			                  add tDifference to item 3 of tObjectRect
170			               else if the cREVGeometry[tProfileName,"moveHObjectSide"] of control id tControlId is "right" then
171			                  put the right of control id tObjectRef + tDistance into tHMoved
172			                  put tHMoved - tObjectH into tDifference
173			                  add tDifference to item 1 of tObjectRect
174			                  add tDifference to item 3 of tObjectRect
175			               else  if the cREVGeometry[tProfileName,"moveHObjectSide"] of control id tControlId is "center" then
176			                  put item 1 of the loc of control id tObjectRef + tDistance into tHMoved
177			                  put tHMoved - tObjectH into tDifference
178			                  add tDifference to item 1 of tObjectRect
179			                  add tDifference to item 3 of tObjectRect
180			               end if
181			            end if
182			         else
183			            --relative movement of H
184			            if the cREVGeometry[tProfileName,"moveHObjectRef"] of control id tControlId is "card" then
185			               --move H in relative reference to the card
186			               put the cREVGeometry[tProfileName,"moveHDistance"] of control id tControlId into tDistance
187			               --we assume relative to bottom
188			               put round(tDistance * tCardWidth) into tDistance
189			               put tCardWidth + tDistance into tHMoved
190			               put tHMoved - tObjectH into tDifference
191			               add tDifference to item 1 of tObjectRect
192			               add tDifference to item 3 of tObjectRect
193			            else
194			               put the cREVGeometry[tProfileName,"moveHDistance"] of control id tControlId into tDistance
195			               put the cREVGeometry[tProfileName,"moveHObjectRef"] of control id tControlId into tObjectRef
196			               put tIDArray[tObjectRef] into tObjectRef
197			               put round(tDistance * tCardWidth) into tDistance
198			               
199			               # TH-2008-07-07 :: Bug 6391, The linked object should remain a fixed percentage of the width of the card away
200			               # from the right of the object it is linked to.  Previously this section used item 1 of the loc of the object being linked to
201			               # instead of the right, this caused an initial jump in location of the linked object.
202			               --put item 1 of the loc of control id tObjectRef + tDistance into tHMoved
203			               put item 3 of the rect of control id tObjectRef + tDistance into tHMoved
204			               
205			               put tHMoved - tObjectH into tDifference
206			               add tDifference to item 1 of tObjectRect
207			               add tDifference to item 3 of tObjectRect
208			            end if
209			         end if
210			      else
211			         ----CHECK FOR EITHER LEFT OR RIGHT SCALING
212			         ----LEFT SCALING
213			         if the cREVGeometry[tProfileName,"scaleLeft"] of control id tControlId is true then
214			            if the cREVGeometry[tProfilename,"scaleLeftAbsolute"] of control id tControlId is true then
215			               --absolute scaling of left
216			               if the cREVGeometry[tProfileName,"scaleLeftObjectRef"] of control id tControlId is "card" then
217			                  --scale left in absolute reference to the card
218			                  put the cREVGeometry[tProfileName,"scaleLeftDistance"] of control id tControlId into tDistance
219			                  if the cREVGeometry[tProfileName,"scaleLeftObjectSide"] of control id tControlId is "left" then
220			                     put the left of this cd + tDistance into item 1 of tObjectRect
221			                  else if the cREVGeometry[tProfileName,"scaleLeftObjectSide"] of control id tControlId is "right" then
222			                     put tCardWidth + tDistance into item 1 of tObjectRect
223			                  else  if the cREVGeometry[tProfileName,"scaleLeftObjectSide"] of control id tControlId is "center" then
224			                     put item 1 of tCardLoc + tDistance into item 1 of tObjectRect
225			                  end if
226			               else
227			                  --scale left in absolute reference to an object
228			                  put the cREVGeometry[tProfileName,"scaleLeftDistance"] of control id tControlId into tDistance
229			                  put the cREVGeometry[tProfileName,"scaleLeftObjectRef"] of control id tControlId into tObjectRef
230			                  put tIDArray[tObjectRef] into tObjectRef
231			                  if the cREVGeometry[tProfileName,"scaleLeftObjectSide"] of control id tControlId is "left" then
232			                     put the left of control id tObjectRef + tDistance into item 1 of tObjectRect
233			                  else if the cREVGeometry[tProfileName,"scaleLeftObjectSide"] of control id tControlId is "right" then
234			                     put the right of control id tObjectRef + tDistance into item 1 of tObjectRect
235			                  else  if the cREVGeometry[tProfileName,"scaleLeftObjectSide"] of control id tControlId is "center" then
236			                     put item 1 of the loc of control id tObjectRef + tDistance into item 1 of tObjectRect
237			                  end if
238			               end if
239			            else
240			               --relative scaling of left
241			               if the cREVGeometry[tProfileName,"scaleLeftObjectRef"] of control id tControlId is "card" then
242			                  --scale left in relative reference to the card
243			                  put the cREVGeometry[tProfileName,"scaleLeftDistance"] of control id tControlId into tDistance
244			                  --we assume relative to center
245			                  put round(tDistance * tCardWidth) into tDistance
246			                  put tCardWidth+tDistance into item 1 of tObjectRect
247			               else
248			                  put the cREVGeometry[tProfileName,"scaleLeftDistance"] of control id tControlId into tDistance
249			                  put the cREVGeometry[tProfileName,"scaleLeftObjectRef"] of control id tControlId into tObjectRef
250			                  put tIDArray[tObjectRef] into tObjectRef
251			                  put round(tDistance * tCardWidth) into tDistance
252			                  # TH-2008-07-07 :: Bug 6391, similar problem to elsewhere, shouldn't be 
253			                  # using loc, instead item of rect
254			                  --put item 1 of the loc of control id tObjectRef+tDistance into item 1 of tObjectRect
255			                  put item 3 of the rect of control id tObjectRef+tDistance into item 1 of tObjectRect 
256			               end if
257			            end if
258			         end if
259			         ----RIGHT SCALING
260			         if the cREVGeometry[tProfileName,"scaleRight"] of control id tControlId is true then
261			            if the cREVGeometry[tProfilename,"scaleRightAbsolute"] of control id tControlId is true then
262			               --absolute scaling of right
263			               if the cREVGeometry[tProfileName,"scaleRightObjectRef"] of control id tControlId is "card" then
264			                  --scale right in absolute reference to the card
265			                  put the cREVGeometry[tProfileName,"scaleRightDistance"] of control id tControlId into tDistance
266			                  if the cREVGeometry[tProfileName,"scaleRightObjectSide"] of control id tControlId is "right" then
267			                     put tCardWidth + tDistance into item 3 of tObjectRect
268			                  else if the cREVGeometry[tProfileName,"scaleRightObjectSide"] of control id tControlId is "left" then
269			                     put 0 + tDistance into item 3 of tObjectRect
270			                  else  if the cREVGeometry[tProfileName,"scaleRightObjectSide"] of control id tControlId is "center" then
271			                     put item 1 of tCardLoc + tDistance into item 3 of tObjectRect
272			                  end if
273			               else
274			                  --scale right in absolute reference to an object
275			                  put the cREVGeometry[tProfileName,"scaleRightDistance"] of control id tControlId into tDistance
276			                  put the cREVGeometry[tProfileName,"scaleRightObjectRef"] of control id tControlId into tObjectRef
277			                  put tIDArray[tObjectRef] into tObjectRef
278			                  if the cREVGeometry[tProfileName,"scaleRightObjectSide"] of control id tControlId is "right" then
279			                     put the right of control id tObjectRef + tDistance into item 3 of tObjectRect
280			                  else if the cREVGeometry[tProfileName,"scaleRightObjectSide"] of control id tControlId is "left" then
281			                     put the left of control id tObjectRef + tDistance into item 3 of tObjectRect
282			                  else  if the cREVGeometry[tProfileName,"scaleRightObjectSide"] of control id tControlId is "center" then
283			                     put item 1 of the loc of control id tObjectRef + tDistance into item 3 of tObjectRect
284			                  end if
285			               end if
286			            else
287			               --relative scaling of right
288			               if the cREVGeometry[tProfileName,"scaleRightObjectRef"] of control id tControlId is "card" then
289			                  --scale right in relative reference to the card
290			                  put the cREVGeometry[tProfileName,"scaleRightDistance"] of control id tControlId into tDistance
291			                  --we assume relative to center
292			                  put round(tDistance * tCardWidth) into tDistance
293			                  put tCardWidth+tDistance into item 3 of tObjectRect
294			               else
295			                  put the cREVGeometry[tProfileName,"scaleRightDistance"] of control id tControlId into tDistance
296			                  put the cREVGeometry[tProfileName,"scaleRightObjectRef"] of control id tControlId into tObjectRef
297			                  put tIDArray[tObjectRef] into tObjectRef
298			                  put round(tDistance * tCardWidth) into tDistance
299			                  
300			                  # TH-2008-07-07 :: Bug 6391, similar problem to elsewhere, should be making use of the
301			                  # right not item 1 of the loc
302			                  --put item 1 of the loc of control id tObjectRef+tDistance into item 3 of tObjectRect
303			                  put item 3 of the rect of control id tObjectRef+tDistance into item 3 of tObjectRect                  
304			               end if
305			            end if
306			         end if
307			         --END OF HORIZONTAL
308			      end if
309			      --VERTICAL
310			      if the cREVGeometry[tProfileName,"moveV"] of control id tControlId is true then
311			         --VERTICAL MOVEMENT
312			         
313			         local tObjectV
314			         put item 2 of the loc of control id tControlId into tObjectV
315			         if the cREVGeometry[tProfilename,"moveVAbsolute"] of control id tControlId is true then
316			            --absolute movement of V
317			            if the cREVGeometry[tProfileName,"moveVObjectRef"] of control id tControlId is "card" then
318			               --move V in absolute reference to the card
319			               put the cREVGeometry[tProfileName,"moveVDistance"] of control id tControlId into tDistance
320			               if the cREVGeometry[tProfileName,"moveVObjectSide"] of control id tControlId is "top" then
321			                  local tVMoved
322			                  put the top of this cd + tDistance into tVMoved
323			                  put tVMoved - tObjectV into tDifference
324			                  add tDifference to item 2 of tObjectRect
325			                  add tDifference to item 4 of tObjectRect
326			               else if the cREVGeometry[tProfileName,"moveVObjectSide"] of control id tControlId is "bottom" then
327			                  put tCardHeight + tDistance into tVMoved
328			                  put tVMoved - tObjectV into tDifference
329			                  add tDifference to item 2 of tObjectRect
330			                  add tDifference to item 4 of tObjectRect
331			               else  if the cREVGeometry[tProfileName,"moveVObjectSide"] of control id tControlId is "center" then
332			                  put item 2 of tCardLoc + tDistance into tVMoved
333			                  put tVMoved - tObjectV into tDifference
334			                  add tDifference to item 2 of tObjectRect
335			                  add tDifference to item 4 of tObjectRect
336			               end if
337			            else
338			               --move V in absolute reference to an object
339			               put the cREVGeometry[tProfileName,"moveVDistance"] of control id tControlId into tDistance
340			               put the cREVGeometry[tProfileName,"moveVObjectRef"] of control id tControlId into tObjectRef
341			               put tIDArray[tObjectRef] into tObjectRef
342			               if the cREVGeometry[tProfileName,"moveVObjectSide"] of control id tControlId is "top" then
343			                  put the top of control id tObjectRef + tDistance into tVMoved
344			                  put tVMoved - tObjectV into tDifference
345			                  add tDifference to item 2 of tObjectRect
346			                  add tDifference to item 4 of tObjectRect
347			               else if the cREVGeometry[tProfileName,"moveVObjectSide"] of control id tControlId is "bottom" then
348			                  put the bottom of control id tObjectRef + tDistance into tVMoved
349			                  put tVMoved - tObjectV into tDifference
350			                  add tDifference to item 2 of tObjectRect
351			                  add tDifference to item 4 of tObjectRect
352			               else  if the cREVGeometry[tProfileName,"moveVObjectSide"] of control id tControlId is "center" then
353			                  put item 2 of the loc of control id tObjectRef + tDistance into tVMoved
354			                  put tVMoved - tObjectV into tDifference
355			                  add tDifference to item 2 of tObjectRect
356			                  add tDifference to item 4 of tObjectRect
357			               end if
358			            end if
359			         else
360			            --relative movement of V
361			            if the cREVGeometry[tProfileName,"moveVObjectRef"] of control id tControlId is "card" then
362			               --move V in relative reference to the right
363			               put the cREVGeometry[tProfileName,"moveVDistance"] of control id tControlId into tDistance
364			               --we assume relative to bottom
365			               put round(tDistance * tCardHeight) into tDistance
366			               put tCardHeight + tDistance into tVMoved
367			               put tVMoved - tObjectV into tDifference
368			               add tDifference to item 2 of tObjectRect
369			               add tDifference to item 4 of tObjectRect
370			            else
371			               put the cREVGeometry[tProfileName,"moveVDistance"] of control id tControlId into tDistance
372			               put the cREVGeometry[tProfileName,"moveVObjectRef"] of control id tControlId into tObjectRef
373			               put tIDArray[tObjectRef] into tObjectRef
374			               put round(tDistance * tCardHeight) into tDistance
375			               
376			               # TH-2008-07-07 :: Bug 6391, The linked object should remain a fixed percentage of the height of the card away
377			               # from the top of the object it is linked to.  Previously this section used item 2 of the loc of the object being linked to
378			               # instead of the bottom, this caused an initial jump in location of the linked object.
379			               --put item 2 of the loc of control id tObjectRef + tDistance into tVMoved
380			               put item 4 of the rect of control id tObjectRef + tDistance into tVMoved
381			               
382			               put tVMoved - tObjectV into tDifference
383			               add tDifference to item 2 of tObjectRect
384			               add tDifference to item 4 of tObjectRect
385			            end if
386			         end if
387			      else
388			         ----CHECK FOR EITHER TOP OR BOTTOM SCALING
389			         ----TOP SCALING
390			         if the cREVGeometry[tProfileName,"scaleTop"] of control id tControlId is true then
391			            if the cREVGeometry[tProfilename,"scaleTopAbsolute"] of control id tControlId is true then
392			               --absolute scaling of Top
393			               if the cREVGeometry[tProfileName,"scaleTopObjectRef"] of control id tControlId is "card" then
394			                  --scale Top in absolute reference to the card
395			                  put the cREVGeometry[tProfileName,"scaleTopDistance"] of control id tControlId into tDistance
396			                  if the cREVGeometry[tProfileName,"scaleTopObjectSide"] of control id tControlId is "Top" then
397			                     put the top of this cd + tDistance into item 2 of tObjectRect
398			                  else if the cREVGeometry[tProfileName,"scaleTopObjectSide"] of control id tControlId is "bottom" then
399			                     put tCardHeight + tDistance into item 2 of tObjectRect
400			                  else  if the cREVGeometry[tProfileName,"scaleTopObjectSide"] of control id tControlId is "center" then
401			                     put item 2 of tCardLoc + tDistance into item 2 of tObjectRect
402			                  end if
403			               else
404			                  --scale Top in absolute reference to an object
405			                  put the cREVGeometry[tProfileName,"scaleTopDistance"] of control id tControlId into tDistance
406			                  put the cREVGeometry[tProfileName,"scaleTopObjectRef"] of control id tControlId into tObjectRef
407			                  put tIDArray[tObjectRef] into tObjectRef
408			                  if the cREVGeometry[tProfileName,"scaleTopObjectSide"] of control id tControlId is "top" then
409			                     put the top of control id tObjectRef + tDistance into item 2 of tObjectRect
410			                  else if the cREVGeometry[tProfileName,"scaleTopObjectSide"] of control id tControlId is "bottom" then
411			                     put the bottom of control id tObjectRef + tDistance into item 2 of tObjectRect
412			                  else  if the cREVGeometry[tProfileName,"scaleTopObjectSide"] of control id tControlId is "center" then
413			                     put item 2 of the loc of control id tObjectRef + tDistance into item 2 of tObjectRect
414			                  end if
415			               end if
416			            else
417			               --relative scaling of Top
418			               if the cREVGeometry[tProfileName,"scaleTopObjectRef"] of control id tControlId is "card" then
419			                  --scale Top in relative reference to the card
420			                  put the cREVGeometry[tProfileName,"scaleTopDistance"] of control id tControlId into tDistance
421			                  --we assume relative to center
422			                  put round(tDistance * tCardHeight) into tDistance
423			                  put tCardHeight+tDistance into item 2 of tObjectRect
424			               else
425			                  put the cREVGeometry[tProfileName,"scaleTopDistance"] of control id tControlId into tDistance
426			                  put the cREVGeometry[tProfileName,"scaleTopObjectRef"] of control id tControlId into tObjectRef
427			                  put tIDArray[tObjectRef] into tObjectRef
428			                  put round(tDistance * tCardHeight) into tDistance
429			                  # TH-2008-07-07 :: Bug 6391, similar problem to elsewhere, shouldn't be 
430			                  # using loc, instead item of rect
431			                  --put item 2 of the loc of control id tObjectRef+tDistance into item 2 of tObjectRect
432			                  put item 4 of the rect of control id tObjectRef+tDistance into item 2 of tObjectRect
433			               end if
434			            end if
435			         end if
436			         ----Bottom SCALING
437			         if the cREVGeometry[tProfileName,"scaleBottom"] of control id tControlId is true then
438			            if the cREVGeometry[tProfilename,"scaleBottomAbsolute"] of control id tControlId is true then
439			               --absolute scaling of Bottom
440			               if the cREVGeometry[tProfileName,"scaleBottomObjectRef"] of control id tControlId is "card" then
441			                  --scale Bottom in absolute reference to the card
442			                  put the cREVGeometry[tProfileName,"scaleBottomDistance"] of control id tControlId into tDistance
443			                  if the cREVGeometry[tProfileName,"scaleBottomObjectSide"] of control id tControlId is "top" then
444			                     put the top of this cd + tDistance into item 4 of tObjectRect
445			                  else if the cREVGeometry[tProfileName,"scaleBottomObjectSide"] of control id tControlId is "bottom" then
446			                     put tCardHeight + tDistance into item 4 of tObjectRect
447			                  else  if the cREVGeometry[tProfileName,"scaleBottomObjectSide"] of control id tControlId is "center" then
448			                     put item 2 of tCardLoc + tDistance into item 4 of tObjectRect
449			                  end if
450			               else
451			                  --scale Bottom in absolute reference to an object
452			                  put the cREVGeometry[tProfileName,"scaleBottomDistance"] of control id tControlId into tDistance
453			                  put the cREVGeometry[tProfileName,"scaleBottomObjectRef"] of control id tControlId into tObjectRef
454			                  put tIDArray[tObjectRef] into tObjectRef
455			                  if the cREVGeometry[tProfileName,"scaleBottomObjectSide"] of control id tControlId is "top" then
456			                     put the top of control id tObjectRef + tDistance into item 4 of tObjectRect
457			                  else if the cREVGeometry[tProfileName,"scaleBottomObjectSide"] of control id tControlId is "bottom" then
458			                     put the bottom of control id tObjectRef + tDistance into item 4 of tObjectRect
459			                  else  if the cREVGeometry[tProfileName,"scaleBottomObjectSide"] of control id tControlId is "center" then
460			                     put item 2 of the loc of control id tObjectRef + tDistance into item 4 of tObjectRect
461			                  end if
462			               end if
463			            else
464			               --relative scaling of Bottom
465			               if the cREVGeometry[tProfileName,"scaleBottomObjectRef"] of control id tControlId is "card" then
466			                  --scale Bottom in relative reference to the card
467			                  put the cREVGeometry[tProfileName,"scaleBottomDistance"] of control id tControlId into tDistance
468			                  --we assume relative to bottom
469			                  put round(tDistance * tCardHeight) into tDistance
470			                  put tCardHeight+tDistance into item 4 of tObjectRect
471			               else
472			                  put the cREVGeometry[tProfileName,"scaleBottomDistance"] of control id tControlId into tDistance
473			                  put the cREVGeometry[tProfileName,"scaleBottomObjectRef"] of control id tControlId into tObjectRef
474			                  put tIDArray[tObjectRef] into tObjectRef
475			                  put round(tDistance * tCardHeight) into tDistance
476			                  
477			                  # TH-2008-07-07 :: Bug 6391, similar problem to elsewhere, should be making use of the
478			                  # top not item item 2 of the loc
479			                  --put item 2 of the loc of control id tObjectRef+tDistance into item 4 of tObjectRect
480			                  put item 4 of the rect of control id tObjectRef+tDistance into item 4 of tObjectRect
481			               end if
482			            end if
483			         end if
484			         --END OF VERTICAL
485			      end if
486			      --CHECK WHETHER TO SHOW SCROLLBARS
487			      if word 1 of the name of control id tControlId is "field" then
488			         if the cREVGeometry[tProfileName,"showHScroll"] of control id tControlId is true then
489			            --show H scrollbar if text too small
490			            
491			            local tWidth
492			            put the formattedWidth of control id tControlId into tWidth
493			            if item 3 of tObjectRect - item 1 of tObjectRect < tWidth then
494			               set the hScrollbar of control id tControlId to true
495			            else
496			               set the hScrollbar of control id tControlId to false
497			            end if
498			         end if
499			         if the cREVGeometry[tProfileName,"showVScroll"] of control id tControlId is true then
500			            --show V scrollbar if text too small
501			            
502			            local tHeight
503			            put the formattedHeight of control id tControlId into tHeight
504			            if item 4 of tObjectRect - item 2 of tObjectRect < tHeight then
505			               set the vScrollbar of control id tControlId to true
506			            else
507			               set the vScrollbar of control id tControlId to false
508			            end if
509			         end if
510			      end if
511			      --end SCROLLBAR check
512			      ----CONSTRAINTS TAB - MINIMUM AND MAXIMUM SIZES, PLACEMENT, ETC
513			      if the cREVGeometry[tProfileName,"dontClipText"] of control id tControlId is true then
514			         --don't CLIP text - all object types
515			         local tPassH
516			         put false into tPassH
517			         
518			         local tPassV
519			         put false into tPassV
520			         if word 1 of the name of control id tControlId is "field" then
521			            if the hScrollbar of control id tControlId is true then
522			               put true into tPassH
523			            end if
524			            if the vScrollBar of control id tControlId is true then
525			               put true into tPassV
526			            end if
527			         end if
528			         put the formattedWidth of control id tControlId into tWidth
529			         put the formattedHeight of control id tControlId into tHeight
530			         if not tPassH and item 3 of tObjectRect - item 1 of tObjectRect < tWidth then
531			            --object is too narrow, make it wider
532			            put revSetWidth(tObjectRect,tWidth) into tObjectRect
533			         end if
534			         if not tPassV and item 4 of tObjectRect - item 2 of tObjectRect < tHeight then
535			            --object is too short, make it taller
536			            put revSetHeight(tObjectRect,tHeight) into tObjectRect
537			         end if
538			      end if
539			      --check min/max WIDTH and HEIGHT
540			      if the cREVGeometry[tProfileName,"minWidth"] of control id tControlId is not empty then
541			         --minimum width check
542			         put the cREVGeometry[tProfileName,"minWidth"] of control id tControlId into tWidth
543			         if item 3 of tObjectRect - item 1 of tObjectRect < tWidth then
544			            put revSetWidth(tObjectRect,tWidth) into tObjectRect
545			         end if
546			      end if
547			      if the cREVGeometry[tProfileName,"minHeight"] of control id tControlId is not empty then
548			         --minimum height check
549			         put the cREVGeometry[tProfileName,"minHeight"] of control id tControlId into tHeight
550			         if item 4 of tObjectRect - item 2 of tObjectRect < tHeight then
551			            put revSetHeight(tObjectRect,tHeight) into tObjectRect
552			         end if
553			      end if
554			      if the cREVGeometry[tProfileName,"maxwidth"] of control id tControlId is not empty then
555			         --maximum width check
556			         put the cREVGeometry[tProfileName,"maxWidth"] of control id tControlId into tWidth
557			         if item 3 of tObjectRect - item 1 of tObjectRect > tWidth then
558			            put revSetWidth(tObjectRect,tWidth) into tObjectRect
559			         end if
560			      end if
561			      if the cREVGeometry[tProfileName,"maxHeight"] of control id tControlId is not empty then
562			         --maximum height check
563			         put the cREVGeometry[tProfileName,"maxHeight"] of control id tControlId into tHeight
564			         if item 4 of tObjectRect - item 2 of tObjectRect > tHeight then
565			            put revSetHeight(tObjectRect,tHeight) into tObjectRect
566			         end if
567			      end if
568			      --CHECK edges left,right,top,bottom
569			      if the cREVGeometry[tProfileName,"minLeft"] of control id tControlId is not empty then
570			         --check left of object
571			         
572			         local tMinLeft
573			         put the cREVGeometry[tProfileName,"minLeft"] of control id tControlId into tMinLeft
574			         if item 1 of tObjectRect < tMinLeft then
575			            --set the rect to move the object right
576			            put tMinLeft - item 1 of tObjectRect into tDifference
577			            add tDifference to item 1 of tObjectRect
578			            add tDifference to item 3 of tObjectRect
579			         end if
580			      end if
581			      if the cREVGeometry[tProfileName,"maxRight"] of control id tControlId is not empty then
582			         --check right of object
583			         
584			         local tMaxRight
585			         put the cREVGeometry[tProfileName,"maxRight"] of control id tControlId into tMaxRight
586			         if item 3 of tObjectRect > tMaxRight then
587			            --set the rect to move the object left
588			            put item 3 of tObjectRect - tMaxRight into tDifference
589			            subtract tDifference from item 1 of tObjectRect
590			            subtract tDifference from item 3 of tObjectRect
591			         end if
592			      end if
593			      if the cREVGeometry[tProfileName,"minTop"] of control id tControlId is not empty then
594			         --check top of object
595			         
596			         local tMinTop
597			         put the cREVGeometry[tProfileName,"minTop"] of control id tControlId into tMinTop
598			         if item 2 of tObjectRect < tMinTop then
599			            --set the rect to move the object down
600			            put tMinTop - item 2 of tObjectRect into tDifference
601			            add tDifference to item 2 of tObjectRect
602			            add tDifference to item 4 of tObjectRect
603			         end if
604			      end if
605			      if the cREVGeometry[tProfileName,"maxBottom"] of control id tControlId is not empty then
606			         --check bottom of object
607			         
608			         local tMaxBottom
609			         put the cREVGeometry[tProfileName,"maxBottom"] of control id tControlId into tMaxBottom
610			         if item 4 of tObjectRect > tMaxBottom then
611			            --set the rect to move the object up
612			            put item 4 of tObjectRect - tMaxBottom into tDifference
613			            subtract tDifference from item 2 of tObjectRect
614			            subtract tDifference from item 4 of tObjectRect
615			         end if
616			      end if
617			      if word 1 of the name of control id tControlId is "field" then
618			         if the hilitedLines of control id tControlId is not 0 then
619			            local tRestore
620			            put the hilitedLines of control id tControlId into tRestore
621			         end if
622			      end if
623			      unlock messages -- km get resizeControl
624			      set the rect of control id tControlId to tObjectRect
625			      lock messages
626			      if tRestore is not empty then
627			         set the hilitedLines of control id tControlId to tRestore
628			         put empty into tRestore
629			      end if
630			   end repeat
631	8	0	   repeat for each line l in keys(tGroupLockLocation)
632			      if l is empty then next repeat
633			      set the lockLocation of control id l to tGroupLockLocation[l]
634			   end repeat
635	8	0	   if the cREVGeometry["expandStack"] of this card is true then
636			      local tStackRect
637			      put the rect of this stack into tStackRect
638			      put the formattedWidth of this cd + the formattedLeft of this cd into tWidth
639			      if tCardWidth < tWidth then put item 1 of tStackRect + (tWidth-the cREVGeneral["virtualWidth"] of this card) into item 3 of tStackRect
640			      put the formattedHeight of this cd + the formattedTop of this cd into tHeight
641			      if tCardHeight < tHeight then put item 2 of tStackRect + (tHeight-the cREVGeneral["virtualHeight"] of this card) into item 4 of tStackRect
642			      set the rect of this stack to tStackRect
643			   end if
644	8	0	   put empty into lOrigWidth
645	8	0	   put empty into lOrigHeight
646			   --unlock screen
647	8	0	   unlock messages
648	8	0	   set the defaultStack to tDefaultStack
649	8	0	end revUpdateGeometry

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		2	ideMessageSendWithParameters
1570	4	0	on ideMessageSendWithParameters pMessage, pTriggeringObjects, pParamsArray
1571	4	0	   lock screen
1572			   
1573			   # Validate input
1574	4	0	   if not revIDEMessageIsValid(pMessage) then
1575			      return __revIDEError("The message ("&pMessage&") you have requested to be sent is not a valid IDE message. Please check the documentation for which messages you can subscribe to.")
1576			   end if
1577			   
1578			   # If in run mode don't send any updates
1579			   //if the tool is not "pointer tool" then exit ideMessageSendWithParameters
1580			   
1581	4	0	   local tSubscriptionList, tTargetsA, tSubscription
1582			   # Add all universal subscribers to the subscription list
1583	4	0	   put sSubscriptions[pMessage]["callback targets"] into tSubscriptionList
1584			   
1585			   # Add any per-object subscriptions
1586	8	0	   repeat for each line tLine in pTriggeringObjects
1587	4	1	      put pMessage & "," & tLine into tSubscription
1588	4	0	      repeat for each line tTarget in sSubscriptions[tSubscription]["callback targets"]
1589			         if tSubscriptionList is empty then
1590			            put tTarget into tSubscriptionList
1591			         else
1592			            put return & tTarget after tSubscriptionList
1593			         end if
1594			      end repeat
1595			   end repeat
1596			   
1597			   # Send the message!
1598	4	0	   set the itemdel to ":"
1599	4	0	   local tMessage
1600	4	0	   put item 1 of pMessage into tMessage
1601			   
1602			   # Construct a dispatch command with all the desired parameters
1603	4	0	   local tDoString, tParams, tErrors
1604	4	0	   put "dispatch tMessage to tObjectID" into tDoString
1605			   
1606			   # If this is a parameterised message, add the parameter as the first arg
1607	4	0	   if the number of items of pMessage > 1 then
1608			      put " with item 2 of pMessage" into tParams
1609			   end if
1610			   
1611	4	0	   repeat with tParam = 1 to the number of elements in pParamsArray
1612			      if tParams is empty then
1613			         put " with pParamsArray[" & tParam & "]" into tParams
1614			      else
1615			         put ", pParamsArray[" & tParam & "]" after tParams
1616			      end if
1617			   end repeat
1618	4	0	   put tParams after tDoString
1619			   
1620	12	0	   repeat for each line tObjectID in tSubscriptionList
1621			      # if the callback object doesn't exist, don't send message
1622	8	1	      if not exists(tObjectID) then
1623			         revIDEUnsubscribeAll tObjectID
1624			         next repeat
1625			      end if
1626			      
1627			      # Ensure any error doesn't prevent subsequent subscribers from receiving messages
1628	8	0	      try
1629	8	0	         do tDoString
1630			      catch tError
1631			         if tErrors is empty then
1632			            put tError into tErrors
1633			         else
1634			            put return & tError after tErrors
1635			         end if
1636			      end try
1637			   end repeat
1638	4	0	   unlock screen
1639			   
1640	4	0	   if tErrors is not empty then
1641			      return __revIDEError("Error when sending message" && pMessage & ":" & return & tErrors)
1642			   end if
1643			   
1644	4	0	   return empty
1645	4	0	end ideMessageSendWithParameters

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revcommonlibrary.livecodescript"
		2	revStackNameIsIDEStack
454	16	0	function revStackNameIsIDEStack pStackName
455	16	2	   if there is a stack pStackName and the _ideoverride of stack pStackName then
456			      return true
457	16	0	   else if pStackName is among the items of "message box,answer dialog,ask dialog,home" then
458			      return true
459	16	0	   else if pStackName begins with "com.livecode." then
460			      return true
461	16	0	   else if pStackName is among the lines of revInternal__ListLoadedLibraries() then
462			      return true
463			   else
464	16	0	      return pStackName begins with "rev"
465			   end if   
466	16	0	end revStackNameIsIDEStack

button "GreyTranspa_Each" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		2	postProcess
37	1	0	on postProcess
38			   ------- visual effect
39	1	0	   show image "PixEnd"
40	1	1	   put (the milliseconds - fld "Timer") && "ms" into fld "Timer"
41	2	1	   if ("button" is in the target) then set hilite of the target to false
42	1	0	end postProcess

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript"
		2	revMenubarButtonText
937	52	0	function revMenubarButtonText pName, pHilited
938	52	0	   if pHIlited is false then
939	40	0	      return pName
940			   end if
941			   
942	12	0	   switch pName
943			      case "Group"
944			         return "Ungroup"
945			      case "Edit Group"
946			         return "Stop Editing"
947			      default
948	12	0	         return pName
949			   end switch
950	52	2	end revMenubarButtonText

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		2	__itemExists
765	16	0	private function __itemExists pName
766	296	1	   repeat for each element tNavItem in sData
767	312	1	      if tNavItem["name"] is pName then return true
768			   end repeat
769			   return false
770	16	0	end __itemExists

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		2	revUpdateAOControls
2218	8	0	on revUpdateAOControls pTarget
2219	8	0	   global gREVStackName
2220			   
2221	8	0	   local tTargetStack
2222	8	0	   put revTargetStack(pTarget) into tTargetStack
2223			   
2224	8	0	   local tHCAddressing
2225	8	0	   put the hcAddressing of stack tTargetStack into tHCAddressing
2226	8	0	   set the hcAddressing of stack tTargetStack to false
2227	16	0	   if pTarget is empty then put the long id of the target into pTarget
2228			   else put the long id of pTarget into pTarget -- id with HCAddressing false
2229	8	0	   if there is a stack "revApplicationOverview" then
2230	8	1	      send "revClearControlCache pTarget" to stack "revApplicationOverview"
2231	8	1	      if the mode of stack "revApplicationOverview" is not 0 \
2232			            and revTargetStack(pTarget) is gREVStackName \
2233			            and the short name of this cd of stack "revApplicationOverview" is "Cards and Controls" then
2234			         
2235			         if lUpdateAOControlsTimerID is not empty then cancel lUpdateAOControlsTimerID
2236			         send "revRefreshControls true, false" to cd "Cards and Controls" of stack "revApplicationOverview" in 1 second
2237			         put the result into lUpdateAOControlsTimerID
2238			      end if
2239			   end if
2240	8	0	   set the hcAddressing of stack tTargetStack to tHCAddressing
2241	8	0	end revUpdateAOControls

button "GreyTranspa" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		2	postProcess
37	1	0	on postProcess
38			   ------- visual effect
39	1	0	   show image "PixEnd"
40	1	1	   put (the milliseconds - fld "Timer") && "ms" into fld "Timer"
41	2	1	   if ("button" is in the target) then set hilite of the target to false
42	1	0	end postProcess

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidemessagehandlerlibrary.livecodescript"
		1	newImage
106	4	0	on newImage
107	4	0	   local tTarget
108	4	0	   put the long id of the target into tTarget
109	4	0	   if not revIDEObjectIsOnIDEStack(tTarget) then
110	4	1	      send "ideMessageSend" &&  "ideNewControl","tTarget" to stack "revIDELibrary" in 0 milliseconds
111			   end if
112	4	0	   pass newImage
113	4	0	end newImage

button "layoutFrontscript" of group "behaviorGrp" of card "signIn" of stack "/Users/jgay/Clients/B - Thinking Strings/Friendship Press/Word at Hand/FPMobile.livecode"
		1	updateLayout
39	8	0	command updateLayout
40	8	0	  if dev() then
41	8	0	    get the short name of this stack
42	8	1	    if it is not "FPMobile" then
43	8	0	      exit updateLayout
44			    end if
45			  end if
46			  # keep track of the layout rect for each card so the command can
47			  # be skipped if layout is already correct
48			  if the cLayoutRect of this card is sCardRect then exit updateLayout
49			  switch the short name of this card
50			    case "signin"
51			      layoutSignin
52			      break
53			    case "account"
54			      layoutAccount
55			      break
56			    case "promo"
57			      layoutPromo
58			      break
59			    case "products-lessons"
60			      layoutProductsLessons
61			      break
62			    case "products-bibles"
63			      layoutProductsBibles
64			      break
65			    case "bible-toc"
66			      layoutBibleToc
67			      break
68			    case "bible-view"
69			      layoutBibleView
70			      break
71			    case "bookmarks"
72			      layoutBookmarks
73			      break
74			    case "highlights"
75			      layoutHighlights
76			      break
77			    case "search"
78			      layoutSearch
79			      break
80			    case "lesson-intro"
81			      layoutLessonIntro
82			      break
83			    case "lesson-connections"
84			      layoutLessonConnections
85			      break
86			    case "lesson-video"
87			      layoutLessonVideo
88			      break
89			    case "rtpa-think"
90			      layoutRtpaThink
91			      break
92			    case "rtpa-pray"
93			      layoutRtpaPray
94			      break
95			    case "rtpa-act"
96			      layoutRtpaAct
97			      break
98			    case "rtpa-menu"
99			      layoutRtpaMenu
100			      break
101			    case "support"
102			      layoutSupport
103			      break
104			  end switch
105			  set the cLayoutRect of this card to sCardRect
106	8	0	end updateLayout

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/script editor/behaviors/revseutilities.livecodescript"
		1	seRuggedObjectContainsObject
941	48	1	function seRuggedObjectContainsObject pContainingObject, pContainedObject
942	48	0	   if not seObjectIsContainer(pContainingObject) then
943	48	0	      return false
944			   end if
945			   
946			   # We rely on the two parameters being valid long ids to avoid having to refer to the object
947			   # as this could be broken by edit group mode.
948			   if pContainedObject ends with pContainingObject and pContainingObject is not pContainedObject then
949			      return true
950			   else
951			      return false
952			   end if
953	48	0	end seRuggedObjectContainsObject

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revgeometrylibrary.livecodescript"
		1	resizeStack
19	8	0	on resizeStack p1, p2, p3, p4
20	8	0	  global gREVMessageDispatch
21	8	0	  put p3 into lOrigWidth
22	8	0	  put p4 into lOrigHeight
23	8	0	  repeat for each line tStack in gREVMessageDispatch["revChangeWindowSize"]
24			    send "revResizeStack" to this card of stack tStack
25			  end repeat
26			  
27			  # OK-2007-08-10: Added declaration for global, previously this block would not have worked as intended.
28	8	0	  global gREVSuppressMessages
29	8	0	  if char 1 to 3 of REVTargetStack() is "rev" then
30			    if not gREVSuppressMessages or (gREVSuppressMessages and revOKTarget()) then 
31			      pass resizeStack
32			    end if
33			  end if
34			  
35	8	0	  if "cREVGeometryCache" is among the lines of the customPropertySets of this card of stack REVTargetStack() then 
36	8	0	    revUpdateGeometry
37			  end if
38			  
39	8	0	  if the environment is "development" then
40	8	0	    if lTimerID is not empty then 
41			      cancel lTimerID
42			    end if
43			    
44	8	1	    put revTargetStack(the long id of the target) into tStack
45			    
46	8	0	    local tPalettes
47	8	0	    put revPropertyPalettes(the long id of stack tStack) into tPalettes
48	8	0	    repeat for each line tPalette in tPalettes
49			      if the short name of this card of stack tPalette is "revStackSize&Position" and not the cDontUpdate of stack tPalette then
50			        send "revUpdatePalette" to this cd of stack tPalette in 1 second
51			        put the result into lTimerID
52			        exit repeat
53			      end if
54			    end repeat
55			    
56			  end if
57	8	0	  if not gREVSuppressMessages or (gREVSuppressMessages and revOKTarget()) then 
58	8	0	    pass resizeStack
59			  end if
60	8	0	end resizeStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		1	revIDESetPreference
2281	4	0	on revIDESetPreference pPreferenceName, pValue
2282	4	1	   if the pPreferenceName of stack "revpreferences" is not pValue then
2283			      set the pPreferenceName of stack "revpreferences" to pValue
2284			      revInternal__SavePreferences
2285			      ideMessageSend "idePreferenceChanged:" & pPreferenceName,pValue
2286			   end if
2287	4	0	end revIDESetPreference

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		1	revIDEStackIsIDEStack
4746	16	0	function revIDEStackIsIDEStack pLongID
4747	16	1	   if not exists(pLongID) then return false
4748	16	0	   return revIDEStackNameIsIDEStack(the short name of pLongID)
4749	16	0	end revIDEStackIsIDEStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		1	ideStackOfObject
2574	12	1	function ideStackOfObject pLongID
2575	12	0	   local tOffset
2576	12	0	   put wordOffset("stack",pLongID) into tOffset
2577	12	0	   return word tOffset to -1 of pLongID
2578	12	0	end ideStackOfObject

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript"
		1	updateButtonState
840	4	0	on updateButtonState
841	4	0	   lock screen
842	4	0	   lock messages
843			   
844	4	0	   enableToolbar
845			   
846	4	0	   local tSelObj
847	4	0	   put revIDESelectedObjects() into tSelObj
848			   
849	4	0	   local tControlSelected
850	4	0	   put tSelObj is not empty and word 1 of tSelObj \ 
851			         is not among the items of "card,stack" into tControlSelected
852			   
853	4	0	   local tUserStack
854	4	0	   put not revIDEStackIsIDEStack(the topstack) into tUserStack
855			   
856	4	0	   local tGroupHilite
857	4	0	   put word 1 of tSelObj is "group" and the number of lines in tSelobj is 1 into tGroupHilite
858	4	1	   updateButtonHilite "Group", tGroupHilite
859			   
860			   -- Group button should be disabled if no controls are selected
861	4	0	   setToolbarButtonState "Group", tControlSelected
862			   
863	4	0	   local tEditGroupHilite
864	4	0	   put the editBg of the topStack and word 1 of tSelObj is not "group" into tEditGroupHilite
865	4	0	   updateButtonHilite "Edit Group", tEditGroupHilite
866			   
867			   -- If a group is selected, the Edit Group button should be enabled
868			   -- It should also be enabled (with label 'Stop Editing') if we're currently editing a group
869	4	0	   setToolbarButtonState "Edit Group", \
870			         tGroupHilite or the editBg of the topstack
871			   
872			   # Click buttons don't stay hilited
873	4	0	   updateButtonHilite "Message Box", false
874	4	0	   updateButtonHilite "Inspector", false
875	4	0	   updateButtonHilite "Code", false
876	4	0	   updateButtonHilite "Test", false
877	4	0	   updateButtonHilite "Sample Stacks", false
878	4	0	   updateButtonHilite "Tutorials", false
879	4	0	   updateButtonHilite "Resources", false
880	4	0	   updateButtonHilite "Dictionary", false
881			   
882			   # Toggle buttons hilited according to state of property
883	4	0	   global gRevSuppressErrors, gRevSuppressMessages
884	4	0	   updateButtonHilite "Errors", gRevSuppressErrors
885	4	0	   updateButtonHilite "Messages", gRevSuppressMessages
886	4	0	   updateButtonHilite "Select Grouped", the selectGroupedControls
887			   
888			   # Deal with enabled/disabled of code and inspector
889	4	0	   global gRevDevelopment
890	4	0	   local tCanInspect
891	4	0	   put tControlSelected or tUserStack or gRevDevelopment into tCanInspect
892			   
893	4	0	   setToolbarButtonState "Code", tCanInspect
894	4	0	   setToolbarButtonState "Inspector", tCanInspect
895			   
896			   # Deal with enabled/disabled of test
897	4	0	   setToolbarButtonState "Test", \
898			         revIDEGetPreference("cDeployPlatforms") is not empty 
899			   
900	4	0	   if revIDETutorialInProgress() is not empty then
901			      disableToolbar
902			      if sToolbarHighlight is not empty then
903			         enable button sToolbarHighlight of group "toolbar" of me
904			      end if
905			   end if
906			   
907	4	0	   unlock messages
908	4	0	   unlock screen
909	4	0	end updateButtonState

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		1	canonicalStackName
232	16	0	function canonicalStackName
233	16	0	   local tName
234	16	0	   put the short name of me into tName
235			   
236			   # Workaround for inspector copies
237	16	0	   if word 1 of tName is "revPropertyInspector" then
238			      put "revInspector" into tName
239			   end if
240			   
241	16	1	   replace " " with "_" in tName
242			   
243	16	0	   return tName
244	16	0	end canonicalStackName

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		1	preferenceAction
221	8	0	private function preferenceAction pMenuArray
222	8	1	   local tDataA
223	8	0	   put empty into tDataA
224	8	0	   put "preferences" into tDataA["name"]
225	8	0	   put "Preferences" into tDataA["label"]
226	8	0	   put "cog" into tDataA["icon"]
227	8	0	   put pMenuArray into tDataA["menu"]
228	8	0	   put true into tDataA["enabled"]
229	8	0	   return tDataA
230	8	0	end preferenceAction

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		1	resizeStack
540	8	0	after resizeStack
541	8	0	   if sHideFrame is not true then
542	8	0	      layoutFrame
543			   end if
544	8	1	end resizeStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		1	__frameItemNameToIndex
732	8	0	private function __frameItemNameToIndex pName
733	80	0	   repeat for each key tIndex in sData
734	88	1	      if sData[tIndex]["name"] is pName then return tIndex
735			   end repeat
736	8	0	end __frameItemNameToIndex

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		1	revScriptEditorMain
1470	8	0	function revScriptEditorMain
1471			   --return the long id of stack (revEnvironmentToolsetPath() & slash & "revscripteditor.rev")
1472			   # OK-2008-11-04 : Cannot refer to the script editor by path because it has no path in Media.
1473	8	1	   return the long id of stack "revNewScriptEditor"
1474	8	0	end revScriptEditorMain

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		1	revPropertyPalettes
1640	8	0	function revPropertyPalettes pObjects
1641			   --returns a list of all palettes affected by given objects
1642	8	0	   local tOpenStacks
1643	8	1	   put the openStacks into tOpenStacks
1644	8	0	   filter tOpenStacks with "revPropertyPalette*"
1645			   
1646	8	0	   local tObjects
1647	8	0	   put the selobj into tObjects
1648	16	0	   if tObjects is empty then put the long id of the topStack into tObjects
1649			   
1650	8	0	   local tPalettes
1651	8	0	   put empty into tPalettes
1652	16	0	   repeat for each line l in pObjects
1653	8	0	      repeat for each line m in tOpenStacks
1654			         --check if stack is linked to object or is the active palette and the object is in the selection
1655			         if (l is among the lines of the cREVLinked of stack m \
1656			               or (the cREVLinked of stack m is empty and l is among the lines of tObjects)) \
1657			               and m is not among the lines of tPalettes
1658			         then put m & cr after tPalettes
1659			      end repeat
1660			   end repeat
1661	8	0	   delete last char of tPalettes
1662	8	0	   return tPalettes
1663	8	0	end revPropertyPalettes

stack "/Users/jgay/Dropbox/Application Support/My LiveCode/Plugins/revapplicationoverview.rev"
		1	revNameChanged
833	4	0	on revNameChanged pObject, pOldName, pNewName
834	4	0	  global gREVStackName, gREVObjectTree, gREVControls
835			  
836	4	0	  local tID
837	4	0	  put the id of pObject into tID
838			  
839	4	0	  local tType
840	4	0	  put word 1 of pObject into tType
841	4	0	  replace comma with kComma in pNewName
842			  
843	4	0	  local tLineID
844	4	1	  put revSelLineID() into tLineID
845	4	0	  switch tType
846			  case "stack"
847			    replace comma with kComma in pOldName
848			    
849			    local tStackMatch
850			    put pOldName,"stack,expanded" into tStackMatch
851			    
852			    local tStartLine
853			    put lineOffset(tStackMatch,gREVObjectTree) into tStartLine
854			    if tStartLine is 0 then exit revNameChanged
855			    put pNewName into item 6 of line tStartLine of gREVObjectTree
856			    
857			    local tNumLines
858			    put the num of lines in gREVObjectTree into tNumLines
859			    repeat with i = tStartLine to tNumLines
860			      if item 1 of line i of gREVObjectTree is not pOldName then exit repeat
861			      put pNewName into item 1 of line i of gREVObjectTree
862			      put pNewName into item 14 of line i of gREVObjectTree
863			    end repeat
864			    lock screen
865			    revUpdateTree revTreeHtml(gREVObjectTree), tLineID
866			    unlock screen
867			    break
868			  case "card"
869			    local tStack
870			    put the short name of the owner of pObject into tStack
871			    replace comma with kComma in tStack
872			    
873			    local tMatch
874			    put ",#####REVID=",tID,"=#####REVID",tStack into tMatch
875			    
876			    local tOffset
877			    put lineOffset(tMatch,gREVObjectTree) into tOffset
878			    if tOffset is 0 then exit revNameChanged
879			    put pNewName into item 6 of line tOffset of gREVObjectTree
880			    
881			    local tNewHtml
882			    put revTreeHtml(line tOffset of gREVObjectTree) into tNewHtml
883			    
884			    local tHtml
885			    put the htmlText of field "Cards" into tHtml
886			    put tNewHtml into line tOffset of tHtml
887			    lock screen
888			    revUpdateTree tHtml, tLineID
889			    unlock screen
890			    break
891			  default
892	4	0	    set the wholeMatches to true
893	4	0	    put wordOffset("card", pObject) into tOffset
894	4	0	    local tCard
895	4	0	    put word tOffset to -1 of pObject into tCard
896	4	0	    if revTargetStack(pObject) is gREVStackName and the short name of this card is "Cards and Controls" then
897			      local tLine
898			      put revControlLine(tID, gREVControls) into tLine
899			      if tLine is not 0 then
900			        put pNewName into item 5 of line tLine of gREVControls
901			        put pNewName into word 1 to -1 of item 11 of line tLine of gREVControls
902			        put gREVControls into lControlCache[tCard]    
903			        lock screen
904			        revUpdateControlsField true
905			        unlock screen
906			      else put empty into lControlCache[tCard]
907			    else
908			      -- MW-2007-07-02: [[ Bug 4775 ]] Make sure we refresh audio and video clips if a name has changed
909	4	0	      if revTargetStack(pObject) is gREVStackName then
910			        if the short name of this card is "Audioclips" then
911			          send "revRefreshAudio true" to this card of me
912			        else if the short name of this card is "Videoclips" then
913			          send "revRefreshVideo true" to this card of me
914			        end if
915			      end if
916	4	0	      put empty into lControlCache[tCard]
917			    end if
918	4	0	    break
919			  end switch
920	4	0	end revNameChanged

button "utilityBackscript" of group "behaviorGrp" of card "signIn" of stack "/Users/jgay/Clients/B - Thinking Strings/Friendship Press/Word at Hand/FPMobile.livecode"
		0	isMobile
105	8	0	function isMobile
106	8	0	  return the environment = "mobile"
107	8	0	end isMobile

button "utilityBackscript" of group "behaviorGrp" of card "signIn" of stack "/Users/jgay/Clients/B - Thinking Strings/Friendship Press/Word at Hand/FPMobile.livecode"
		0	dev
91	16	0	function dev
92	16	0	  return the environment = "development"
93	16	0	end dev

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/script editor/behaviors/revsestackbehavior.livecodescript"
		0	revSEGetTargetObjects
98	8	0	command revSEGetTargetObjects
99	8	0	   local tObjects
100	8	0	   send "listTabs" to group "Script Tabs" of me
101	8	0	   put the result into tObjects
102	8	0	   return tObjects
103	8	0	end revSEGetTargetObjects

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/message box/behaviors/revmessageboxsinglelinecardbehavior.livecodescript"
		0	resizeStack
37	8	0	on resizeStack
38	8	0	   layoutCard
39			   # AL-2015-04-17: [[ Bug 15227 ]] Pass resizeStack so it is handled by the palette behavior
40	8	0	   pass resizeStack
41	8	0	end resizeStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidemessagehandlerlibrary.livecodescript"
		0	deleteImage
205	4	0	on deleteImage
206	4	0	   local tTarget
207	4	0	   put the long id of the target into tTarget
208	4	0	   if not revIDEObjectIsOnIDEStack(tTarget) then
209	4	0	      send "ideMessageSend ideControlDeleted","tTarget" to stack "revIDELibrary" in 0 milliseconds
210			   end if
211	4	0	   pass deleteImage
212	4	0	end deleteImage

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revfrontscriptlibrary.livecodescript"
		0	nameChanged
46	4	0	on nameChanged pOldname, pNewName, pTarget
47	4	0	   global gREVMessageDispatch, gREVStackName
48			   
49	4	0	   if revTargetStack(the target) is "answer dialog" then pass nameChanged
50			   
51	4	0	   local tTarget
52	4	0	   lock screen
53	4	0	   if pTarget is not empty then put pTarget into tTarget
54	4	0	   else put the long id of the target into tTarget
55	4	0	   if word 1 of tTarget is "stack"
56			   then replace comma with "_" in pNewName--engine seems to do this
57			   
58	4	0	   local tPalettes
59	4	0	   put revPalettesList() into tPalettes
60	4	0	   set the wholeMatches to true
61			   
62	4	0	   local tLinkedObjects
63	4	0	   repeat for each line l in tPalettes
64			      if word 1 of tTarget is "stack" and the cREVLinked of stack l is not empty then
65			         put empty into tLinkedObjects
66			         local tObject, tSkip
67			         repeat for each line m in the cREVLinked of stack l
68			            put m into tObject
69			            put 0 into tSkip
70			            local tWordOffset, tStackOffset, tStackName
71			            repeat 2 times
72			               put wordOffset("stack", tObject, tSkip) into tWordOffset
73			               if tWordOffset = 0 then exit repeat
74			               add tSkip to tWordOffset
75			               add tWordOffset to tSkip
76			               put tWordOffset + 1 into tStackOffset
77			               put char 2 to -2 of word tStackOffset of tObject into tStackName
78			               if tStackName is pOldName then
79			                  put quote&pNewName&quote into word tStackOffset of tObject
80			                  exit repeat
81			               end if
82			            end repeat
83			            put tObject & cr after tLinkedObjects
84			         end repeat
85			         delete last char of tLinkedObjects
86			         set the cREVLinked of stack l to tLinkedObjects
87			      end if
88			      
89			      local tObjects
90			      if the cREVLinked of stack l is not empty
91			      then put the cREVLinked of stack l into tObjects
92			      else put (the selobj) into tObjects
93			      
94			      # LG-2008-03-17
95			      # Bug 6092
96			      # It is possible that the object tObjects refers to may have been
97			      # deleted if messages are locked.
98			      if tObjects is empty or there is a tObjects then                  # LG 2008-08-13, Bug 6694
99			         set the title of stack l to revPaletteTitle(tObjects)
100			         send "revUpdatePalette" to this cd of stack l
101			      end if
102			   end repeat
103			   
104			   # OK-2008-03-11 : Update the script editor so that the object's new name is displayed.
105	4	0	   put the long id of the target into tTarget
106	4	0	   send "revSEObjectNameChanged tTarget, pOldName, pNewName" to revScriptEditorMain()
107			   
108	4	0	   if pNewName is empty and word 1 of tTarget is "stack" then
109			      lock messages
110			      set the name of tTarget to pOldName
111			      put pOldName into pNewName
112			      unlock messages
113			   end if
114			   
115	4	0	   repeat for each line l in gREVMessageDispatch["revNameChanged"]
116			      send "revNameChanged pNewName, pOldName" to this cd of stack l
117			   end repeat
118			   
119			   --if name is empty need to match id
120	4	0	   if pOldName is empty
121	4	0	   then put word 1 to 3 of tTarget into pOldName
122			   
123			   --update Application Overview global variables/custom properties with new name
124	4	0	   if word 1 of tTarget is "stack" and pOldName is gREVStackName then
125			      --stack name has changed
126			      put pNewName into gREVStackName
127			   end if
128			   
129	4	0	   local tTargetStack
130	4	0	   put revTargetStack(tTarget) into tTargetStack
131			   
132	4	0	   local tHCAddressing
133	4	0	   put the hcAddressing of stack tTargetStack into tHCAddressing
134	4	0	   set the hcAddressing of stack tTargetStack to false
135			   
136	4	0	   if there is a stack "revApplicationOverview" then
137	4	0	      send "revNameChanged the long id of tTarget, pOldName, pNewName" to stack "revApplicationOverview"
138			   end if
139			   
140	4	0	   set the hcAddressing of stack tTargetStack to tHCAddressing
141			   
142	4	0	   revSetActiveStacks
143	4	0	   unlock screen
144	8	0	   if not gREVSuppressMessages or (gREVSuppressMessages and revOKTarget()) then pass nameChanged
145	4	0	end nameChanged

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revfrontscriptlibrary.livecodescript"
		0	revSetActiveStacks
227	4	0	on revSetActiveStacks
228	4	0	   ideMessageSend "ideActiveStacksChanged"
229	4	0	end revSetActiveStacks

button "GreyTranspa_after" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	mouseUp
44	1	0	on mouseUp
45	1	0	   getParams
46	1	0	   preProcess
47			   
48	1	0	   turnToGrayTranspa arrParams["sourceName"], arrParams["destName"], arrParams["w"], arrParams["h"], arrParams["xRed"], arrParams["xGreen"], arrParams["xBlue"], arrParams["brightness"], arrParams["contrast"], arrParams["invert"] 
49			   
50	1	0	   postProcess
51	1	0	end mouseUp

button "GreyTranspa_after" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	addToLog
137	6	0	on addToLog @log, str
138	6	0	   put str & return after log
139	6	0	end addToLog

button "GreyTranspa_after" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	getParams
20	1	0	on getParams
21	1	0	   put "Pix" into arrParams["sourceName"]
22	1	0	   put "PixEnd" into arrParams["destName"]
23	1	0	   put the hilite of btn "ChkInvert" into arrParams["invert"] -- négatif
24	1	0	   get the thumbPos of scrollbar "SliderLighten" -- de 0 (aucun éclaircissement) à 10 (éclaircissement maxi)
25	1	0	   put round(it * 200 / 10) into arrParams["brightness"] -- de 0 à 200
26	1	0	   get the thumbPos of scrollbar "SliderContrast" -- de 0 (aucune modif) à 10 (contraste maxi)
27	1	0	   put it / 10 into arrParams["contrast"] -- de 0 à 1
28			   
29	1	0	   put 0.30 into arrParams["xRed"] -- augmenter pour éclaircir les rouges (avec total = 1)
30	1	0	   put 0.59 into arrParams["xGreen"] -- augmenter pour éclaircir les verts (avec total = 1)
31	1	0	   put 0.11 into arrParams["xBlue"] -- augmenter pour éclaircir les bleus (avec total = 1)
32			   
33	1	0	   put the width of image arrParams["sourceName"] into arrParams["w"]
34	1	0	   put the height of image arrParams["sourceName"] into arrParams["h"]
35	1	0	end getParams

button "layoutFrontscript" of group "behaviorGrp" of card "signIn" of stack "/Users/jgay/Clients/B - Thinking Strings/Friendship Press/Word at Hand/FPMobile.livecode"
		0	setCardCoords
745	8	0	command setCardCoords pForceOrientation
746			  -- pForceOrientation - orientation to force, only considers first letter
747	8	0	  local tCard, tHeight
748			  
749	8	0	  if dev() then
750	8	0	    get the short name of this stack
751	8	0	    if it is not "FPMobile" then
752	8	0	      exit setCardCoords
753			    end if
754			  end if
755			  
756			  put the long id of this card into tCard
757			  put the rect of tCard into sCardRect
758			  put item 3 of sCardRect into sCardWidth
759			  put item 4 of sCardRect into sCardHeight
760			  if pForceOrientation begins with "p" then
761			    if sCardWidth > sCardHeight then
762			      put sCardWidth into tHeight
763			      put sCardHeight into sCardWidth
764			      put tHeight into sCardHeight
765			      put (0,0,sCardWidth,sCardHeight) into sCardRect
766			    end if
767			  else if pForceOrientation begins with "l" then
768			    if sCardWidth < sCardHeight then
769			      put sCardWidth into tHeight
770			      put sCardHeight into sCardWidth
771			      put tHeight into sCardHeight
772			      put (0,0,sCardWidth,sCardHeight) into sCardRect
773			    end if
774			  end if
775			  put trunc(sCardWidth/2) into sHorizCenter
776			  put trunc(sCardHeight/2) into sVertCenter
777			  put (sHorizCenter,sVertCenter) into sCardLoc
778			  
779			  put safeMargins(pForceOrientation) into sMargins
780			  put sCardHeight-sMargins["top"]-sMargins["bottom"] into sSafeHeight
781			  put sCardWidth-2*sMargins["side"] into sSafeWidth
782			  put sMargins["side"] + trunc(sSafeWidth/2) into sSafeHorizCenter
783			  put sMargins["top"] + trunc(sSafeHeight/2) into sSafeVertCenter
784			  put (sSafeHorizCenter,sSafeVertCenter) into sSafeLoc
785			  put (sMargins["side"], sMargins["top"], sCardWidth-sMargins["side"], \
786			        sCardHeight-sMargins["bottom"]) into sSafeRect
787			  -- log sCardRect
788	8	0	end setCardCoords

button "layoutFrontscript" of group "behaviorGrp" of card "signIn" of stack "/Users/jgay/Clients/B - Thinking Strings/Friendship Press/Word at Hand/FPMobile.livecode"
		0	resizeStack
30	8	0	on resizeStack pNewW, pNewH
31	8	0	  setCardCoords
32	8	0	  if isMobile() then
33			    wait 0 -- avoid bug where mobile player is not positioned correctly on Android
34			  end if
35	8	0	  updateLayout
36	8	0	  pass resizeStack
37	8	0	end resizeStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revinitialisationlibrary.livecodescript"
		0	revInternal__ListLoadedLibraries
116	16	0	function revInternal__ListLoadedLibraries
117	16	0	   local tLibs
118	16	0	   put the keys of sLoadedLibraries into tLibs
119	16	0	   sort tLibs
120	16	0	   return tLibs
121	16	0	end revInternal__ListLoadedLibraries

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/script editor/behaviors/revseutilities.livecodescript"
		0	seObjectIsContainer
898	48	0	function seObjectIsContainer pObject
899			--   local tObject
900			--   put revRuggedId(pObject) into tObject
901			   
902	48	0	   switch word 1 of pObject
903			      case "stack"
904			         return true
905			      break
906			      case "card"
907			         return true
908			      break
909			      case "group"
910			         return true
911			      break
912			      default
913	48	0	         return false
914			   end switch
915	48	0	end seObjectIsContainer

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/script editor/behaviors/revseutilities.livecodescript"
		0	revSEObjectDeleted
172	4	0	command revSEObjectDeleted pObject
173	4	0	   local tObject
174	4	0	   put revRuggedId(pObject) into tObject
175			   
176	4	0	   local tEditors
177	4	0	   put listAffectedEditors(tObject) into tEditors
178			   
179	4	0	   local tTargetObjects
180	4	0	   repeat for each line tEditor in tEditors
181			      send "revSEGetTargetObjects" to tEditor
182			      put the result into tTargetObjects
183			      
184			      repeat for each line tTargetObject in tTargetObjects
185			         if tTargetObject is tObject or seRuggedObjectContainsObject(tObject, tTargetObject) then
186			            send "revSERemoveTargetObject tTargetObject, true" to tEditor
187			         end if
188			      end repeat
189			   end repeat
190	4	0	end revSEObjectDeleted

button "GreyTranspa_switch" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	mouseUp
44	1	0	on mouseUp
45	1	0	   getParams
46	1	0	   preProcess
47			   
48	1	0	   turnToGrayTranspa arrParams["sourceName"], arrParams["destName"], arrParams["w"], arrParams["h"], arrParams["xRed"], arrParams["xGreen"], arrParams["xBlue"], arrParams["brightness"], arrParams["contrast"], arrParams["invert"] 
49			   
50	1	0	   postProcess
51	1	0	end mouseUp

button "GreyTranspa_switch" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	addToLog
123	6	0	on addToLog @log, str
124	6	0	   put str & return after log
125	6	0	end addToLog

button "GreyTranspa_switch" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	getParams
20	1	0	on getParams
21	1	0	   put "Pix" into arrParams["sourceName"]
22	1	0	   put "PixEnd" into arrParams["destName"]
23	1	0	   put the hilite of btn "ChkInvert" into arrParams["invert"] -- négatif
24	1	0	   get the thumbPos of scrollbar "SliderLighten" -- de 0 (aucun éclaircissement) à 10 (éclaircissement maxi)
25	1	0	   put round(it * 200 / 10) into arrParams["brightness"] -- de 0 à 200
26	1	0	   get the thumbPos of scrollbar "SliderContrast" -- de 0 (aucune modif) à 10 (contraste maxi)
27	1	0	   put it / 10 into arrParams["contrast"] -- de 0 à 1
28			   
29	1	0	   put 0.30 into arrParams["xRed"] -- augmenter pour éclaircir les rouges (avec total = 1)
30	1	0	   put 0.59 into arrParams["xGreen"] -- augmenter pour éclaircir les verts (avec total = 1)
31	1	0	   put 0.11 into arrParams["xBlue"] -- augmenter pour éclaircir les bleus (avec total = 1)
32			   
33	1	0	   put the width of image arrParams["sourceName"] into arrParams["w"]
34	1	0	   put the height of image arrParams["sourceName"] into arrParams["h"]
35	1	0	end getParams

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/message box/behaviors/revmessageboxbehavior.livecodescript"
		0	__UpdateIntelligenceDisplay
649	4	0	private command __UpdateIntelligenceDisplay
650	4	0	   lock screen
651	4	0	   local tIntelligence
652	4	0	   put revIDEGetPreference("ideMessageBox_intelligenceobject") into tIntelligence
653	4	0	   lock messages
654	4	0	   try
655	4	0	      do "get the long id of the" && tIntelligence
656			   catch tError
657			   end try
658	4	0	   global gRevDevelopment
659	4	0	   if it is empty or it begins with "stack" or \
660			         (not gRevDevelopment and revIDEObjectIsOnIDEStack(it)) then
661	4	0	      local tCard
662	4	0	      put the short name of this card of me into tCard
663	4	0	      if tCard is "Single Line" or tCard is "Multiple Lines" then
664	4	0	         revIDESetActiveStack
665			      end if
666			   else
667			      local tControl
668			      put the name of it into tControl
669			      set the label of button "Open Stacks" of group "Stacks" of card "Single Line" of me to tIntelligence & ": " & tControl
670			      enable button "Open Stacks" of group "Stacks" of card "Single Line" of me
671			   end if
672	4	0	   positionOpenStacksButton
673	4	0	   unlock messages
674	4	0	   unlock screen
675	4	0	end __UpdateIntelligenceDisplay

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/message box/behaviors/revmessageboxbehavior.livecodescript"
		0	preferenceChanged
425	4	0	on preferenceChanged pPreference, pValue
426	4	0	   lock screen
427	4	0	   switch pPreference
428			      case "ideMessageBox_autoupdate"
429			         local tOldValue
430			         put revIDEGetPreference(pPreference) into tOldValue
431			         revIDESetPreference pPreference, not(tOldValue)
432			         revIDEPendingMessagesRefresh
433			         break
434			      case "ideMessageBox_intelligenceobject"
435			         revIDESetPreference pPreference, pValue
436			         revIDEUpdateIntelligenceObject
437			         break
438			   end switch
439	4	0	   unlock screen
440	4	0	end preferenceChanged 

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/message box/behaviors/revmessageboxbehavior.livecodescript"
		0	ideActiveStacksChanged
701	4	0	on ideActiveStacksChanged
702	4	0	   __UpdateIntelligenceDisplay
703	4	0	end ideActiveStacksChanged

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revgeometrylibrary.livecodescript"
		0	revCheckGeoDefaultStack
924	8	0	on revCheckGeoDefaultStack
925	8	0	   local tDefaultStack
926	8	0	   put revTargetStack() into tDefaultStack
927	8	0	   if word 1 of tDefaultStack is "revPropertyInspector" then
928			      if the cSelectedObjects of stack tDefaultStack is not empty then 
929			         set the defaultStack to revIDEStackOfObject(line 1 of the cSelectedObjects of stack tDefaultStack)
930			      else 
931			         set the defaultStack to the topStack
932			      end if
933			   end if
934	8	0	end revCheckGeoDefaultStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/home.livecodescript"
		0	revEnvironmentEditionProperty
1868	16	0	function revEnvironmentEditionProperty pProp, pEdition
1869	16	0	   if pEdition is empty then
1870	16	0	      put the editionType into pEdition
1871			   end if
1872			   
1873	16	0	   if pProp is "skin" then
1874			      return revEnvironmentToolsetPath() & "/resources/" & pEdition & "/ideSkin"
1875			   end if
1876			   
1877	16	0	   switch pEdition
1878			      case "community"
1879			         switch pProp
1880			            case "name"
1881			               return "Community"
1882			            case "color"
1883			               return 173,208,54
1884			            case "pb_line_selected_color"
1885			               return 226,238,185
1886			            case "revonline_hilite_color"
1887			               return 156,199,45
1888			            case "revabout_hilite_color"
1889			               return 106,139,15
1890			            case "revsplash_text_color"
1891			               return 0,0,0
1892			            case "start_center_tile_color_step"
1893			               return -9
1894			            case "password_protection"
1895			               return false
1896			            case "open_source_required"
1897			               return true
1898			            case "splash_strap"
1899			               return empty
1900			            case "upgrade_mini_url"
1901			               return "https://livecode.com/products/community-plus-ide-2/"
1902			            case "upgrade_url"
1903			               return "https://livecode.com/products/community-plus-ide/"  
1904			            case "upgrade_edition"
1905			               return "communityplus"
1906			            case "edition_external_url"
1907			               return "https://livecode.com/products/community-edition/"
1908			            case "autocomplete"
1909			            case "autocomplete_pro"
1910			               return false
1911			            case "script_profiler"
1912			               return false
1913			         end switch
1914			         break
1915			      case "communityplus"
1916			         switch pProp
1917			            case "name"
1918			               return "Community Plus"
1919			            case "color"
1920			               return 49,163,102
1921			            case "pb_line_selected_color"
1922			               return 226,238,185
1923			            case "revonline_hilite_color"
1924			               return 49,163,102
1925			            case "revabout_hilite_color"
1926			               return 49,163,102
1927			            case "revsplash_text_color"
1928			               return 0,0,0
1929			            case "start_center_tile_color_step"
1930			               return -9
1931			            case "password_protection"
1932			               return false
1933			            case "open_source_required"
1934			               return true
1935			            case "splash_strap"
1936			               return empty
1937			            case "upgrade_mini_url"
1938			               return empty
1939			            case "upgrade_url"
1940			               return empty
1941			            case "upgrade_edition"
1942			               return "commercial"
1943			            case "edition_external_url"
1944			               return "https://livecode.com/products/community-plus-edition/"
1945			            case "autocomplete"
1946			               return true
1947			            case "autocomplete_pro"
1948			               return false
1949			            case "script_profiler"
1950			               return false
1951			         end switch
1952			         break
1953			      case "indy"
1954			      case "commercial"
1955			         switch pProp
1956			            case "name"
1957			               return "Indy"
1958			            case "color"
1959			               return 28,154,206
1960			            case "pb_line_selected_color"
1961			               return 222,243,255
1962			            case "revonline_hilite_color"
1963			               return 124,193,222
1964			            case "revabout_hilite_color"
1965			               return 44,113,170
1966			            case "revsplash_text_color"
1967			               return 0,0,0
1968			            case "start_center_tile_color_step"
1969			               return 0
1970			            case "password_protection"
1971			               return true
1972			            case "open_source_required"
1973			               return false
1974			            case "splash_strap"
1975			               if revLicenseInfo["com.livecode.norevenuelimit"] is not empty then
1976			                  return empty
1977			               else
1978			                  return "<p>This Indy license is only valid for organizations with annual revenues of $500,000 USD or less</p>"
1979			               end if
1980			            case "upgrade_mini_url"
1981			               return empty
1982			            case "upgrade_url"
1983			               return empty
1984			            case "upgrade_edition"
1985			               return "professional"
1986			            case "edition_external_url"
1987			               return "https://livecode.com/products/indy-edition/"
1988			            case "autocomplete"
1989			            case "autocomplete_pro"
1990			               return true
1991			            case "script_profiler"
1992			               return false
1993			         end switch
1994			         break
1995			      case "business"
1996			      case "professional"
1997	16	0	         switch pProp
1998			            case "name"
1999			               return "Business"
2000			            case "color"
2001	16	0	               return 82,82,82
2002			            case "pb_line_selected_color"
2003			               return 222,243,255
2004			            case "revonline_hilite_color"
2005			               return 124,193,222
2006			            case "revabout_hilite_color"
2007			               return 44,113,170
2008			            case "revsplash_text_color"
2009			               return 255,255,255
2010			            case "start_center_tile_color_step"
2011			               return 0
2012			            case "password_protection"
2013			               return true
2014			            case "open_source_required"
2015			               return false
2016			            case "splash_strap"
2017			               return empty
2018			            case "upgrade_mini_url"
2019			               return empty
2020			            case "upgrade_url"
2021			               return empty
2022			            case "upgrade_edition"
2023			               return empty
2024			            case "edition_external_url"
2025			               return "https://livecode.com/products/business-edition/"
2026			            case "autocomplete"
2027			            case "autocomplete_pro"
2028			               return true
2029			            case "script_profiler"
2030			               return true
2031			         end switch
2032			         break
2033			   end switch
2034			   
2035			   throw "Unknown edition property"
2036	16	0	end revEnvironmentEditionProperty

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		0	revIDEStackNameIsIDEStack
4768	16	0	function revIDEStackNameIsIDEStack pStackName
4769			   -- call revStackNameIsIDEStack in revcommonlibrary
4770	16	0	   return revStackNameIsIDEStack(pStackName)
4771	16	0	end revIDEStackNameIsIDEStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		0	revIDEMessageIsValid
1542	4	0	private function revIDEMessageIsValid pMessage
1543	4	0	   return true
1544			   return (pMessage is among the items of revIDEMessages() \
1545			         or pMessage begins with "idePreferenceChanged" \
1546			         or pMessage begins with "ideInspectObjects" \
1547			         or pMessage begins with "ideToggleChanged")
1548	4	0	end revIDEMessageIsValid

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		0	ideMessageSend
1648	4	0	on ideMessageSend pMessage, pParam
1649	4	0	   local tParam
1650	4	0	   if pParam is not empty then
1651			      put pParam into tParam[1]
1652			   end if
1653	4	0	   ideMessageSendWithParameters pMessage, the long id of the target, tParam
1654	4	0	end ideMessageSend

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		0	revIDESelectedObjects
3034	4	0	function revIDESelectedObjects
3035	4	0	   local tSelobj
3036	4	0	   put the selobj into tSelobj
3037	4	0	   switch
3038			      case the cREVLinked of this stack is not empty
3039			         return the cREVLinked of this stack
3040			         break
3041			      case tSelobj is empty
3042	4	0	         if the mode of the topStack is 1
3043	4	0	         then return the long name of the topStack
3044			         else return empty
3045			         break
3046			      default
3047			         return tSelobj
3048			         break
3049			   end switch
3050	4	0	end revIDESelectedObjects

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		0	revIDETutorialInProgress
10308	4	0	function revIDETutorialInProgress
10309	4	0	   return sTutorialInfo
10310	4	0	end revIDETutorialInProgress

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		0	ideMainStackOfObject
2593	12	0	function ideMainStackOfObject pLongID
2594	12	0	   local tStack
2595	12	0	   put ideStackOfObject(pLongID) into tStack
2596	12	0	   if word 4 of tStack is "stack" then
2597			      put ideMainStackOfObject(word 4 to -1 of tStack) into tStack
2598			   end if
2599	12	0	   return tStack
2600	12	0	end ideMainStackOfObject

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revidelibrary.8.livecodescript"
		0	revIDEObjectIsOnIDEStack
4717	12	0	function revIDEObjectIsOnIDEStack pLongID
4718	12	0	   if not exists(pLongID) then return false
4719			   
4720	12	0	   local tMainStack
4721	12	0	   put ideMainStackOfObject(pLongID) into tMainStack
4722			   
4723	12	0	   return revIDEStackIsIDEStack(tMainStack)
4724	12	0	end revIDEObjectIsOnIDEStack

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revcommonlibrary.livecodescript"
		0	cREVGeneral
173	4	0	setProp cREVGeneral[pWhichProp] pWhichProfile
174	4	0	   local tTarget
175	4	0	   put the long id of the target into tTarget
176			   
177	4	0	   if pWhichProp is not "profile" and pWhichProp is not "inLineImages" and \
178			         pWhichProp is not "virtualWidth" and pWhichProp is not "virtualHeight" \
179	4	0	         then pass cREVGeneral
180			   
181			   if pWhichProp is "virtualWidth" then
182			      lock messages
183			      local tOriginalWidth
184			      put the cREVGeneral["virtualWidth"] of tTarget into tOriginalWidth
185			      set the cREVGeneral["virtualWidth"] of tTarget to pWhichProfile
186			      
187			      local tDifference
188			      put tOriginalWidth - pWhichProfile into tDifference
189			      
190			      local tRect
191			      put the rect of stack revTargetStack() into tRect
192			      put item 3 of tRect + tDifference into item 3 of tRect
193			      set the rect of stack revtargetStack() to tRect
194			      unlock messages
195			      exit cREVGeneral
196			   end if
197			   
198			   if pWhichProp is "virtualHeight" then
199			      lock messages
200			      local tOriginalHeight
201			      put the cREVGeneral["virtualHeight"] of tTarget into tOriginalHeight
202			      set the cREVGeneral["virtualHeight"] of tTarget to pWhichProfile
203			      put tOriginalHeight - pWhichProfile into tDifference
204			      put the rect of stack revTargetStack() into tRect
205			      put item 4 of tRect + tDifference into item 4 of tRect
206			      set the rect of stack revtargetStack() to tRect
207			      unlock messages
208			      exit cREVGeneral
209			   end if
210			   
211			   if pWhichProp is "inLineImages" then
212			      if pWhichProfile is true then
213			         lock messages
214			         lock screen
215			         set the lockLocation of the templateGroup to true
216			         set the rect of the templateGroup to item 1 to 2 of the rect of tTarget,item 3 of the rect of tTarget-the scrollbarWidth of tTarget,item 4 of the rect of tTarget
217			         set the name of the templateGroup to the short name of tTarget&"images"&the number of this cd
218			         create group
219			         reset the templateGroup
220			         
221			         local tGroupName
222			         put the short name of tTarget & "images"&the number of this cd into tGroupName
223			         --now pad the group so it can scroll
224			         reset the templateGraphic
225			         set the style of the templateGraphic to "line"
226			         set the lineSize of the templateGraphic to 0
227			         set the topLeft of the templateGraphic to the topLeft of tTarget
228			         create grc in group tGroupName
229			         reset the templateGraphic
230			         set the scroll of group tGroupName to 0
231			         set the scroll of tTarget to 0
232			         set the cREVGeneral["preInlineText"&the number of this cd] of tTarget to the text of tTarget
233			         set the itemDel to "/"
234			         
235			         local tSubtract
236			         put 0 into tSubtract
237			         
238			         local tFinalExit
239			         repeat
240			            if tFinalExit then exit repeat
241			            
242			            local tLineCount
243			            put 0 into tLineCount
244			            set the scroll of group tGroupName to 0
245			            set the scroll of tTarget to 0
246			            repeat for each line l in the text of tTarget
247			               put true into tFinalExit
248			               add 1 to tLineCount
249			               if item 2 of l is "*IMAGEFILE*" then
250			                  do "put empty into line tLineCount of" && tTarget
251			                  reset the templateImage
252			                  set the fileName of the templateImage to item 3 to -1 of l
253			                  
254			                  local tFieldName
255			                  put the short name of tTarget into tFieldName
256			                  
257			                  local tTop
258			                  put (the formattedHeight of line 1 to tLineCount of fld tFieldName + the top of tTarget) into tTop
259			                  set the width of the templateImage to the formattedWidth of the templateImage
260			                  
261			                  local tImageHeight
262			                  put the formattedHeight of the templateImage into tImageHeight
263			                  set the height of the templateImage to tImageHeight
264			                  set the lockLoc of the templateImage to true
265			                  set the topLeft of the templateImage to the left of tTarget+8,tTop-tSubtract
266			                  create image in group tGroupName
267			                  
268			                  local tNewLines
269			                  put 0 into tNewLines
270			                  repeat
271			                     add 1 to tNewLines
272			                     put cr after line tLineCount of the target
273			                     if the formattedHeight of line tLineCount to tLineCount+tNewLines of fld tFieldName >= tImageHeight then exit repeat
274			                  end repeat
275			                  put cr after line tLineCount of the target
276			                  put false into tFinalExit
277			                  exit repeat
278			               end if
279			               if item 2 of l is "*IMAGEID*" then
280			                  do "put empty into line tLineCount of" && tTarget
281			                  reset the templateButton
282			                  set the showName of the templateButton to false
283			                  set the showBorder of the templateButton to false
284			                  set the traversalOn of the templateButton to false
285			                  set the autoHilite of the templateButton to false
286			                  set icon of the templateButton to item 3 to -1 of l
287			                  put the short name of tTarget into tFieldName
288			                  put (the formattedHeight of line 1 to tLineCount of fld tFieldName + the top of tTarget) into tTop
289			                  set the width of the templateButton to the formattedWidth of the templateButton
290			                  put the formattedHeight of the templateButton into tImageHeight
291			                  set the height of the templateButton to tImageHeight
292			                  set the lockLoc of the templateButton to true
293			                  set the topLeft of the templateButton to the left of tTarget+8,tTop-tSubtract
294			                  create button in group tGroupName
295			                  put 0 into tNewLines
296			                  repeat
297			                     add 1 to tNewLines
298			                     put cr after line tLineCount of the target
299			                     if the formattedHeight of line tLineCount to tLineCount+tNewLines of fld tFieldName >= tImageHeight then exit repeat
300			                  end repeat
301			                  put cr after line tLineCount of the target
302			                  put false into tFinalExit
303			                  exit repeat
304			               end if
305			            end repeat
306			            put 30 into tSubtract
307			         end repeat
308			         reset the templateButton
309			         reset the templateImage
310			         --now pad the group so it can scroll
311			         
312			         local tFieldHeight
313			         put the formattedHeight of fld tFieldName into tFieldHeight
314			         reset the templateGraphic
315			         set the style of the templateGraphic to "line"
316			         set the lineSize of the templateGraphic to 0
317			         set the topLeft of the templateGraphic to the left of tTarget,tFieldHeight+the top of tTarget
318			         create grc in group tGroupName
319			         reset the templateGraphic
320			         set the scroll of group tGroupName to 0
321			         set the scroll of the target to 0
322			         unlock screen
323			         unlock messages
324			      else
325			         delete group (the short name of tTarget&"images"&the number of this cd)
326			         set the text of tTarget to the cREVGeneral["preInlineText"&the number of this cd] of tTarget
327			         set the cREVGeneral["preInlineText"&the number of this cd] of tTarget to empty
328			      end if
329			      set the cREVGEneral["inLineImages"&the number of this cd] of tTarget to pWhichProfile
330			      exit cREVGeneral
331			   end if --inLineImages
332			   
333			   -- pWhichProp is "profile"
334			   global gREVProfileReadOnly, gREVAutoCreateProfiles
335			   lock screen
336			   lock messages
337			   
338			   local tReturnSet
339			   put the customPropertySet of tTarget into tReturnSet
340			   set the cREVGeometryCache["order"] of this card to empty
341			   if the customkeys["cRevGeometry"] of tTarget is not empty then
342			      if "revUpdateGeometry" is in the pendingMessages then 
343			         cancel item 1 of line (lineOffset("revUpdateGeometry",the pendingMessages)) of the pendingMessages
344			      end if
345			      send "revUpdateGeometry" to stack revTargetStack(tTarget) in 250 milliseconds -- update geometry
346			   end if
347			   if pWhichProfile is not empty and pWhichprofile is not "master" and pWhichProfile is not the cREVGeneral["masterName"] of tTarget and pWhichProfile is not among the lines of the cREVGeneral["profileList"] of tTarget then
348			      if gREVAutoCreateProfiles then revNewProfile pWhichProfile, tTarget
349			      unlock screen
350			      unlock messages
351			      exit cREVGeneral
352			   end if
353			   if the cREVGeneral["profile"] of tTarget is "Master" or the cREVGeneral["profile"] of tTarget is empty or the cREVGeneral["profile"] of tTarget is the cREVGeneral["masterName"] of tTarget then
354			      --its in master, going out
355			      if not gREVProfileReadOnly then
356			         set the customPropertySet of tTarget to "cREVTempMaster"
357			         
358			         local tTempArray
359			         put the properties of tTarget into tTempArray
360			         set the customProperties of tTarget to tTempArray
361			      end if
362			   else
363			      --its another profile, going into or through master
364			      set the customPropertySet of tTarget to "cREVMaster"
365			      
366			      local tCurrentMasterArray
367			      if the customKeys["cREVMaster"] of tTarget is not empty then put the customProperties of tTarget into tCurrentMasterArray
368			      if not gREVProfileReadOnly then
369			         set the customPropertySet of tTarget to "cREVTempMaster"
370			         
371			         local tTempMasterArray
372			         put the customProperties of tTarget into tTempMasterArray
373			         
374			         local tCurrentPropertiesArray
375			         put the properties of tTarget into tCurrentPropertiesArray
376			         --compare the temporary master with the current properties
377			         --any changes:
378			         --the original tempMaster value gets added to the current master array
379			         --and the new value gets created in the current profile array
380			         
381			         local tCurrentPropertyKeys
382			         put keys(tCurrentPropertiesArray) into tCurrentPropertyKeys
383			         set the caseSensitive to true
384			         repeat for each line l in tCurrentPropertyKeys
385			            if tTempMasterArray[l] is not tCurrentPropertiesArray[l] then
386			               put tTempMasterArray[l] into tCurrentMasterArray[l]
387			               
388			               local tProfileArray
389			               put tCurrentPropertiesArray[l] into tProfileArray[l]
390			            end if
391			         end repeat
392			         --transfer the current profile array to the object
393			         set the customPropertySet of tTarget to "cREVDiverged" & the cREVGeneral["profile"] of tTarget
394			         set the customProperties of tTarget to tProfileArray
395			         --now transfer the current master array to the master profile
396			         set the customPropertySet of tTarget to "cREVMaster"
397			         set the customProperties of tTarget to tCurrentMasterArray
398			      end if
399			      
400			      # MW-2010-10-14: [[ Bug 9060 ]] In 4.5 the 'id' property of objects became mutable - we never
401			      #    want to set this property as part of a profile, so make sure its never in the array.
402			      delete variable tCurrentMasterArray["id"]
403			      set the properties of tTarget to tCurrentMasterArray
404			      set the cREVGeneral["profile"] of tTarget to "Master"
405			   end if
406			   if pWhichProfile is not empty and pWhichProfile is not "master" and pWhichProfile is not the cREVGeneral["masterName"] of tTarget then
407			      set the cREVGeneral["profile"] of tTarget to pWhichProfile
408			      set the customPropertySet of tTarget to "cREVDiverged"&pWhichProfile
409			      
410			      local tTempArray1
411			      if the customKeys of tTarget is not empty then put the customProperties of tTarget into tTempArray1
412			      
413			      # MW-2010-10-14: [[ Bug 9060 ]] In 4.5 the 'id' property of objects became mutable - we never
414			      #    want to set this property as part of a profile, so make sure its never in the array.
415			      delete variable tTempArray1["id"]
416			      set the properties of tTarget to tTempArray1
417			   end if
418			   set the customPropertySet of tTarget to tReturnSet
419			   unlock screen
420			   unlock messages
421	4	0	end cREVGeneral

button "GreyTranspa_Each" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	mouseUp
44	1	0	on mouseUp
45	1	0	   getParams
46	1	0	   preProcess
47			   
48	1	0	   turnToGrayTranspa arrParams["sourceName"], arrParams["destName"], arrParams["w"], arrParams["h"], arrParams["xRed"], arrParams["xGreen"], arrParams["xBlue"], arrParams["brightness"], arrParams["contrast"], arrParams["invert"] 
49			   
50	1	0	   postProcess
51	1	0	end mouseUp

button "GreyTranspa_Each" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	addToLog
113	6	0	on addToLog @log, str
114	6	0	   put str & return after log
115	6	0	end addToLog

button "GreyTranspa_Each" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	getParams
20	1	0	on getParams
21	1	0	   put "Pix" into arrParams["sourceName"]
22	1	0	   put "PixEnd" into arrParams["destName"]
23	1	0	   put the hilite of btn "ChkInvert" into arrParams["invert"] -- négatif
24	1	0	   get the thumbPos of scrollbar "SliderLighten" -- de 0 (aucun éclaircissement) à 10 (éclaircissement maxi)
25	1	0	   put round(it * 200 / 10) into arrParams["brightness"] -- de 0 à 200
26	1	0	   get the thumbPos of scrollbar "SliderContrast" -- de 0 (aucune modif) à 10 (contraste maxi)
27	1	0	   put it / 10 into arrParams["contrast"] -- de 0 à 1
28			   
29	1	0	   put 0.30 into arrParams["xRed"] -- augmenter pour éclaircir les rouges (avec total = 1)
30	1	0	   put 0.59 into arrParams["xGreen"] -- augmenter pour éclaircir les verts (avec total = 1)
31	1	0	   put 0.11 into arrParams["xBlue"] -- augmenter pour éclaircir les bleus (avec total = 1)
32			   
33	1	0	   put the width of image arrParams["sourceName"] into arrParams["w"]
34	1	0	   put the height of image arrParams["sourceName"] into arrParams["h"]
35	1	0	end getParams

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/script editor/behaviors/revsescripttabsbehavior.livecodescript"
		0	listTabs
495	8	0	command listTabs
496	8	0	   local tList
497	56	0	   repeat for each key tKey in sTabMap
498	48	0	      put sTabMap[tKey] & return after tList
499			   end repeat
500	8	0	   delete the last char of tList
501	8	0	   return tList
502	8	0	end listTabs

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript"
		0	ideActiveStacksChanged
276	4	0	on ideActiveStacksChanged
277	4	0	   updateButtonState
278	4	0	end ideActiveStacksChanged

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		0	addFrameItem
37	16	0	on addFrameItem pName, pLocation, pItemType, pLabel, pIcon, pIconSelected, pCallbackMessage, pCallbackTarget, pParameter
38	32	0	   if __itemExists(pName) then return empty
39			   
40			   local tNewIndex
41			   put the number of elements of sData + 1 into tNewIndex
42			   
43			   switch pItemType
44			      case "preference"
45			         put pName into sData[tNewIndex]["name"]
46			         put pItemType into sData[tNewIndex]["type"]
47			         put pLabel into sData[tNewIndex]["label"]
48			         put pIcon into sData[tNewIndex]["value_type"]
49			         put pIconSelected into sData[tNewIndex]["value"]
50			         put pCallbackTarget into sData[tNewIndex]["target"]
51			         put pCallbackMessage into sData[tNewIndex]["message"]
52			         put pParameter into sData[tNewIndex]["parameter"]
53			         put true into sData[tNewIndex]["enabled"]
54			         put false into sData[tNewIndex]["selected"]
55			         break
56			      default
57			         put pName into sData[tNewIndex]["name"]
58			         put pLocation into sData[tNewIndex]["location"]
59			         put pItemType into sData[tNewIndex]["type"]
60			         put pLabel into sData[tNewIndex]["label"]
61			         put pIcon into sData[tNewIndex]["icon"]
62			         put pIconSelected into sData[tNewIndex]["icon_selected"]
63			         put pCallbackTarget into sData[tNewIndex]["target"]
64			         put pCallbackMessage into sData[tNewIndex]["message"]
65			         put pParameter into sData[tNewIndex]["parameter"]
66			         put true into sData[tNewIndex]["enabled"]
67			         put false into sData[tNewIndex]["selected"]
68			         break
69			   end switch
70	16	0	end addFrameItem

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		0	enableFrameItem
94	8	0	on enableFrameItem pName
95	8	0	   setEnabledOfFrameItem pName, true
96	8	0	end enableFrameItem

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		0	barHeight
376	32	0	function barHeight pSize
377	32	0	   if sHideFrame is true then
378			      return 0
379			   end if
380			   
381	32	0	   switch pSize
382			      case "small"
383			         return 21
384			      case "medium"
385			         return 25
386			      case "largest"
387	32	0	         return 35
388			      case "large"
389			      default
390			         return 30
391			   end switch
392	32	0	end barHeight

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		0	barRight
394	8	0	function barRight pSize
395	8	0	   if there is a widget "header_background" of group "background" of me then
396	8	0	      return the navBarRight of widget "header_background" of group "background" of me
397			   end if
398			   
399			   return 0
400	8	0	end barRight

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/palettes/behaviors/revpalettebehavior.livecodescript"
		0	setEnabledOfFrameItem
98	8	0	command setEnabledOfFrameItem pName, pValue
99	8	0	   local tIndex
100	8	0	   put __frameItemNameToIndex(pName) into tIndex
101	8	0	   if tIndex is not a number then exit setEnabledOfFrameItem
102			   
103	8	0	   lock screen
104	8	0	   lock messages
105	8	0	   put pValue into sData[tIndex]["enabled"] 
106	8	0	   generateFrame
107	8	0	   unlock messages
108	8	0	   unlock screen
109	8	0	end setEnabledOfFrameItem

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		0	revListScriptEditors
1428	8	0	function revListScriptEditors
1429	8	0	   local tStacks
1430	8	0	   put the openStacks into tStacks
1431	8	0	   filter tStacks with kScriptEditorPrefix & "*"
1432			   
1433	8	0	   local tFullStacks
1434	16	0	   repeat for each line tStack in tStacks
1435	8	0	      put the long id of stack tStack & return after tFullStacks
1436			   end repeat
1437	8	0	   delete the last char of tFullStacks
1438			   
1439	8	0	   return tFullStacks
1440	8	0	end revListScriptEditors

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		0	newImage
688	4	0	on newImage
689	4	0	   set the cREVGeneral["revUniqueID"] of the target to the milliseconds
690			   // PM-2015-09-17: [[ Bug 13826 ]] Allow a new image to appear offscreen
691	4	0	   revUpdateAOControls
692	8	0	   if not gREVSuppressMessages or (gREVSuppressMessages and revOKTarget()) then pass newImage
693	4	0	end newImage

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		0	revPalettesList
1633	4	0	function revPalettesList
1634	4	0	   local tPalettes
1635	4	0	   put the openStacks into tPalettes
1636	4	0	   filter tPalettes with "revPropertyPalette*"
1637	4	0	   return tPalettes
1638	4	0	end revPalettesList

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		0	revIDEHandleObjectDeleted
772	4	0	command revIDEHandleObjectDeleted pObject
773			   -- Need to pass the object as the target may have changed.
774	4	0	   revDeleteLinkedObject pObject
775	4	0	   revUpdateAOControls
776	4	0	   revIDEUpdateScriptEditorOnObjectDeletion pObject
777	4	0	end revIDEHandleObjectDeleted

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		0	revLinkedSubControlPalettes
1599	4	0	function revLinkedSubControlPalettes pObjects
1600	4	0	   local tOpenStacks
1601	4	0	   put the openStacks into tOpenStacks
1602	4	0	   filter tOpenStacks with "revPropertyPalette*"
1603			   
1604	4	0	   local tLinkedPalettes
1605	4	0	   put empty into tLinkedPalettes
1606	8	0	   repeat for each line l in pObjects
1607	4	0	      repeat for each line m in tOpenStacks
1608			         if l is in the cREVLinked of stack m and m is not among the lines of tLinkedPalettes 
1609			         then put m & cr after tLinkedPalettes
1610			      end repeat
1611			   end repeat
1612	4	0	   delete last char of tLinkedPalettes
1613	4	0	   return tLinkedPalettes
1614	4	0	end revLinkedSubControlPalettes

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		0	revIDEUpdateScriptEditorOnObjectDeletion
783	4	0	private command revIDEUpdateScriptEditorOnObjectDeletion pObject
784	4	0	   send "revSEObjectDeleted pObject" to revScriptEditorMain()
785	4	0	end revIDEUpdateScriptEditorOnObjectDeletion

stack "/Applications/LiveCode Business 9.6.2.app/Contents/Tools/Toolset/libraries/revbackscriptlibrary.livecodescript"
		0	revDeleteLinkedObject
1262	4	0	on revDeleteLinkedObject pTarget
1263	4	0	   lock screen
1264	4	0	   if pTarget is empty then put the long id of the target into pTarget
1265	4	0	   local tLinkedPalettesList
1266	4	0	   put revLinkedSubControlPalettes(pTarget) into tLinkedPalettesList
1267	4	0	   repeat for each line l in tLinkedPalettesList
1268			      close stack l
1269			   end repeat
1270	4	0	   unlock screen
1271	4	0	end revDeleteLinkedObject

stack "/Users/jgay/Dropbox/Application Support/My LiveCode/Plugins/revapplicationoverview.rev"
		0	revClearControlCache
639	8	0	on revClearControlCache pTarget
640	8	0	  set the wholeMatches to true
641			  
642	8	0	  local tOffset
643	8	0	  put wordOffset("card", pTarget) into tOffset
644			  
645	8	0	  local tID
646	8	0	  put word (tOffset + 2) of pTarget into tID
647	8	0	  if there is a card id tID then -- km patched this
648	8	0	    local tCard
649	8	0	    put the long id of card id tID of stack revTargetStack(pTarget) into tCard
650	8	0	    put empty into lControlCache[tCard]  
651			  end if
652	8	0	end revClearControlCache

stack "/Users/jgay/Dropbox/Application Support/My LiveCode/Plugins/revapplicationoverview.rev"
		0	revSelLineID
1134	4	0	function revSelLineID
1135	4	0	  global gREVObjectTree
1136			  #returns unique string for selected line in tree view, if there is one
1137	4	0	  local tSelLine
1138	4	0	  put the cSelLine of field "Cards" of group "Cards" into tSelLine
1139	4	0	  if tSelLine is not empty
1140	4	0	  then return item 4 to 14 of line tSelLine of gREVObjectTree
1141			  else return empty
1142	4	0	end revSelLineID

button "GreyTranspa" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	mouseUp
44	1	0	on mouseUp
45	1	0	   getParams
46	1	0	   preProcess
47			   
48	1	0	   turnToGrayTranspa arrParams["sourceName"], arrParams["destName"], arrParams["w"], arrParams["h"], arrParams["xRed"], arrParams["xGreen"], arrParams["xBlue"], arrParams["brightness"], arrParams["contrast"], arrParams["invert"] 
49			   
50	1	0	   postProcess
51	1	0	end mouseUp

button "GreyTranspa" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	addToLog
136	6	0	on addToLog @log, str
137	6	0	   put str & return after log
138	6	0	end addToLog

button "GreyTranspa" of card "Main" of stack "/Users/jgay/Desktop/TestImage.livecode"
		0	getParams
20	1	0	on getParams
21	1	0	   put "Pix" into arrParams["sourceName"]
22	1	0	   put "PixEnd" into arrParams["destName"]
23	1	0	   put the hilite of btn "ChkInvert" into arrParams["invert"] -- négatif
24	1	0	   get the thumbPos of scrollbar "SliderLighten" -- de 0 (aucun éclaircissement) à 10 (éclaircissement maxi)
25	1	0	   put round(it * 200 / 10) into arrParams["brightness"] -- de 0 à 200
26	1	0	   get the thumbPos of scrollbar "SliderContrast" -- de 0 (aucune modif) à 10 (contraste maxi)
27	1	0	   put it / 10 into arrParams["contrast"] -- de 0 à 1
28			   
29	1	0	   put 0.30 into arrParams["xRed"] -- augmenter pour éclaircir les rouges (avec total = 1)
30	1	0	   put 0.59 into arrParams["xGreen"] -- augmenter pour éclaircir les verts (avec total = 1)
31	1	0	   put 0.11 into arrParams["xBlue"] -- augmenter pour éclaircir les bleus (avec total = 1)
32			   
33	1	0	   put the width of image arrParams["sourceName"] into arrParams["w"]
34	1	0	   put the height of image arrParams["sourceName"] into arrParams["h"]
35	1	0	end getParams

Total time: 5.409 seconds