Inserting {{undefined}} data binding

When in code view, if you save or change focus (etc view something in the browser, or even click the tab of an another opened Wappler file) and then get back to your initial file, cursor is placed at the top, and has the indication that needs to be saved (litlle asterisc on the right of file name on the tab). Also if you try to add a binding Wappler will not ‘recognise’ it and will add the {{undifined}} at the top. What I found out is that on any given moment that you making any change in code view just hit the ‘design view’ button and then the ‘code view’ to continue working in code view.

the double {{undefined}} before the doctype is also really strange, lets see what @patrick has to say about this.

Propably this double undifined is because ‘Insert binding’ was clicked twice. It happens to me also, but as soon as you notice it, it is just a matter of clicking the ‘Design View’ and then the ‘Code View’ button.

Can you provide the exact steps to reproduce the undefined bindings?

I certainly will. Maybe I can duplicate it on the next page and pay more attention to what lead up to the scenario’s result. Thanks for your help.

1 Like

Check the video below. Although now it did not add the ‘undifined’ tag, you will notice that most of the databindings go at the top of the page. Also the ‘insert binding button’ has to be clicked twice. Sometimes it adds the ‘undifined’ others not.
undifined.mp4 (9.4 MB)

Thanks! That’s exactly what I was trying to describe with words! I prefer to see where my code is going, so I work mainly in code view, then check the view afterward.

The only problem is when it locks up… it locks up. Is the ‘bug reporting’ available after the restart?

Can you provide the exact steps to reproduce the undefined bindings?

Here is another example that I can think of off the top of my head where it creates the undefined tag. There are others just can’t think of them at the moment.

undefined.mov.zip (5.5 MB)

I’ve seen this too. I think it happened more when it seemed Wappler recognised an element in the App Structure tree but the selection in code view was actually incorrect.

Does it perhaps just happen when Wappler doesn’t recognise the current element, or when no element is selected? In such cases, it would be good if the generated code were placed at the cursor position.

I checked the movies and inspected our code. The undefined is something that I will fix asap, it happens when you cancel the dialog.

The problem with the insert at the top of the page happens when you edited something in codeview before clicking the “Insert Binding” button, the code will then sync on blur of the editor, that is why the first click on the button does nothing. After the sync it has reset the selection to the top of the page, so pressing the button again will insert the binding at the top.

For now if it doesn’t insert the binding directly, place the cursor at the correct position again in codeview before clicking again on the Inser Binding button. It will then insert correctly. We will look for a solution for this problem.

This is solved now in vet 1.2.0