Passing Variables between classes in modules

Mike Parker aldacron71 at yahoo.com
Thu Apr 26 10:47:46 PDT 2007


okibi wrote:

> 
> Well, I know the value is coming up null as it doesn't wait for the instance of modPopUp to finish, and is there not getting the data. How would I go about locking modMain until modPopUp is finished?

Either I'm misunderstanding you, or you are misunderstanding the code. 
When you say 'it doesn't wait for the instance of myPopUp to finish', 
what do you mean? When you create an object instance, the constructor 
for that object is called. When the constructor returns, the object has 
been created. No other methods on that object are executed. Any 
initialization that needs to be done, such as that of myStr, should take 
place in the constructor. If you do not initialize myStr in the 
constructor, then of course it will be null when you try to access it.


More information about the Digitalmars-d-learn mailing list