[Gambas-user] static ? in variables
PICCORO McKAY Lenz
mckaygerhard at ...626...
Thu Jun 15 15:10:28 CEST 2017
thanks in advance, but i have now more questions:
2017-06-15 8:41 GMT-04:00 Tobias Boege <taboege at ...626...>:
> No, the word "singleton" here just means you get an automatic instance of
> your class, i.e. you can use the class name as if it were an object. You
>
automatic instance?
maybe its a translation problem, but i try to understant: wiki said here:
http://gambaswiki.org/wiki/lang/createstatic
in a tip:
"allows you to implement the object-oriented programming singleton pattern
<http://en.wikipedia.org/wiki/Singleton_pattern>."
and i understand by singleton pattern that a only one instance du i was a
J2EE programer:
"restricts the instantiation
<https://en.wikipedia.org/wiki/Instantiation_%28computer_science%29> of a
class <https://en.wikipedia.org/wiki/Class_%28computer_programming%29> to
one object <https://en.wikipedia.org/wiki/Object_%28computer_science%29>.
This is useful when exactly one object is needed to coordinate actions
across the system"
so here are some things that i cannot understant and i think its something
with translation or?
> Nothing extraordinary happens. You have a dynamic class with a static
> variable and you can use the class like an object (as well as create new
> objects of that class).
>
for the variable:
public statis var as string
vs
public var as strings
doc wiki said "will be shared with all the class" seems that there's no
diference based on your answer
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list