[JW Lua] TextBlocks unused

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Thu Dec 5 18:37:26 CET 2013


Yes, interesting find that text block aren't deleted by Finale. I don't 
know the reason, since I don't think that text blocks can only be 
cross-referenced in the Staff Tool.

I need to check if the Load() always returning true is a bug in Finale 
or in the PDK Framework.

I'll create a FCTextBlocks collection class for the next beta.

Even if you delete the FCTextBlock with DeleteData, the string will 
still be available in the string pool. Normally, objects that own other 
objects should normally be deleted with DeepDeleteData(), I don't know 
why I haven't supported that in the JW Lua implementation of 
FCTextBlock. I'll add that to the next beta.


Best regards,

Jari Williamsson


On 2013-12-03 09:51, Chris wrote:
> Hello Jari
>
> I noticed that TextBlocks unused remain in the file.
> This can be seen by opening the text editor without any selection and
> scrolling the index.
> The "File Maintenance" does not solve the problem. So I try to make a
> script (it works) but it may be dangerous to delete this TextBlocks (I
> add "delete" at the start of TextBlocks I want to remove).
> Moreover, I do not know how whether TextBlocks exist, the "load"
> function always returns "true".
> Is there a global collection for TextBlocks ?
> What do you think?
>
>
> textBlock =finale.FCTextBlock()
>
> for i=1,10 do
>      textBlock:Load(i)
>
>      str=textBlock:CreateRawTextString()
>      str:TrimEnigmaFontTags()
>
>      if str:StartsWith("delete") then
>          textBlock:DeleteData()
>          textBlock:Save()
>      end
> end
>
>
> Chris
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>






More information about the JWLua mailing list