X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-swig%2FSWIG%2Fevents%2Fbuilder-event.i;h=268b7d7ffc77954aad57631c9fb088170a0be37f;hp=db580631f3335303067ec5e51f8b34271afb828c;hb=60235b1a08bbb136246bc87939b771e19aa8c55c;hpb=5bdacbc181f88698499b69199b584d05a2791454 diff --git a/plugins/dali-swig/SWIG/events/builder-event.i b/plugins/dali-swig/SWIG/events/builder-event.i index db58063..268b7d7 100644 --- a/plugins/dali-swig/SWIG/events/builder-event.i +++ b/plugins/dali-swig/SWIG/events/builder-event.i @@ -80,6 +80,29 @@ } } + /// + public void LoadFromFile( string fileName ) + { + try + { + string json = System.IO.File.ReadAllText( fileName ); + if( json.Length > 0 ) + { + LoadFromString( json ); + } + else + { + throw new global::System.InvalidOperationException("Failed to load file " +fileName); + + } + } + catch ( System.Exception e) + { + throw new global::System.InvalidOperationException("Failed to parse " +fileName); + } + } + + %} %enddef