Duplicate Event Handlers

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
matthmsft
Posts: 16
Last visit: Fri Oct 02, 2020 12:31 am

Duplicate Event Handlers

Post by matthmsft »

Product: PowerShell Studio 2019 (64 Bit)
Build: v5.6.167
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.18362.0

Crazy thing has just started happening. In a form on my project, I have started getting prompts for missing event handlers for buttons and lists and would I like to create them. The odd thing is, the code for the event handlers is still there! and when I click to Add them, it creates duplicates, so I have 3 of a particular event handler ($btn_CredentialAdd_Click - for example).

Has anyone seen this behaviour?
User avatar
matthmsft
Posts: 16
Last visit: Fri Oct 02, 2020 12:31 am

Re: Duplicate Event Handlers

Post by matthmsft »

This is super crazy, even once I click to create them and they are duplicated, if I go back to the Designer view, the popups appear again that the events are missing still and it creates even more!

Some reference must be corrupted or broken somewhere. Any ideas?
User avatar
matthmsft
Posts: 16
Last visit: Fri Oct 02, 2020 12:31 am

Re: Duplicate Event Handlers

Post by matthmsft »

duplicates.PNG
duplicates.PNG (69.15 KiB) Viewed 2812 times
Here are the duplicates being generated each time I click into Designer view. The original event handlers with code is still in place further up the project!
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 1:00 pm
Answers: 39
Been upvoted: 30 times

Re: Duplicate Event Handlers

Post by brittneyr »

What kind of project are you using? (Multi-Form Project, Form Project, etc)
Is it only this form affected by this behavior?
Can you please upload the form with this behavior to the following location:
https://www.sapien.com/support/upload
Brittney
SAPIEN Technologies, Inc.
User avatar
matthmsft
Posts: 16
Last visit: Fri Oct 02, 2020 12:31 am

Re: Duplicate Event Handlers

Post by matthmsft »

Hi
It is only this form which does it. It is a multi-form project. I have uploaded the form.

Thanks!
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 1:00 pm
Answers: 39
Been upvoted: 30 times

Re: Duplicate Event Handlers

Post by brittneyr »

I'm able to replicate the behavior you are experiencing with the form you uploaded, but I haven't been able to reproduce this on my own form. I will keep investigating and I'll post if I get any new information.
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 1:00 pm
Answers: 39
Been upvoted: 30 times

Re: Duplicate Event Handlers

Post by brittneyr »

From looking at your form, I can see you are missing some closing braces. This seems be what is causing the weird behavior with the designer.
Some that I found:
- Line 1205
- Line 1866
Brittney
SAPIEN Technologies, Inc.
User avatar
matthmsft
Posts: 16
Last visit: Fri Oct 02, 2020 12:31 am

Re: Duplicate Event Handlers

Post by matthmsft »

Hi

Thanks, I didn't see the 1205 brace but I see the 1866. That was re-jigged before the problem started, but the syntax highlighter didn't catch it.

I have added the 1866 curly brace and the problem seems to have stopped now.

Seems to be that 1 curly brace that the highlighter missed that cause the behavior to start :)

Great catch.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.