Caveat wrote: > > >> works correct without any DIM at all? > > Because HowManyUnits is a static function so you don't need to create > any instances of CUnit to be able to call that function. > >
Yes. All my problem was in my messing up "DIM" and real creation of an object. Code that satisfying me: Public Sub Main() Dim Unit1, Unit2, Unit3, Unit4 As CUnit CUnit.HowManyUnits() Unit1 = New CUnit Unit2 = New CUnit CUnit.HowManyUnits() Unit3 = New CUnit Unit4 = New CUnit CUnit.HowManyUnits() End The output is: There are 0 objects of class 'CUnit' New Unit was created New Unit was created There are 2 objects of class 'CUnit' New Unit was created New Unit was created There are 4 objects of class 'CUnit' All right, thanks to everybody, I calmed down. -- View this message in context: http://old.nabble.com/File-opening-dialog-and-one-more-question-tp33085420p33094447.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user