Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any
New issue 209 by emil.len...@gmail.com: Inheritance and translatable constant strings does not work http://code.google.com/p/gambas/issues/detail?id=209 1) Describe the problem. Let's say you have a base class with a string constant that is not translatable. If you now inherit the class and override the string constant with a translatable string, the translated version of the string is not always used. The problem is caused by an optimization in gbx_exec_push.c 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK Revision: r4463 3) Provide a little project that reproduces the bug or the crash. Class1: Public Const ConstString As String = "hello" Class2: Inherits Class1 Public Const ConstString As String = ("hello2") And the code: Dim i As Integer Dim e As Class1 For i = 1 To 2 If i = 1 Then e = New Class1 Else e = New Class2 End If Print e.ConstString Next 5) Explain clearly how to reproduce the bug or the crash. Mark the project as translatable, and translate the string "hello2". The program will output: hello hello2 and NOT the translated version of hello2. It is same problem when the base class has a translatable string, but the inherited marks the string as non-translatable. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user