Weird behavior in Beta Editor

What I’m trying to do: Trying to make a custom component

What’s wrong: Something weird

I was trying to select forms as template from anvil designer. so I had defined a property like this:
image

Which produced this result. (printing the properties dictionary in form init):

Then I deleted the defined properties from designer like this:
image

What’s strange is, after deleting the properties, when i print I still get the same result:

1. Why these values are still passed as properties to init?
2. How do i make it go away?

Any help is appreciated :blush:

Another irritating issue In New Beta Editor

1> multiple forms open on multiple tabs in design view
2> clicked on a component.
3> component gets selected.

image

4> switched to a different tab which is in 'Code' or 'Split' mode.
5> copied some text using CTRL+C (line 5)

image

6> trying to paste copied text using CTRL+V
7> text is not pasted. instead,  selected component from step 3 is pasted to end of form in 'Design' view.

image

8> not just pasted on one form. it also ends up sometimes in all open forms.

image

9> Last but not least, blinking cursor gets stuck on multiple places on the editor.

Various aspects of New Beta Editor is growing on me, Don’t wanna switch back to classic editor. At the same time these issues irritates a lot. Quite a dilemma!

Anyone facing such weird things?

1 Like

My feeling is that you are describing 3 bugs and they all should be addressed. Here are my thoughts.

  • Multiple cursors
    I have seen it, it’s annoying, I have not understood why it shows up or how to get rid of it.

  • Paste of component rather than text
    On steps 4 it looks like you switch to a different tab and you don’t click inside the editor, so you see the editor you switch to, but the focus is still in the one you are coming from. Then on step 5 you paste, the IDE still has the focus on the previous editor and it pastes in there.

  • Zombie properties
    Have you tried to refresh the page (press F5) after deleting a property and see if it’s still there?
    I think the whole code is reloaded every time the app starts, but I have seen the IDE remembering things that shouldn’t remember, for example after editing CSS or dependencies, and reloading the whole thing would fix it.
    If the reload fixes it, then the problem is not stored in the app and I wouldn’t worry about it. Sooner or later they will fix it, but it will not bother anybody.
    If the reload doesn’t fix it, then the zombie properties keep living in the app, and I would really want a quick fix.

2 Likes
  • Yes, clicking somewhere else before copying text seems to avoid pasting components.

  • However, sometimes the component is not pasted on just one form (the one i am coming from). instead it’s pasted on multiple forms like I have shown in step 8. one single CTRL+V event pastes the same components in multiple forms! I can not explain it!

  • Also, If i want to copy some data bindings, appearance attributes or anything from the right side toolbox panel, first i have to select the component (label_one). Then when i select another component (label_two) and try to paste those text attibutes copied from label_one, guess what happens? Component gets pasted! It is annoying.

  • Refreshing browser windows does not seem to forget zombies. Neither does unchecking "Make this form available as component checkbox" then reload browser and checking that box again brings back the zombies magically.
    image

hi @rsmahmud, re the ghost properties for form do those properties still appear in the component dialogue when you open them?
Same question about the properties view once you’ve added it to a Form?

We’ll also change that default value! It should really be None if you haven’t selected a form.

You can try switching to the beta editor and configuring the custom component there to see if that gets rid of the ghost properties.

(I tried to reproduce the ghost properties but I wasn’t able to).

hi @stucork
Those ghost properties does not appear in the component dialogue or in properties view ( right panel toolbox in design view).

hi @stucork ,

Switching back and forth to classic editor does not seem to get rid of said ghosts.

@rsmahmud - Thanks for reporting this - I’ve managed to reproduce.
The bug seems to occur when you have a custom component already added to a form somewhere in your app.
When you remove properties from the custom component dialogue, these properties aren’t cleaned up properly.

edit - if you find the rogue component in the design view. Change one of its properties. This should force a clean up.

2 Likes