Loaded default event handler doesn't compile

Seems like I asked this question before, but I couldn’t find it when I searched, so maybe I only thought about it.

So I made a new Silverlight 5 application. I went to the constructor of the page and did:

Loaded +=

and pressed the spacebar after the =. I was presented with a popup that had a Loaded method and a Loaded event. I chose the Loaded method. The necessary event handler code was generated automatically.

However, when I tried to compile, I got:

Error	1	(E318) No overloaded method "Loaded" with 0 parameters on type "MainPage"	C:\Users\Mark\Documents\Visual Studio 2013\Projects\crap\SilverlightApplication71\SilverlightApplication71\Page.xaml.pas	40	3	SilverlightApplication71

So it couldn’t compile the code it generated.

Am I missing something here? It used to be that it would create something like MainPage_Loaded which avoided the apparent confusion the compiler is having.

As it is now, I apparently have to generate the code that won’t compile and then rename the method. However, renaming the method in the Refactor menu item ALSO renames the Loaded on the left side of the :=. So I have to manually fix that.

Is that the expected behavior and solution?

… time passes …

I could have SWORN there was a reply to this message earlier and that I had found my previous post (which I couldn’t find again). And put a link in here for the old post.

Now, all there is this post. Did something get lost on the server, or have I just lost my memory?

There was no reply to this post yet.

Odd. Ok, have a reply? :slight_smile:

Here is my old post:

http://talk.remobjects.com/t/how-do-i-make-the-event-handler-method-auto-generate-the-code/3746

I think that had to do with the mechanism of getting the choice, but in any event, I was able to reproduce the same behavior after a reboot.

In constructor:

Loaded +=

Choose Loaded from list.

Code was generated.

Code doesn’t compile.

Thanks, logged as bugs://72384

bugs://72384 got closed with status fixed.