LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems Localized GUI

Hi all !
 
I experienced some strange behaviour using the 'User Interface Localizer'.
 
From the moment I create a .lwl file the function LoadLocalizedPanel returns -6000 Invalid or corrupt language file.
 
I still had a .lwl that works. When I compare it to the new .lwl the only real difference is that 'Version' changed from 100 to 102.
 
We I changed this - using NotePad ! - to 100 it worked !!
 
What is happening here ? Why are lwl files with version 102 expected to be corrupt ?
 
And what is the use of the second variable in the lwl file named 'Magic = -1395807027 ' ?
(Our C coding standard prohibits the use of magic numbers  😉 )
 
 
Thanks in advance !
 
 
 
 
 
 
0 Kudos
Message 1 of 4
(3,284 Views)
Looks like the lwl file was generated with CVI 8.0 and you might be trying to use it with an older version of CVI (6.0?).

The magic number is just to us to be able to detect the correct file type. It's a signature that doesnt change.



Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,238 Views)
Hi Bilal !
 
Rather the other way round I'm afraid. Indeed we changed from 6.0 to 8.0 lately. But the lwl file was made using 8.0; believing you are right then that's why it has code 102. But to be able to use it I had to change this to 100. 
 
This gives me an awkward feeling: Maybe something went wrong during installation of 8.0 ? The part that reads the file for the GUI is still 6.0 ? Is that possible ?
0 Kudos
Message 3 of 4
(3,222 Views)
So, you generated the file using the 8.0 version of the utility, and then you started seeing errors in LoadLocalizedPanel when you run your program. Is that correct?

If so, and based on Bilal's earlier reply, you want to make sure that you are also using the 8.0 version of LoadLocalizedPanel. This function is implemented in the localui.fp instrument driver that you are including in your project. Can you verify the full path of that file, to see if it is inside your CVI 6.0 or your CVI 8.0 installation? (To view full path names in 8.0, just right-click on the project tree and select the appropriate option).

If you loaded the 6.0 project directly in 8.0, it should have automatically updated the path of that file to make it be relative to 8.0 instead. If that didn't happen for some reason, I would be surprised, but at least that would explain your error. In any case, if that is what happened, you can easily fix it by replacing the 6.0 version of localui.fp with the 8.0 version. You do this by right-clicking on the file's name in the project tree and selecting "Replace File in Project". You should do this instead of changing the version of the .lwl file, which we don't recommend.

Luis
NI
0 Kudos
Message 4 of 4
(3,207 Views)