As a TD I write a lot of tools for big office. unfortunately, I can not give away most of the Corona based tools as we rely on them comercially. However I think I wrote a little tool that I can share and that would make lives of other TD’s and script people a little bit more easy. It just Listens to whatever all the Corona Properties are doing, so you can simply use the code in your own tools by simply playing around with the properties.
deleteAllChangeHandlers id:#renderSettingsChangeListener
when parameters renderers.current change id:#renderSettingsChangeListener do (
handleRenderSettingsChange()
)
Didn’t test it much, but I hope everyone who’s interested get the idea behind.
(
fn getRenderSettings props = (
for p in props collect getProperty renderers.current p
)
renderPropNames = getPropNames renderers.current
lastRenderSettings = getRenderSettings renderPropNames
deleteAllChangeHandlers id:#rendSettings
global renderSettingsChangeHandler = when parameters renderers.current changes id:#rendSettings val do (
props = getRenderSettings renderPropNames
for i=1 to props.count where props[i] != lastRenderSettings[i] do (
if isKindOf props[i] array do (
if (props[i] as string) == (lastRenderSettings[i] as string) do continue -- and never compare arrays like I do
)
format "%: %\n" renderPropNames[i] props[i]
)
lastRenderSettings = props
)
)
Thanks for the changeHandler idea, Jahman. I would have never thought about this one!
@Christa Noel: havent had a look in there but I am pretty sure that there was something out there already… in the days of the interwebs at least someone had to come up with a similar idea before :-P… in my case I used a similar script for the Deadlines SMTDSettings…