ChangeForm Bug!

Hi All

I’ve found a bug that I can replicate which I wanted to point out to you.

Open a new project and create a second Form. Drag a BS button (it may happen with other buttons but I’ve only tested BootStrap) onto the first form and set the ChangeForm property to point to the second form. I then ran the app in my desktop browser just to make sure it worked, but I can’t imagine that affecting anything.

Now select the second form and change it’s ID (I changed it to fmTest). If you go back to the button on the first form you’ll notice that the ChangeForm property is blank. I don’t know if it’s supposed to have also changed to reflect the new ID of the second form, but blank is also fine.

However, I discovered the problem because I didn’t touch the ChangeForm property again and instead set an onclickevent to do something else, but nothing happened. For this test set an onclick event to simply display a MsgBox with ‘Test’ or whatever when the button is clicked on and you’ll find it doesn’t work when you run it in your browser. It drove me nuts because the button simply refused to work no matter what I did and the worst thing was that no error was reported.

So I opened the JavaScript console in my Chrome browser (always a last resort for me!) and discovered that, although the ChangeForm was blank, it was still registered (see the very bottom error in the attached screenshot).

Hope this was useful. :slight_smile:

Whilst I’m here, are all the errors shown in the screenshot normal?


For the ChangeForm issue, this is the expected behaviour.

I’m curious about the Content Security Policy errors.

  • How are you running the app?
  • Are you using PhoneGap?
  • Which version of AppStudio are you using?

I’m using version of AppStudio and I’ve selected ‘Start in Desktop Browser’. No PhoneGap or anything - just the simplest method of testing!

Because you asked, I checked and discovered an updated version, so I now have version and I created the same app again and this time there are no errors other than Form1 not being defined, so the Content Security Policy errors seem to have been resolved in the new version. :+1:t2:

Is there any way I can configure AppStudio to check for updates automatically?

When you say that the ChangeForm issue is expected behaviour, you’re referring to the fact that the button’s ChangeForm field goes blank, right? You’re not saying that it’s normal behaviour to still have the old Form name stored and hidden so as to produce the error at runtime, are you? :stuck_out_tongue_closed_eyes:


There is no way to check for updates automatically, but there is a Check for Updates item on the Help menu.

It would be nice if AppStudio could check for changed form names in this instance, but it hasn’t learned how to do so yet.