View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000902 | NoesisGUI | C# SDK | public | 2016-06-02 16:00 | 2018-11-22 19:32 |
| Reporter | ai_enabled | Assigned To | sfernandez | ||
| Priority | normal | Severity | major | ||
| Status | assigned | Resolution | open | ||
| Product Version | 1.2.6f3 | ||||
| Summary | 0000902: Difference with WPF - Storyboard EventHandler has different signature | ||||
| Description | Hello! Will you consider changing this aspect to match WPF event handler signature? Regards! | ||||
| Platform | Any | ||||
|
WPF utilizes completely different approach - it creates storyboard instances for each element in visual tree. NoesisGUI uses a single instance of storyboard when it's located in the control template... I also think it could lead to memory leaks. To properly adapt API to match WPF, I've developed a workaround in 1.2 C# API, but it's quite unreliable, because it's very hard to determine what the event handler must be executed - they're all hooked to the single Storyboard instance! Please consider fixing it for 1.3. |
|
|
Hi guys, I've noticed you've fixed the signature for this method in v2.10 beta. |
|
|
Oh, no... You didn't. You just fixed the signature and actually even broken our hack with that change. Previously we've used a simple hack in NoesisGUI C# SDK by using TimelineEventArgs.Target property to determine the target object and then triggered Storyboard Completed event only for the particular control (storyboard Completed used everywhere in our code and in 99% of the cases this hack actualyl worked). But now you've dropped TimelineEventArgs completely and only regular EventArgs remains so we have no option for determining the storyboard target and our hack is not applicable anymore. I think the issue is because we're subscribing on the storyboard instances from the template. You're using them as singletones but WPF create separate instances. (described in first comment in this thread) Example of how we acquire the instances of the storyboards
As a workaround for this issue - maybe you can bring back TimelineEventArgs from 2.0.2f2? |
|
|
If you're curious about the hack/workaround we were using:
As you can see it's quite unreliable and requires some special handling in our code like this:
However it helped us to 100% reliably worakaround all the cases (and there are dozen of them). |
|
|
Sorry for breaking this. The change only affects C# layer and native code still provides the target in the event args. So while I think about how to properly solve it you can bring back TimelineEventArgs to apply your hack in Timeline.RaiseCompleted() function: [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)] CompletedHandler handler = _Completed[cPtr]; About the hack we should fix it in the native code but first I need to investigate a few things. |
|
|
Thanks, I will implement the hotfix back right now and continue testing last NoesisGUI beta. |
|
|
Oh, I see now. You said to use your new class and use manual marshalling. |
|
|
Yeah, that's right :) |
|
|
Ok, the workaround seems to work fine now. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-06-02 16:00 | ai_enabled | New Issue | |
| 2016-06-02 16:35 | sfernandez | Assigned To | => sfernandez |
| 2016-06-02 16:35 | sfernandez | Status | new => assigned |
| 2016-06-02 16:35 | sfernandez | Target Version | => 1.3.0 |
| 2016-11-02 08:40 | ai_enabled | Note Added: 0004221 | |
| 2016-11-02 08:41 | ai_enabled | Priority | low => normal |
| 2016-11-02 08:41 | ai_enabled | Severity | minor => major |
| 2018-01-13 08:12 | ai_enabled | Note Added: 0004986 | |
| 2018-01-13 08:13 | ai_enabled | Note Edited: 0004986 | |
| 2018-01-13 08:14 | ai_enabled | Note Edited: 0004986 | |
| 2018-01-13 08:25 | ai_enabled | Note Added: 0004987 | |
| 2018-01-13 08:39 | ai_enabled | Note Added: 0004988 | |
| 2018-01-13 08:41 | ai_enabled | Note Edited: 0004988 | |
| 2018-01-15 11:52 | sfernandez | Status | assigned => feedback |
| 2018-01-15 11:52 | sfernandez | Note Added: 0004993 | |
| 2018-01-15 11:52 | sfernandez | Note Edited: 0004993 | |
| 2018-01-15 11:52 | sfernandez | Note Edited: 0004993 | |
| 2018-01-15 12:44 | ai_enabled | Note Added: 0004994 | |
| 2018-01-15 12:44 | ai_enabled | Status | feedback => assigned |
| 2018-01-15 13:33 | ai_enabled | Note Added: 0004996 | |
| 2018-01-15 13:34 | sfernandez | Note Added: 0004997 | |
| 2018-01-15 14:37 | ai_enabled | Note Added: 0004998 | |
| 2018-11-01 02:14 | jsantos | View Status | public => private |
| 2018-11-20 19:51 | jsantos | Target Version | 1.3.0 => 2.2.0 |
| 2018-11-20 19:51 | jsantos | View Status | private => public |
| 2018-11-20 19:51 | jsantos | Platform | => Any |
| 2018-11-22 19:32 | sfernandez | Target Version | 2.2.0 => |