SignaturePad does not accept setting the strokes directly - xamarin.forms

Working with the Xamarin SignaturePage control (github). It captures signature strokes exactly as expected, which we then serialize and store. When we deserialize the strokes and try to restore them within the control, it just "doesn't take."
We set SignaturePad.Strokes = strokes where strokes is a complete array of Xamarin.Forms.Point arrays. But when we check the Strokes value after setting it, it is always empty, as if it had not been set.
We've gone as far as trying to build the source code to find the error but were unable to build it. Does anyone have any other ideas of what could be wrong?
Thank you for your help!

Related

How can I get a Clip object for a ClipLauncherSlot?

I have a ClipLauncherSlot in Bitwig API, and I'd like to get ahold of the Clip within it so I can transpose it on user input.
The docs aren't online that I know of, so I can't link to them. But extensive searching has yielding absolutely no way of getting ahold of Clip objects in general.
I think you're supposed to work with a CursorClip.
Instead of directly accessing the clip, you access it through a CursorClip. The CursorClip will follow your selection and always represent the currently selected clip.
Something like this:
CursorClip cursorClip = host.createLauncherCursorClip()
clipLauncherSlot.select()
// Now your cursorClips represents the desired clip.
cursorClip.transpose()
Not entirely sure about the exact implementation, maybe you have to do some additonal steps for the cursor to correctly follow, but something like this should work.
See also here: https://www.kvraudio.com/forum/viewtopic.php?t=550738 for a similar problem. They had some problems with execution time, keep that in mind if you run into unexpected behaviour.

In a KeyEvent handler, I want to know the Node under the cursor

My code stops at a breakpoint when I type a certain character, so that I can inspect things in the debugger. (I use an event filter to do this.)
It would be nice to be able to inspect the Node that was under the cursor when I typed the character.
I can’t see how to do this.
Apparently I can use MouseInfo.getPointerInfo().getLocation() to get the cursor x,y, but I can’t see how to go from x,y to the frontmost intersecting Node. I suppose I could maintain a set of all nodes and go through them brute-force, but it seems to me there must be a more elegant solution.
UPDATE
At this question, JavaFX 2.2 get node at coordinates (visual tree hit testing), I found an FX bug report,
FX should provide a Parent.pick() routine, which led to another bug report, Make impl_pickNode public., which led to this StackOverflow answer,
https://stackoverflow.com/a/16279603/1390116
That trick, however seems to work only when already in a MouseEvent dragged handler. I don't see how that will get me what I need from a KeyEvent handler.

How do I get the QDrag hotspot value in the dropEvent function?

I'm somewhat new to Qt, and I'm using Qt 4.8 to implement a graphical editor of sorts. Right now I've implemented dragging of rectangles around my widget using drag&drop. In my mousePressEvent function I generate a QDrag with appropriate MIME data (similar to the puzzle sample), and I just added a 'setHotSpot' call.
The dragging works just fine, but in my dropEvent function, I can't figure out a way to get back to the hot-spot setting in the original QDrag object - I don't appear to have access to it.
I've solved it for the moment by stuffing the hot-spot point into my MIME data (it's custom data anyway), but that seems wrong to me - it seems to me that there'd be some way within the Qt framework for me to get that hot-spot data in my dropEvent function.
please check the following example in Qt.
http://doc.qt.io/qt-4.8/qt-draganddrop-fridgemagnets-example.html
this example shows how to use drag an drop events in Qt.
In that example we see that adding the hot-spot's point to the MIME data does in fact appear to be the recommended way to get the hot-spot point from where the drag is initiated do the dropEvent.
I don't understand what you are trying to achieve...
The "hotspot" point is just an offset point relative to the pixmap representing the data being dragged, and thus is constant during the whole drag.
If you are looking for the initial drag point, you should indeed encode it into the mime data.

BizTalk messages overwriting each other?

I have an odd situation that has only come up in this one orchestration I'm working on.
I have a Receive message come in. I use an Expression shape and write it to a variable "xmlDoc" so I can verify what is in it. I then have a Message Assignment shape where I Load a string of XML to a variable "xmlDoc2" and assign that variable to a second message and write it out so I can verify it. I then have another Expression shape and attempt to write out the first message again and it's apparently been replaced with the second message information.
It's not in a Parallel shape, and the Message Assignment is only building the second message. Between the receive and where I'm seeing this issue, I'm doing a few Decide shapes and building other messages from the Receive message. They all work fine and don't overwrite anything (do the same processes as what I'm trying to do later.)
Anyone seen this before or see something I'm missing?
ETA: The process works a bit like this:
Send Message comes in
xmlDoc = Send Message
xmlDoc.OuterXml is written to a table
xmlDoc2 = "<root><xml></xml></root>"
Second Message = xmlDoc2
xmlDoc2.OuterXml is written to a table
xmlDoc = Send Message <-- What should happen
xmlDoc = Second Message <-- What is happening
I could not reproduce your exact problem but I got close. I think there are some implied statements in your process outline that would be critical for us to understand what's really happening. In any case, I think your BizTalk messages do not get overwritten, but that the XmlDocument variables are.
I think you may have been hit by one of the fundamental confusions a developer coming from a Java or VB6 background encounters when working with C#.
C# is a Managed Language
Please, remember that C# is a managed language, in that it uses a garbage collector to reclaim unused references to objects. The key word here is Reference.
When you write the following lines:
xmlDoc2 = "<root><xml/></root>";
SecondMessage = xmlDoc2;
Basically, you have two references to the same content. Namely, two references xmlDoc2 and SecondMessage which refer to the assigned string.
So, depending upon the code you use to "write out" the XML content of your BizTalk messages, you may be overwriting some references.
Furthermore, if this happens in the context of a Construct shape, you may be inadvertently overwriting the content of the BizTalk message itself.
A Solution?
This problem does not usually manifest itself when working with BizTalk. I personally never encountered this issue.
If you update your original question with the exact code for both Expression shapes and the Assignment shape, I'll update this response with more appropriate guidance.

TypeError: Error #1009 - (Null reference error) With Flash

I am not an expert in flash, but I do work with AS and tweak Flash projects, though not having deep expertise in it. Currently I need to revamp a flash website done by one another guy, and the code base given to me, upon execution is throwing the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at NewSite_fla::MainTimeline/__setProp_ContactOutP1_ContactOut_Contents_0()
at NewSite_fla::MainTimeline/frame1()
The structure of the project is like, it has the different sections split into different movie clips. There is no single main timeline, but click actions on different areas of seperate movie clips will take them between one another. All the AS logic of event handling are written inline in FLA , no seperate Document class exists.
Preloader Movie clip is the first one getting loaded. As i understood the error is getting thrown initially itself, and it is not happening due to any Action script logic written inline, because it is throwing error even before hitting the first inline AS code.
I am not able to figure out what exactly is causing the problem, or where to resolve it. I setup the stuff online, for reference if anybody want to take a look at it, and here is the link. You need to have flash debugger turned ON in your browser, if need to see the exception getting triggered.
I really got stuck at this point. Any help will be great. I had not seen the particular solution I am looking for anywhere yet, though Error #1009 is common.
Did you set the option "Export at frame 1" for the classes in your library?
I get this error for instance:
I have a circle which is a Circle class and put it on Frame 10.
If I try to attach a eventHandler to it from frame 1, I get this error.
Set the option "Export at frame 1" for my Circle class will solve this issue for me.

Resources