Flying Meat
VoodooPad Docs: PageMeta

Page Meta

toolbar32-meta.png

VoodooPad has a feature that lets you set arbitrary keys and values on a page, which can then be used later on in script plugins or triggers.


To add meta values for a page, bring up the Palette and select the "Page Meta" tab.


pagemeta.acorn


Scripts and Triggers

Meta values are useful when combined with triggers or script plugins.  Here is an example of a script plugin that uses a meta value named "todo" given to certain pages.  It searches through all the pages in a document, finds the ones with the "todo" meta value set, and inserts those names in the current page.


textView = windowController:textView()

list = "My todo pages list:\n"

for key in objc.values(document:keys()) do

page = document:pageForKey(key)

if (page:metaValueForKey("todo") ~= nil) then

    list = list .. page:displayName() .. "\n"

end

end

textView:insertText(list)




Back to VoodooPad Introinterface