Adding resx file to main.pas in winforms project causes problems with loading resources

net
visual-studio
oxygene

(Gert Hermans) #1

I’m trying to upgrade to version 10 of elements, but this is causing some issues for some older winform projects.
I was able to create a dummy project that reproduces an issue that concerns localization.
To create it I’ve set localible on the main.pas form to true and I tried to add a main.es.resx file to the project. Adding it also caused some exception.
running it causes an indexoutofrange exception . The underlying issue is that getObject on the resources returns nil.
This issue does not occur when running the project on element 9.3

WinformsProjectNewCompiler.zip (252.3 KB)


Exception when accessing resources
(marc hoffman) #2

Isn’t the the same issue as https://talk.remobjects.com/t/exception-at-runtime-when-upgrading-winforms-project-to-elements-10-0-0-2341/17910/10?


(Gert Hermans) #3

No, it is the more or less the same dummy project, but this issue is different. The fix from the other case does not work here. Something goes wrong here because of the added resx file.


(marc hoffman) #4

Ah, ok. I’ll have a look.


(marc hoffman) #5

I’m sorry but can you elaborate a bit more on what is different and what fails now? As far as I can tell, the resource now gets named WinformsProjectNewCompiler.MainForm.resources and that seems correct?


(Carlo Kok) #6

Curious issue. Reproduced it.


(RemObjects) #7

Thanks, logged as bugs://81424