<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">measure is a pointer to an object (an
FCMeasure taken from the collection FCMeasures).<br>
If you do <font face="Courier New, Courier, monospace">print(measure)</font>
you see the pointer.<br>
Now you assign this pointer to lastmeasure. It points to the
identical memory that measure uses.<br>
Check this script:<br>
<br>
local measure=finale.FCMeasure()<br>
measure:Load(1)<br>
local lastmeasure=measure<br>
print(measure,lastmeasure)<br>
print(measure:ClassName(),lastmeasure:ClassName())<br>
<br>
Jan<br>
<br>
Am 27.03.2015 um 17:24 schrieb Charles O. Lawrence:<br>
</div>
<blockquote cite="mid:001b01d068aa$91e04ef0$b5a0ecd0$@bellsouth.net"
type="cite">
<pre wrap="">Anyone,
In this code, why is it not necessary to declare lastmeasre as FCMeasure()?
local allmeasures = finale.FCMeasures()
allmeasures:LoadAll()
print ("Measure Count",allmeasures.Count)
local lastmeasure -- = finale.FCMeasure apparently it is not necessary to
declare this as FCMeasure() local TSString = finale.FCString() local
KSString = finale.FCString() for measure in each(allmeasures) do
if measure.ItemNo > 1 then
measure.TimeSignature:MakeString(TSString)
measure.KeySignature:MakeString(KSString)
print ("Current
Measure",measure.ItemNo,"TS",TSString.LuaString,"KS",KSString.LuaString,"Las
t Measure",lastmeasure.ItemNo)
if not measure.TimeSignature:IsIdentical(lastmeasure.TimeSignature)
or not measure.KeySignature:IsIdentical(lastmeasure.KeySignature) then
lastmeasure.Barline = finale.BARLINE_DOUBLE
lastmeasure:Save()
end
end
lastmeasure = measure
end
_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jan Angermüller
Jevenstedter Str. 80
22547 Hamburg
Tel. 040 - 28 94 84 82
<a class="moz-txt-link-abbreviated" href="http://www.angermueller.com">www.angermueller.com</a>
</pre>
</body>
</html>