[F/OS] Static Variable Extension || An extension for creating static variables in App

Static Variable

Hello everyone, After many days I am again launching a new extension i.e Static Variable. I know if you know java then you will definetly know what are static variables and how could be they useful. If you dont know what are static variable then look:- Static variable are those variables that can be accessed through any class and in Kodular or AI they can be accessed from any other screen wothout saving it to local storage like Tinydb. In easy words they are variable that can accessed from other screens.

Let see some blocks and documentation.

All Blocks

Documentation

blocks(39)

This block creates the variable or initialise them.

blocks(38)

This block set or update the value of variable

image

This block return the total number of variables you have created

image

This variable return all the variable names in a list that you have created

image

This block return all the value of all variable that you have created

image

This block return the value of given variable name

blocks(40)

This block removes the given variable

component_method(18)

This block removes all the created variable

blocks(41)

This block renames the variable from old name to new name of variable

image

This block return true if the variable is created

Usage

Screen1

In this example I am storing the value in Screen1. You can see these blocks

image

Screen2

In Screen2 we will get the value of given tags and much more

image

Download

Click to Download AIX

Open Source

If you have doubts that it stores value in local storage then just check the code

Credit

Thanks to @Shreyash for his super Rush.
Thanks @AryanGupta for helping me.

Thank always Kodular for being with myself
Suggestion and issue are welcome

If you like the extension then like the topic
Thank You All

Donate

If you like my work then donate if you can :slightly_smiling_face:

34 Likes

As you said It could be done using TinyDB. But using your extension it would be easy to manage or access data throughout the screens.
Thanks, great contribution.

4 Likes

Nice idea.
Objects will be stored in a static Hashmap

3 Likes

This topic bring this idea to me yesterday and I thought it should be and today just made​:upside_down_face:.

5 Likes

Just some doubts

They are variable means they aren’t store forever like tinydb, right.

If we close app the data is gone.

Accessing variable form another screen is the best part :grin:

3 Likes

Yes @Maayur :grinning:. They are variables and they will work like variable

Really cool :blush:

4 Likes

Great extension. We can get data through multiple screens without using start value.

3 Likes

It work like Tinydb ?

1 Like

I have already mentioned it in many post

Very good work, I loved your work really :heart:

A Big Salute For Developing Such A Wonderful Extension.
Just Awesome :upside_down_face: :upside_down_face:

2 Likes

Thank you all vey much. Your wonderful post increases my confidence to make more. :innocent:
Thank you again

I don’t understand with this new extension, I’ve seen the code and it’s very strange,
I mean what’s on your mind, why you make an extension that is not at all important to use. :exploding_head:
Don’t you realize that the blocks in the “Dictionaries” menu can do that?
Or maybe you don’t know that the block in the “Dictionaries” menu contains a hashMap :thinking:

@Salman_Dev , I will recommend you to think first before posting anything. Hashmap is usable for making dynamic variable but it only work in 1 screen because they are not static.

3 Likes

Well @Sumit1334, in @Salman_Dev’s defense, you didn’t list a reasoning for creating this extension… However I guess it could be useful in someway, not to me, but maybe others.

1 Like

So @FlailingOctopus , how much time should I post the use(reason) of this extension?


My extensions is never made for the use of only one person whether it is you or someone else.
I can’t leave the idea of ​​creating an extension if the extension isn’t usable for one.

What you think strange​:thinking:?

It depends on koder who use it. It can send the data through screens without saving it to any local storage. I would like to ask you that isn’t it better than a tiny db.

Really?
Are you serious do you think really it is possible with in built dictionary?. I don’t think.
It would be great if you do so with in built dictionary if you success then I want to request you to post here.

Dont take my words wrong. I just mentioned that you said and asked me. Stay calm because I haven’t said any bad word to you

And please now don’t spam this topic. I don’t wanted to let moderators to close it.

4 Likes

The reasons you listed are nearly all the exact same… You don’t have to use TinyDB and can use this extension through multiple screens without needing additional configuration, however, this extension isn’t good for any of those reasons since you can do the exact same with the TinyDB component.

I’m not saying it’s a bad extension, but there is no valid reasoning for why you came up with this?

TinyDB is good for long term usage where you need to access same data again and again but for short or one time usage this extension is fine.
TinyDB takes storage while this extension takes ram.

9 Likes

I’m already think before posting. Of course it will only work in screen1 but the text can still be sent to screen2 using this block:
blocks

i think strange because it’s too easy to make without having to use your extension :sweat_smile:

yeah that is better than tinydb but you can still use this one :
because this block will work without save the data to local storage.
blocks

Yeah it’s very possible, I will post here as soon as possible.

2 Likes

I mentioned that we can get data without using start value at my first post. I’ve been using that method till now. For start value, we should Make a list/dictionary of variables to a global variable and then pass it to the next screen which doesn’t look like getting variables easily and efficiently. Also, What if you don’t close the first screen and you want to transfer a variable back from the Screen2 to Screen1.

Eg. App (Screen1) > Settings (Screen2) - Here I only open the Screen2 and for returning back to Screen1 from Screen2. I just use close screen in Screen2. How can I transfer the variable to Screen1 using open with start value. This is a valid reason.

Sorry If I said anything wrong.

3 Likes