GeraudBourdin / Ti.SvgView

Create a view from an svg file (expose the androidsvg-1.2.1 lib and the SVGKit 2.X for IOS lib).
MIT License
50 stars 24 forks source link

SVGView and tishadow #11

Open icecandy opened 8 years ago

icecandy commented 8 years ago

Do you have any idea how to get this module working with tishadow? There is some sort of path issue where running the app does not find the svg file. Error is: [ERROR] [iphone, 8.3, 192.168.0.3] Error: Invalid parameter not satisfying: newSource != nil Runs fine with straightforward ti compile, but not with ti shadow.

icecandy commented 8 years ago

And just to add to this, I can't see a way to trap errors such as calling createView with an non-existent SVG file (i.e. wrong filename or path). Even try/catch doesn't seem to work:

var SVGView = require('com.geraudbourdin.svgview'); var svgView; try { svgView = SVGView.createView({ image: 'test.svg', width: '350', height: '350', //top: 0, //left: 0, backgroundColor: 'red' }); } catch (error) { alert('sgvView is null') }