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


(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 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 (252.3 KB)

Exception when accessing resources
(marc hoffman) #2

Isn’t the the same issue as

(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