Questions tagged [dispatch]

Dynamic dispatch (also known as dynamic binding) is the process of mapping a message to a specific sequence of code (method) at runtime. This is done to support the cases where the appropriate method cannot be determined at compile-time (i.e. statically).

Dynamic dispatch is only used for code invocation and not for other binding processes (such as for global variables) and the name is normally only used to describe a language feature where a runtime decision is required to determine which code to invoke.

This Object-Oriented feature allows substituting a particular implementation using the same interface, and therefore it enables polymorphism.

http://en.wikipedia.org/wiki/Dynamic_dispatch

974 questions
0
votes
1 answer

React Redux request for Form options

What is the proper way to make an async request for form drop down options? Have a large amount of drop down options, say cities for sake of example. Do we want these stored in state? Normally we would create Redux action making request for…
csi
  • 9,018
  • 8
  • 61
  • 81
0
votes
1 answer

Double dispatch inside a single inheritance tree

I have an inheritance tree of different Line-classes, starting with the abstract Line-class. I want to be able to intersect each line with each other line, and sometimes, I do not know neither of the runtime types, e.g. I'm calling…
Timitry
  • 2,646
  • 20
  • 26
0
votes
0 answers

UI Mapkit lag when addAnnotation called

I don't understand why the UI is not responding during 1 or 2 second (the time to get data from database) and this happen every 5 seconds even if I use DispatchQueue. I use UIMapKit for the map and Firebase to get data. So, in the viewDidLoad() of…
wolfyiy
  • 13
  • 4
0
votes
1 answer

In Redux, replace dispatch in action creator

Given my action creator: export const REQUEST_ARTICLES = 'REQUEST_ARTICLES' export const RECEIVE_ARTICLES = 'RECEIVE_ARTICLES' export const CHANGE_PAGE = 'CHANGE_PAGE' export const changePage = (currentPage) => ({ type: CHANGE_PAGE, …
Benjamin Li
  • 1,687
  • 7
  • 19
  • 30
0
votes
0 answers

ObservableCollection Dispatcher Issue in WPF

I have a extension for an application, so that my program is actually a DLL that was created in WPF. This extension works with Windows Explorer. So, when i open first time, everything seems fine but i open a new windows explorer and then a…
ertan2002
  • 1,458
  • 1
  • 32
  • 68
0
votes
0 answers

redux not picking up an object dispatched via actions

I created a rootSaga in sagas.js as function* fetchStuff(action) { try { yield put({type: 'INCREMENT'}) yield call(delay, 1000) yield put({type: 'DECREMENT'}) const highlights = yield call(API.getStuff,…
M.Holmes
  • 403
  • 1
  • 7
  • 22
0
votes
1 answer

CreateJS eventlistener not working properly

I have the following code: class classA { constructor() { createjs.EventDispatcher.initialize(classA.prototype); this.addEventListener("someEvent", function(evt) { console.log("classA has detected something has…
Parad0x13
  • 2,007
  • 3
  • 23
  • 38
0
votes
1 answer

Servlet - Dispatching request when the url-patern is like

I have some questions about dispatching a request in a servlet. To sum it up, I deployed a website on a public server which forces me to have a url-pattern like /servlet/* for all my servlets (I heard that it was a default configuration anyway). The…
Sampawende
  • 13
  • 4
0
votes
1 answer

Update depatch error while remote deployment to GAE via Eclipse plugin

I'm using Google Plugin for Eclipse to deploy my app to GAE. During "Deploy to Remote Server", console show me below error 95% Closing update: new version is ready to start serving. 98% Uploading index definitions. 99% Skipping dispatch.xml -…
songjing
  • 545
  • 4
  • 22
0
votes
1 answer

Thread for StringbyEvaluatingJavascript Function

I'm sending a value to javascript and then javascript return a result to me. However, It takes time so that the return value (b) stay null because javascript func needs time. I think I needed to create a thread to wait the result. Below code also…
0
votes
3 answers

How to dynamic cast from base to child class when the child is stored on a vector of base pointers

I have shared pointers of Child objects stored in a Vector of Base shared pointers and I need to dynamically cast the elements of the Base vector to its Child type, such that I can invoke function with Child specific signature. An example follows…
user1221647
  • 65
  • 1
  • 11
0
votes
0 answers

Migrating dispatch_group_leave() to Swift 3

I'm trying to migrate the code below to Swift 3. func fetchTemplatesForField(_ fieldId: Int, entryGroupId: Int? = 0, templateFieldResponseDelegate: TemplateFieldResponseDelegate) -> Void { // Dispatch group will maintain the entry and exit of…
Lastmboy
  • 1,849
  • 3
  • 21
  • 39
0
votes
3 answers

iOS Objective-C equivalent of Win32 PeekMessage/Translate/Dispatch

In Windows, it is possible to run events within code .. //PeekMessage loop example while (WM_QUIT != uMsg.message) { while (PeekMessage (&uMsg, NULL, 0, 0, PM_REMOVE) > 0) //Or use an if statement { TranslateMessage (&uMsg); …
B. Nadolson
  • 2,988
  • 2
  • 20
  • 27
0
votes
1 answer

React Redux action creator dipatched twice on one call

the following code works perfectly: const onMenuItemClick = (item) => { return { type: "MENU_ITEM_CLICKED" } this code dispatches the action twice: const onMenuItemClick = (item) => { document.getElementById("menu-button").click(); return { …
Wolfgaung
  • 53
  • 5
0
votes
1 answer

How to stop backgroundUpdateTask?

Here is code which I execute in background when user close the app, but it is weird behavior , after endBackgroundUpdateTask() method is executed , DispatchQueue still doesn't stops... I steel continuos get notification. What am I doing wrong? you…
Sirop4ik
  • 4,543
  • 2
  • 54
  • 121