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

Reproretro

Member
Licensed 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
did you install 5.0 or 5.01? 5.01 might have those errors solved.
 

NJDude

Expert
Licensed User
I don't think is fixed, I have 5.01 installed and I get that error. It seems you get that error if you delete a view in the designer.
 

Reproretro

Member
Licensed 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?
 

NJDude

Expert
Licensed 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
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
Yes, just create a layout, add a couple of views, then remove one, BLAM! nice error.
 

NJDude

Expert
Licensed User
No, I didn't rename any views, just added 2, deleted one and the error popped up right away.

I'll do the log thing, give me a few moments.
 

NJDude

Expert
Licensed 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

NJDude

Expert
Licensed 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.
 
Top