Application Tool Kit

ATK, adding resource file to project

Hi,

Using ATK in visual studio, we are getting some error. Below is the process, we followed.

1. cretaed a txt file of data as explained in http://doc.myscript.com/Common/DevTools/index.html
2. Got it converted to .res file from https://developer.myscript.com/tools/
3. Inside Resource/resource/en_US, we copied that file
4. And through visual studio, we added to project.
5. In MainPage.xaml.cs, we included this line.
Widget.Configure(en_US, cus_med);

and so we are getting the error.

cannot load handwriting resource
Widget configuration failed

Please help, its urgent.

Thanks
satyendra


Thanks for your bug report.

Could you please let me know which widget you use? Single Char or Single Line Text widget?
Did you update the en_US.conf file available in the 'Resources/conf' folder this way (in case of lexicon addition)?

Name: cus_med
Type: Text
Configuration-Script:
AddResource en_US/en_US-ak-cur.lite.res
AddResource en_US/en_US-lk-text.lite.res
AddResource en_US/en_US-cus_med.res
SetWordListSize 5

We could do some testing on our side if you provide us with the content of your text file.
Best regards,

Hi,

we using Single Line Text widget.
Yes we had updated the en_Us.conf file, which is there in ‘Resources/conf’ in the similar way how you are telling us to do.

So the same swiss city sample file, we trying to process, which is available on your site.
so the content of file looked like this.
Zurich
Geneva
Basel
Lausanne
Bern
Winterthur
Lucerne
Lugano
Biel
Thun
Schaffhausen
Fribourg
Vernier
Chur
Uster
Sion

we used the tool here https://developer.myscript.com/tools/ and converted this to .res file.

please let us know, where we going wrong.

Thanks
Satyendra

I was able to compile the text file successfully and to add the .res file in the 'Resources' folder.
At first sight, I don't know what's wrong on your side...
Could you please share with us your conf file and check the files are in the 'SamplesSingleLineWidgetSampleSingleLineWidgetSampleResourcesresourcesen_US' Folder?

Thanks for your patience

yes the files are in the correct folder(same as what you stated).

My conf file is:

Bundle-Version: 1.0
Bundle-Name: en_US
Configuration-Script:
AddResDir ../resources/

Name: iso_text
Type: Text
Configuration-Script:
AddResource en_US/en_US-ak-iso.lite.res
AddResource en_US/en_US-lk-text.lite.res
AddResource mul/mul-lk-gesture.res
SetWordListSize 5

Name: cus_med
Type: Text
Configuration-Script:
AddResource en_US/en_US-ak-cur.lite.res
AddResource en_US/en_US-lk-text.lite.res
AddResource en_US-lk-cities.res
SetWordListSize 5

pls ignore the prevous conf file.
The conf file we are using is:

Bundle-Version: 1.0
Bundle-Name: en_US
Configuration-Script:
AddResDir ../resources/

Name: iso_text
Type: Text
Configuration-Script:
AddResource en_US/en_US-ak-iso.lite.res
AddResource en_US/en_US-lk-text.lite.res
AddResource mul/mul-lk-gesture.res
SetWordListSize 5


Name: cus_med
Type: Text
Configuration-Script:
AddResource en_US/en_US-ak-cur.lite.res
AddResource en_US/en_US-lk-text.lite.res
AddResource en_US/en_US-lk-cities.res
SetWordListSize 5

Could you please make sure the file has been added to your resource in Visual studio project?
add-res
Please also check that the value of 'Copy to Output Directory' option is set to 'Copy always' and 'Build action' is 'Content':
resFiles-options

Best regards

Hi,


Thank you very much. Able to do that.


Regards
Satyendra

Login or Signup to post a comment