wxStringProperty not consuming key down events - event-handling

I am creating an editor using wxWidgets and handle key down events in the wxApplication-derived class. However, when I have a wxStringProperty focused by the user, the key presses are still handled by the application event handler. For example, if I press DELETE to delete a character in the string property text field, the event handler receives that DELETE key down event.
How do I make the wxStringProperty consume all key down events when it is focused so that the app doesn't receive any?

Related

Flutter Blocs quick events leads to data loss

I am new to flutter and the famous flutter_bloc library. I have created a chat system based on the BLoC pattern :
A widget fires an event to chatBloc
The chatBloc catches the event, process it and call chatRepository
ChatRepository adds the message as a draft in its messageList variable and then sends the message to the API
ChatRepository receives the message from the API when it is done and replaces the draft within its messageList variable
ChatBloc yields its final state and the page rebuilds
Everything works fine as long as no more than one message is processed at a time.
If my button widget fires two quick events, they will overlap and so the second event will fire while the first event is still in progress. By the time when the second event starts, the first message is still a draft, so when message 2 completes and chatRepository updates its messageList, it will treat message 1 as a draft even if it has been validated.
At this point I'm asking myself if I made a mistake or if I'm trying to do it the wrong way.
Would it be better to create a queue and process messages in the background one by one ?
Thank you for your help !

Why my actions on Google doesn't recognize touch selection?

I'm writing a simple action on google without any webhooks. Every response is generated by dialogflow.
I have an intent that works flawless if I call it by speech or type but if I call it by selecting it from a list it doesn't work and the Default Fallback is called.
In the simulator it show the right "text" when I click on the list.
Have I done something wrong or did I need to specify something in the list?
This is how the list is generated
This is my intent
This is what happens in the simulator if I click on the "easyTravel" item in the list (it trigger the default fallback intent)
This is what happens in the simulator if I type "easyTravel" (the right intent is executed)
To catch a click on a list I need an intent configured to be triggered by the event actions_intent_OPTION
Only once I read this question - and your anwser - I could fix my own problem. Just to share: if you are using a webhook and are waiting for a webhook actions in your script, you can create a new intent, which has the event as #Edo states: actions_intent_OPTION. If you define an action in that intent, this is what will be trigger by your webhook. You can then get the parameter by (node.js):
const param = app.getSelectedOption();
Without the 'empty' intent, with the event and action, I was not receiving any input.

How does feathers sequelize work

I'm using angular2 on frontend, node/feathers on backend over Postgres (sequelize) db.
On backend I have events service on ".../events" route, and I'm trying to reach data from db, it works fine when I want to retrieve all events so I just make request on this route.. or when I want to retrieve just one event with certain id (make request on "../events/>>id<<). But how to get data by other attributes, for example I have user and its in association with event one to many, so how would I retrieve all events for one user (search by user id, not by events id). Or any other attribute, for example by name, return all events with certain name. How would that work, any code example?
In events model I have relation with user as one to many (event has creator) and I made that connection as events.belongsTo(user). How can I add that this same event has also many to many relation with users cause it has also attribute "participants" as users that are also included into this event, and every user can participate or own many events.
Found it myself, just add ?attribute=value... so if i want all events owned by user with id 1... it would be ".../events?userId=1 ... and this would return me all the events with userId=1... same goes with any other attribute –

Carousel and list in Dialogflow

I have a question about the Carousel and list selector. How to use actions.intent.OPTION in Dialogflow for Actions on Google? I have tried adding actions_intent_OPTION in event section of every intent that the user will be selecting. But every time the response came from a single intent.
An API.AI/Dialogflow event tends to override anything that may have been "said" by the user, so Dialogflow's processing stops when it gets the first event that matches and handles that as the Intent. Option processing tends to be done in fulfillment. Rather than trying to match the option key or title against any phrases, anything said that matches the title or key will return the key as the matched "phrase".

Swift Application URL Handler

I am trying to determine from which application did my application get launched. I have created the app to handle http(s) requests and registered a URL handler within the applicationWillFinishLaunching. This is all working as expected. Within the event handler the first parameter is an Apple Event Descriptor, which has 2 items. The first is the URL that was clicked on. The second item is also an Apple Event Descriptor and it contains a data structure with the name and the identifier of the previous application.
For example, if I was in Mail and clicked on a URL. The URL is in the first Event Descriptor. When converted to a string, the second descriptor contains a bundle identifier and agent name in a dictionary.
Is there a way to parse the second event data structure to retrieve the information?