B4J Question Classes & objects problems.

LucaMs

Expert
Licensed User
Longtime User
I wanted to run a test: a CallSubDelayed on an object-variable referring to an object that "no longer exists" (?).

So I created a B4J project "on the fly" and I came across some rather strange things (one of which I don't even write... at least for now).

It is not easy to explain in words what the problems are, so
I am attaching the project, which is very simple (B4J).

A class has an object variable which refers to an object instantiated elsewhere.
This object is set to null. If inside the class I use a CallSubDelayed "to the variable", the method is executed as if the object still exists.


Another problem is:
B4X:
'gmapRooms.Get(3).As(clsRoom) = Null' *** --> Compile-time error message ***
clsRoom exists, of course, and the object in "3" too.
 

Attachments

  • CallSubTest.zip
    9.6 KB · Views: 272

Heuristx

Active Member
Licensed User
Longtime User
Yes, I saw; otherwise I would not have "given" you a "Like" for that post ?

I have no comments to make, I have never been to Canada. I suppose you live well there, except perhaps for the climate.

The Sun of Roma is unique! (er... it's unique everywhere, to be honest ? )

I used to love Canada.
The weather is not like the stereotype. Toronto is more to the south than Rome! It's nice and hot in the summer. The fall is also great. The problem is that winter is long, spring is just a few days and it happens at the end of May.
 
Upvote 0

Heuristx

Active Member
Licensed User
Longtime User
Yes, I saw; otherwise I would not have "given" you a "Like" for that post ?

I have no comments to make, I have never been to Canada. I suppose you live well there, except perhaps for the climate.

The Sun of Roma is unique! (er... it's unique everywhere, to be honest ? )

So the Sun in Rome is more unique than everywhere else.
 
Upvote 0

Heuristx

Active Member
Licensed User
Longtime User
Wow, you are also very well prepared in geography!
(It is actually slightly further north but very little)

You are right, more north.
The problem is that there are no mountains that would protect it from the cold air from the North Pole.
 
Upvote 0
Top