Problem with resource files - J++ to J# conversion -
10-20-2004
, 09:27 AM
Hi
I have convereted a reasonalby large project from J++ to J#. Overall, teh
conversion seems successful, but I have a problem with forms that are
loading objects (icons, COM component states) from resource files. Every
time any resource file is called, it generates the following error:
java.lang.IllegalArgumentException: Length cannot be less than zero.
Parameter name: length
at System.String.Substring(Int32 startIndex, Int32 length)
at com.ms.vjsharp.lang.VJSClassLoader.__findResource( Assembly
currentAssembly, String resName)
at com.ms.vjsharp.lang.VJSClassLoader.__getResourcefr omAssembly(Assembly
callingAssembly, String resName)
at com.ms.vjsharp.lang.VJSClassLoader.getResourceAsSt ream(String resName)
at java.lang.Class.getResourceAsStream(String resourceName)
at com.ms.wfc.core.Component.getResource(String name)
at com.ms.wfc.core.ResourceManager.getLocaleSet(Local e locale, Boolean
tryParents, Boolean createIfNotPresent)
at com.ms.wfc.core.ResourceManager.getObject(Locale locale, String name)
at com.ms.wfc.core.ResourceManager.getObject(String name)
at com.simplex.inaport.ui.ImportWiz.initForm() in MyForm.java:line 4324
The source line that caused the error is:
flxGrid_old.setOcxState((AxHost.State)resources.ge tObject("flxGrid_old_ocxSt
ate"));
Any suggestions gratefully received.
Regards
Mike |