Import SVG as Images

Sannyasin Brahmanathaswami brahma at
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


case "image"
		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:

on mouseup
   answer file "Find an SVG"
   put it into pFileName
   create image
   put it into tImageID
   set the text of tImageID to drawingSvgCompileFile(pFileName)
end mouseup

it works!  Are there any caveats to calling REV IDE handlers  we create a standalone app?


More information about the use-livecode mailing list