Bug? Error 'given key was not present in the dictionary' in Designer

Reproretro

Member
Licensed User
Longtime User
I built one very simple app to see how the system works.
Then I was trying to create a slightly more complicated app in the new version 5. I spent a while working in Designer (no device connected and I don't have emulators), but the designer failed with the above error. I saved it and reloaded it, but all the changes were lost.
I tried simple layouts, some worked, some failed with the error. E.g. I saved the default listing, opened the Designer and saved that, then added a panel, added a label, added a EditText, clicked on the panel, then clicked on the EditText again, and the error came up. On another occasion it happened when I clicked on the EditText after renaming the panel. But other times I follow this sequence and it doesn't fail, but when it does I seems to be usually when I click on an EditText. Note I have not added any code to the app, nor generated members.
It makes it difficult to have enough confidence in a system that might lose all my changes, and I noticed this error has been reported for about 4 years.
Has anyone any ideas on this one?
 

sorex

Expert
Licensed User
Longtime User
did you install 5.0 or 5.01? 5.01 might have those errors solved.
 

Reproretro

Member
Licensed User
Longtime User
My error was always when clicking on something in the designer.
So that is two sources for the error.
Every system has bugs, but I am a bit concerned that I am seeing a significant problem - which actually makes development difficult - so early, and as I said before this bug has been reported for at least 4 years.
Perhaps V4 was more stable?
 

Reproretro

Member
Licensed User
Longtime User
Thank you. Do you have a link for 5.01?
On the Home page is says 5.00 is the latest version
 

NJDude

Expert
Licensed User
Longtime User
The designer was rewritten from scratch in v5.00. There is no relation between any old issue and the new designer.

The first thing that you need to do is to update to v5.01 it will probably fix this issue.
I'm running 5.01, installed from scratch and I still see that issue.
 

Reproretro

Member
Licensed User
Longtime User
Found a message on the forum that says the same download link we were sent for V5 download, now downloads V5.01
So I downloaded it.
 

NJDude

Expert
Licensed User
Longtime User
By the way, you can also make it happen if you:

1- Add a label view (or any view)
2- use the designer script and do something, like e.g. Label1.SetLeftAndRight(0dip, 100%x)
3- Add another view, then delete it
4- Error!

After that point, you won't able to add any views since the "key" error keeps popping up.
 

Attachments

  • log.txt
    11.5 KB · Views: 231

NJDude

Expert
Licensed User
Longtime User
No, brand new layout, brand new project, and I'm removing the view by selecting it and hitting the DEL key.

HERE is the screen shot.

What I did was:

1- Added the Label
2- Added a ProgressBar
3- Added the code to the designer script (label1...)
4- Selected the Progressbar and hit DEL
5- Boom.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
When you click on the script pane the designer switches into a read-only mode:
SS-2015-06-14_08.42.46.png


It returns to normal mode when you click on the properties grid.
 
Top