vb6 - Module object is nothing when calling a third function -


i have simple address class, have:

  public street string   public number integer 

then, i'm creating instance inside module calle "mdl1", , using on same module function:

public objectaddress address  public function f1() string   set objectaddress = new address   objectaddress = "5th street" 'this works fine    if not isnothing()     f1 = objectaddress.street   else     f1 = vbnullstring   end if  end function  public function isnothing() boolean  'when entering here, objectaddres nothing, though assigned value street property...    if objectaddress nothing     isnothing = true   else     isnothing = false   end if end function 

i've assigned value objectadrress.street on f1() function, when enters ìsnothing()`function, objectaddress nothing again.

and when control comes f1 function, object returns having value , street property still have value assigned it...

so, shouldn't module "property" behave class one? or global/local scope doesn't exist inside module?

solved: though no 1 got point of question, problem was creating local object same name of global one, that's why nothingwhen entered function.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -