Jump to content

Persistent class data or static data for all objects


Recommended Posts

Hello!

Is it possible (or how?) to have so persistent data over all objects inheriting from one generic class? I do have a class called "GenericView" and this class contains a list of localization strings. I would like to interit from this class in all classes which have some UI outputs. But I want do fill those language string just one time at startup.

In PHP or Java i would declare a static variable for a localization class...

Link to comment

You appear to be able to use a global variable in the same way in a class, it doesn't create directly under the class but you can add it and set the scope to private.

Remember that a Static attribute using e.g. Globals/Functional Global in a base class gets shared between two different sub classes.

That might be something you want, but maybe you want this “global variable” to have one unique value per base or sub class.

In that case you can use a Named single element queue, using the object's class name.

post-941-0-73403200-1355700160.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.