Import SVG as Images
brahma at hindu.org
Sat Feb 1 16:13:17 EST 2020
I want to import SVG as a tool in a stack meant for deployment.
digging into REV IDE stacks | RevMenuBar, we find the "revIDEImportControl" handler
if pFileName ends with ".svg" then
-- SVG files can't be referenced
revIDECreateObject "com.livecode.interface.classic.image", tTargetStack, tCreatedControlLocation
put the long id of the last control into tCreatedControlID
set the text of tCreatedControlID to drawingSvgCompileFile(pFileName)
so I made a button with:
answer file "Find an SVG"
put it into pFileName
put it into tImageID
set the text of tImageID to drawingSvgCompileFile(pFileName)
it works! Are there any caveats to calling REV IDE handlers we create a standalone app?
More information about the use-livecode