Dictionary type varibles is not able to pass between screens

I am currently working on an app, which I would be using for my own utility. The main point is that I am not able to pass dictionary between screens. Moreover, I am also not able to pass seperate values from a dictionary. I am attaching an ‘aia’ file. StockExchangeCompanion.aia (2.1 MB) . I am not able to pass between screen:‘playcard’ and screen:‘Ratesofshares’.

It would be a great pleasure if anyone could help or tell an alternative method.
Thanks,
Krish

Use different screens wisely

If you decided to use different screens, then you should switch them correctly, else you will run out of memory after a while...      
The recommended method of switching screens in App Inventor
(Thanks Taifun)
 
Also see demo: multiscreen.aia
 
1 Like

Could you tell us about your 2 TinyDBs with their separate namespaces?
One of them is named after a single stock, and the other has multiple stock prices.
when prices_bts click playcard global prices playcard_TinyDB Rates of Shares TinyDB

1 Like

Now, I have kept their namespaces same, but still not working. I just want to pass dictionary between screens. Can you tell me a way of it?

Before answering, I would need to understand the structure of your data.

What information to you keep about stocks (by name?) aside from their current prices?

1 Like

This is an app for a board game named ‘stock exchange’ by zephyr. In the game, you have cards by which the prices of shares increase/decrease. I want to create a companion app, so that I can keep a record and check the rates of share.

I just want to keep their current price and their default prices in my datastructure. So, I created a dictionary for the same. But, I am not able to pass dictionary between screens (even with TinyDB), so I need an alternative method or a method to do so.

*Keeping dictionary’s and other screens in my program are essential

I am a 9th grade student and I am preparing for google code to learn contest. This app is for understanding algorithms and practice.

Thanks,
Krish

Study this sample app for tracking prices and purchases …

All you need is two Tinydb Namespaces.
You don’t need a dictionary for this.

Hmm. I don’t see any reason why dictionaries shouldn’t be passable from screen to screen, but I’ll take a look. One concern might be if the dictionary is cyclic, but I don’t think that’s true in this case.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.