Passing Variables between classes in modules

okibi okibi at ratedo.com
Thu Apr 26 11:27:57 PDT 2007


Mike Parker Wrote:

> 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.

So how do I get a variable from the object after the constructor returns?


More information about the Digitalmars-d-learn mailing list