CAA unknown push button notification - push-notification

is it possible to catch notification from unknown push button with CAA? I mean I need to catch notification from an Edit-button in macro dialog.
Thank's for your help.

CAA isn't really meant to do that.
However, you probably can do this by "hooking" Catia and then watching for the windows message.
We use hooking to detect when Catia is being resized or minimized. You should be able to do it to find the message from your button.
Here is some information on hooking.
We use VB.NET. Hooking in C++ looks like less fun.

Related

Swift 5 - textField.endEditing(true) crashing the app

I'm using Number Pad keyboard and I programmed, when there is no text, when you press "Delete button" to trigger the function .endEditing , but the app crashes with this error:
Push segues can only be used when the source controller is managed by an instance of UINavigationController.
.resignFirstResponder() also crash with this error
I've tried adding a delay timer, but also crash.
changed to .endEditing(false) also crash.
Any suggestions without adding UINavigationController ? I can't afford to use UINavigationController, since my app must use the whole screen and I need all the space on it.
I've added UINavigationController and I hide it... If there are more options, feel free to share it :)

JavaFX Properly Closing a Popup

So I am just wondering if anyone knows the correct way to close a popup in JavaFX 8. For example if I have a cancel button on my popup what method should I use to get rid of the popup when the cancel button is pressed? I am currently just using the hide() method. This scares me a little bit because I am not sure if the popup is lingering in the background somewhere and still needs to closed. However, when I look at the java docs here I don't see any close() method, I also don't see a close() method in my IDE autocomplete. I do see onCloseRequest() and such in the docs though, so I guess my real question is this; does the hide() method close the popup? If not what does? Thanks!
Yes, hide() is enough.
Also make sure you don't store any reference to the Popup once you don't need it anymore, so that it can be garbage collected.

Button with Minim/Processing to play sound

I have been trying to play a sound on my laptop by pressing a homemade button on my Arduino.
Now I found this example code to play a file with Minim.
I want to know where I can trigger the button in the code, to play the sound.
Can somebody help me?
Try By looking here Arduino and Processing
This page explains communication examples and how to communicate between arduino and processing
And then you just need to call "player.play();"(from the example you need to remove it)
once the user presses the button

Programmatically close an AIR application

I would like to know the correct way to close an AIR application programmatically.
In my Spark WindowedApplication I have:
this.addEventListener( Event.CLOSING, shutdownApp );
and of course an implementation of the shutdownApp method (which basically tidies up temporary files).
This works fine for the top-right close button of the window. However I also have functionality which needs to shutdown the application. Within the code I have called:
NativeApplication.nativeApplication.exit();
However this doesn't trigger the Event.CLOSING method, and so my temporary files are not cleared up. Should I not be calling nativeApplication.exit ? If so, what should I call instead? I'd rather not have to call my shutdownApp method before the NativeApplication.exit() as this doesn't feel quite so elegant.
Can anyone shed any light on the correct way of doing this?
Thanks,
Phil
I know this question has been answered and accepted, but thought I'd share, I use.
stage.nativeWindow.close();
The documentation looks a bit ambiguous on this and I would have the same interpretation that you did. Did you try the close or exit methods on the WindowedApplication?
Something like this, with FlexGlobals and topLevelApplication:
(FlexGlobals.topLevelApplication as WindowedApplication).close();
or
(FlexGlobals.topLevelApplication as WindowedApplication).exit();
Just give an answer here because I searched for a related question and was not able to find sth.
I wanted to do something similar and close an AIR application when the native close button of the document window (spark.components.Window) is pressed thought that the spark WindowedApplication container (the applications main window) is still active to hold and manage the native menu (at application startup it is also used to display a splash screen. It has to stay open since if it is closed the native menu won't show up or be accessible anymore so its visible property is just set to false).
My main problem was the window closing event. Registering it with ActionScript like
this.addEventListener(Event.Closing, windowClosed);
does not work: No closing event was dispatched.
The only way was to register an event handler directly in the s:Window element at start of the MXML file. I just throw in the closing attribute:
closing="window1_closingHandler(event)"
The event was dispatched then and in window1_closingHandler-function I called
NativeApplication.nativeApplication.exit();
That works for me and shuts down the whole application.

iOS Advanced Gestures: Getting Swipe Direction Vector

Looking through the documentation, it seems that the new advanced gestures API doesn't determine the direction of a swipe beyond the basic { left, right, up, down }.
I need the start point of the swipe and the direction.
Is there anyway to retrieve this other than coding my own advanced gesture library from scratch out the basic gestures?
And if this is my only option, could anyone point me to some open source code that does this?
Got it! Documentation is here, under 'Creating Custom Gesture Recognizers' at the bottom.
Basically the six gestures Apple provides all derive from UIGestureRecognizer, and you can make your own gesture recogniser in the same way.
then, inside your view's init, you hook up your recogniser. and just the act of hooking it up automatically reroutes incoming touch events.
Actually, the default behaviour is to make your recogniser an Observer of these events. Which means your view gets them as it used to, and in addition if your recogniser spots a gesture it will trigger your myCustomEventHandler method inside your view (you passed its selector when you hooked up your recogniser).
But sometimes you want to prevent the original touch events from reaching the view, and you can fiddle around in your recogniser to do that. so it's a bit misleading to think of it as an ' observer '.
There is one other scenario, where one gesture needs to eat another. Like you can't just send back a single click if your view is also primed to receive double clicks. You have to wait for the double-click recogniser to report failure. and if it is successful, you need to fail the single click -- obviously you don't want to send both back!

Resources