Creating a DIFF for livecode stacks (SOLVED)
Posted: Wed May 27, 2015 9:53 am
Hello,
I'm trying to create a DIFF viewer for livecode stacks. I know lcVCS but it's too complex to install and use for my purpose.
I want just to create an XML that represent the livecode stack, then use diff to compare the XML from 2 different livecode stacks.
I reached a good result with mainstacks, I can analyse a mainstack creating a XML file representing all the stack like this:
My problem is with substacks. If I analyse a remote stack, I can use this code:
no problem, the remote stack is not opened.
But if I try to analyse the substacks, stack is opened and something goes wrong. I noticed that substack are numbered starting from 1, so the first substack is:
So I use this code:
but this way stack remote is opened and reopened may times, a purge request appears continuously and it's a mess.
What is the correct code to analyse properties of substacks?
I'm trying to create a DIFF viewer for livecode stacks. I know lcVCS but it's too complex to install and use for my purpose.
I want just to create an XML that represent the livecode stack, then use diff to compare the XML from 2 different livecode stacks.
I reached a good result with mainstacks, I can analyse a mainstack creating a XML file representing all the stack like this:

Code: Select all
<stack><rect>105%2C145%2C505%2C545</rect>
<destroyStack>false</destroyStack>
<linkVisitedColor></linkVisitedColor>
<maxWidth>65535</maxWidth>
<textStyle></textStyle>
<visible>true</visible>
<topColor></topColor>
<backPattern></backPattern>
<maxHeight>65535</maxHeight>
<linkHiliteColor></linkHiliteColor>
<editMenus>false</editMenus>
<shadowPattern></shadowPattern>
<topPattern></topPattern>
<iconic>false</iconic>
<cantAbort>false</cantAbort>
<minWidth>32</minWidth>
<liveResizing>true</liveResizing>
<cantModify>false</cantModify>
<backColor></backColor>
<minHeight>32</minHeight>
<foreColor></foreColor>
<linkColor></linkColor>
<hilitePattern></hilitePattern>
<alwaysBuffer>false</alwaysBuffer>
<forePattern></forePattern>
<shadowOffset>4</shadowOffset>
<focusPattern></focusPattern>
<shadowColor></shadowColor>
<systemWindow>false</systemWindow>
<hcAddressing>false</hcAddressing>
<startUpIconic>false</startUpIconic>
<name>Untitled+1</name>
<textSize></textSize>
<windowManagerPlace>false</windowManagerPlace>
<shadow>true</shadow>
<textFont></textFont>
<cantDelete>false</cantDelete>
<scalefactor>1</scalefactor>
<altId>0</altId>
<fullscreen>false</fullscreen>
<icon>0</icon>
<hiliteColor></hiliteColor>
<decorations>title%2Cmenu%2Cminimize%2Cmaximize%2Cclose</decorations>
<behavior></behavior>
<borderColor></borderColor>
<style>toplevel</style>
<externals></externals>
<resizable>true</resizable>
<metal>false</metal>
<underlineLinks></underlineLinks>
<bottomPattern></bottomPattern>
<borderPattern></borderPattern>
<id>1004</id>
<dynamicPaths>false</dynamicPaths>
<windowShape>0</windowShape>
<fullscreenmode></fullscreenmode>
<blendLevel>0</blendLevel>
<destroyWindow>false</destroyWindow>
<focusColor></focusColor>
<menubar></menubar>
<fileName>C%3A%2FDocuments+and+Settings%2Fmax%2FDesktop%2FUntitled+1.livecode</fileName>
<formatForPrinting>false</formatForPrinting>
<stackFiles></stackFiles>
<title></title>
<bottomColor></bottomColor>
<script></script>
<card><backPattern></backPattern>
<borderWidth>2</borderWidth>
<topPattern></topPattern>
<shadowPattern></shadowPattern>
<shadowColor></shadowColor>
<focusColor></focusColor>
<textFont></textFont>
<foreColor></foreColor>
<defaultButton></defaultButton>
<bottomPattern></bottomPattern>
<ink>srcCopy</ink>
<showBorder>false</showBorder>
<name>pippo</name>
<blendLevel>0</blendLevel>
<bottomColor></bottomColor>
<mark>false</mark>
<dontSearch>false</dontSearch>
<shadowOffset>4</shadowOffset>
<focusPattern></focusPattern>
<textSize></textSize>
<altId>0</altId>
<id>1002</id>
<behavior></behavior>
<layer>1</layer>
<cantDelete>false</cantDelete>
<hiliteColor></hiliteColor>
<borderPattern></borderPattern>
<threeD>true</threeD>
<forePattern></forePattern>
<borderColor></borderColor>
<backColor></backColor>
<hilitePattern></hilitePattern>
<topColor></topColor>
<textStyle></textStyle>
<script></script>
<button><rect>115%2C45%2C235%2C165</rect>
<menuHistory>1</menuHistory>
<text></text>
<toolTip></toolTip>
<menuMode></menuMode>
<menuMouseButton>1</menuMouseButton>
<hoverIcon>0</hoverIcon>
<visible>true</visible>
<iconGravity></iconGravity>
<topColor></topColor>
<textStyle></textStyle>
<hilited>false</hilited>
<hiliteIcon>0</hiliteIcon>
<disabledIcon>0</disabledIcon>
<bottomColor></bottomColor>
<borderWidth>2</borderWidth>
<backPattern></backPattern>
<menuLines>5</menuLines>
<shadowPattern></shadowPattern>
<armFill>false</armFill>
<dropShadow></dropShadow>
<topPattern></topPattern>
<label></label>
<backColor></backColor>
<lockLoc>false</lockLoc>
<hilitePattern></hilitePattern>
<foreColor></foreColor>
<cantSelect>false</cantSelect>
<autoArm>false</autoArm>
<accelKey></accelKey>
<forePattern></forePattern>
<showIcon>false</showIcon>
<layerMode>static</layerMode>
<visitedIcon>0</visitedIcon>
<shadowOffset>4</shadowOffset>
<titleWidth>0</titleWidth>
<showName>true</showName>
<shadowColor></shadowColor>
<showFocusBorder>true</showFocusBorder>
<focusPattern></focusPattern>
<opaque>true</opaque>
<showHilite>false</showHilite>
<innerGlow></innerGlow>
<sharedHilite>true</sharedHilite>
<accelText></accelText>
<ink>srcCopy</ink>
<labelWidth>0</labelWidth>
<showBorder>true</showBorder>
<name>Button</name>
<textSize></textSize>
<shadow>false</shadow>
<textFont></textFont>
<disabled>false</disabled>
<colorOverlay></colorOverlay>
<default>false</default>
<altId>0</altId>
<icon>0</icon>
<armed>false</armed>
<hiliteColor></hiliteColor>
<behavior></behavior>
<borderColor></borderColor>
<style>standard</style>
<family>0</family>
<innerShadow></innerShadow>
<hiliteBorder>true</hiliteBorder>
<bottomPattern></bottomPattern>
<borderPattern></borderPattern>
<outerGlow></outerGlow>
<id>1004</id>
<menuName></menuName>
<blendLevel>0</blendLevel>
<armBorder>true</armBorder>
<mnemonic>0</mnemonic>
<hiliteFill>false</hiliteFill>
<accelMods></accelMods>
<traversalOn>false</traversalOn>
<focusColor></focusColor>
<armedIcon>0</armedIcon>
<textAlign>center</textAlign>
<autoHilite>true</autoHilite>
<threeD>true</threeD>
<margins>4</margins>
<layer>1</layer>
<script>on+mouseEnter%0D%0A+++lock+screen%0D%0A+++put+the+loc+of+me+into+temp%0D%0A+++set+the+width+of+me+to+150%0D%0A+++set+the+height+of+me+to+150%0D%0A+++set+the+loc+of+me+to+temp%0D%0A+++unlock+screen%0D%0Aend+mouseEnter%0D%0A%0D%0Aon+mouseLeave%0D%0A+++lock+screen%0D%0A+++put+the+loc+of+me+into+temp%0D%0A+++set+the+width+of+me+to+120%0D%0A+++set+the+height+of+me+to+120%0D%0A+++set+the+loc+of+me+to+temp%0D%0A+++unlock+screen%0D%0Aend+mouseLeave%0D%0A</script>
</button>
</card>
</stack>
Code: Select all
put the rect of button 1 of card 1 of stack "C:/Documents and Settings/max/Desktop/Untitled 1.livecode"
But if I try to analyse the substacks, stack is opened and something goes wrong. I noticed that substack are numbered starting from 1, so the first substack is:
Code: Select all
stack 1 of stack "C:/Documents and Settings/max/Desktop/Untitled 1.livecode"
Code: Select all
put the rect of button 1 of card 1 of stack 1 of stack "C:/Documents and Settings/max/Desktop/Untitled 1.livecode"
What is the correct code to analyse properties of substacks?
