[Gambas-user] CLASS inherits from CLASS causes OUT OF BOUNDS (#22)

T Lee Davidson t.lee.davidson at gmail.com
Tue Apr 18 17:27:15 CEST 2023


On 4/18/23 02:22, Mayost Sharon wrote:
> They said there are two possibilities:
> 1. Make the variable found in class1 with a static declaration
> But the problem is that when I register class1. It will also show me this variable that I don't want it to be public
> 
> 2. Make class2 inherit from class1 and then I can access from class2 to class1
> And when I try it gives the error of: OUT OF BOUNDS

There is another option: Do /not/ make class2 inherit from class1. In your class_06 project, comment out "Inherits Class1" in 
class2, and you will see that it runs with no error.


-- 
Lee



More information about the User mailing list