thedesolatesoul Expert Licensed User Longtime User Jun 29, 2011 #1 I am probably doing something wrong here (like not initialising the array) or something which I cannot pin point yet. I have: Type TouchCoordType (x As Int,y As Int) Type PeopleType ( _ FollowPath(200) As TouchCoordType, _ Dim People As PeopleType Then this line throws me an exception: Msgbox (people.FollowPath(0).x,"Title") Java is not happy
I am probably doing something wrong here (like not initialising the array) or something which I cannot pin point yet. I have: Type TouchCoordType (x As Int,y As Int) Type PeopleType ( _ FollowPath(200) As TouchCoordType, _ Dim People As PeopleType Then this line throws me an exception: Msgbox (people.FollowPath(0).x,"Title") Java is not happy
Erel B4X founder Staff member Licensed User Longtime User Jun 29, 2011 #2 You should first call People.Initialize. Calling Initialize is required when there is a non-primitive variable type inside the declared type. Upvote 0
You should first call People.Initialize. Calling Initialize is required when there is a non-primitive variable type inside the declared type.
K kickaha Well-Known Member Licensed User Longtime User Jun 29, 2011 #3 thedesolatesoul said: I am probably doing something wrong here (like not initialising the array) or something which I cannot pin point yet. I have: Type TouchCoordType (x As Int,y As Int) Type PeopleType ( _ FollowPath(200) As TouchCoordType, _ Dim People As PeopleType Then this line throws me an exception: Msgbox (people.FollowPath(0).x,"Title") Java is not happy Click to expand... Are you missing a line or close bracket there. Try B4X: Type TouchCoordType (x As Int,y As Int) Type PeopleType ( _ FollowPath(200) As TouchCoordType) Dim People As PeopleType people.Initialize Upvote 0
thedesolatesoul said: I am probably doing something wrong here (like not initialising the array) or something which I cannot pin point yet. I have: Type TouchCoordType (x As Int,y As Int) Type PeopleType ( _ FollowPath(200) As TouchCoordType, _ Dim People As PeopleType Then this line throws me an exception: Msgbox (people.FollowPath(0).x,"Title") Java is not happy Click to expand... Are you missing a line or close bracket there. Try B4X: Type TouchCoordType (x As Int,y As Int) Type PeopleType ( _ FollowPath(200) As TouchCoordType) Dim People As PeopleType people.Initialize
thedesolatesoul Expert Licensed User Longtime User Jun 30, 2011 #4 Erel said: You should first call People.Initialize. Calling Initialize is required when there is a non-primitive variable type inside the declared type. Click to expand... Ah...I was unaware of that. Thanks! kickaha said: Are you missing a line or close bracket there. Try Click to expand... I had a bracket there. Just missed it out when doing selective copy. Upvote 0
Erel said: You should first call People.Initialize. Calling Initialize is required when there is a non-primitive variable type inside the declared type. Click to expand... Ah...I was unaware of that. Thanks! kickaha said: Are you missing a line or close bracket there. Try Click to expand... I had a bracket there. Just missed it out when doing selective copy.