Initialize?

U

unba1300

Guest
Another newbie question: what does Initialize really do?

I have a map file that the app reads on Create and writes to after the user changes settings from three different dialogs, but I never initialize the map anywhere, and it still works. Thanks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
File.ReadMap creates a map internally and returns it. So you if you have a code such as:
B4X:
Dim m As Map
m = File.ReadMap(...)
You do not need to call Initialize as you are assigning an already initialized map to 'm'.
This is exactly the purpose of Initialize. It allows you to declare a variable and not initialize it as it sometimes not needed.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…