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
2
votes
1 answer

How to correctly type redux-thunk actions & mapDispatchToProps with redux 4.0.1, redux-thunk 2.3.0 & typescript 3.1.3

I'm updating the dependencies in my project (redux 4.0.1, redux-thunk 2.3.0, typescript 3.1.3) and I'm having a very hard time finding the correct typings for redux-thunk in both my action declaration as my mapDispatchToProps declaration. For…
Eadwine
  • 65
  • 9
2
votes
0 answers

Error:com.facebook.react.common.JavascriptException: should be set in constructor if stateful,

I released a APP and this crash error often happened but I have searched the whole internet and cannot find any information about this error. this is error log track: com.facebook.react.common.JavascriptException: should be set in constructor if…
chii
  • 2,111
  • 3
  • 17
  • 21
2
votes
5 answers

Load local JSON file async

I am new to swift and the sync/async way to load a file. I have a big JSON file in local, for an iPad app about football with the list and stats of football players. At the moment I load the whole list of players inside an array of dictionaries and…
dan
  • 77
  • 1
  • 10
2
votes
1 answer

dispatch is not defined no-undef

i am new to redux and i'm trying to dispatch an action from inside a function but it says "dispatch is not defined no-undef". Can anyone tell me what i'm doing wrong import React, { Component } from 'react'; import {connect} from…
Anita
  • 476
  • 3
  • 10
  • 24
2
votes
1 answer

How global functions on swift are compiled/dispatched?

I have seen other questions related to this topic but any of them has an explanation on how the compiler deal with these functions and how they are dispatched, if they behave like a inline function or what? Basically I would like to know the…
rgkobashi
  • 2,551
  • 19
  • 25
2
votes
4 answers

Use of multiple threads in a Java program and vs need to create Swing objects on EDT

Re: Requirement to create Swing Object on Event-Dispatch Thread. I am working on an application, the purpose of which is to monitor and display the condition of various remote embedded servers. I'm pretty new to Java, and my understanding of the…
Steve
  • 21
  • 1
2
votes
2 answers

How to use a Double Dispatch with overload in JAVA?

I'm trying to create a double dispatch in JAVA to use overloaded methods. public abstract class ComposantOrdi { protected void equiv(ComposantOrdi c){ Equivalence.equiv(this, c); } } public class Montage extends ComposantOrdi{ …
FL0Nn
  • 53
  • 1
  • 7
2
votes
1 answer

React-Redux-Thunk: actions does not return dispatch

I am using React Native with Redux-thunk middleware. My problem is dispatch function does not return the object and does not even console. Here is my actions file: function movieSelc(movie) { return { type: types.MOVIE_SELECT, …
Etoya
  • 239
  • 1
  • 7
  • 16
2
votes
1 answer

Must Dispatch to Main Thread in iOS 11

Prior to iOS 11 I was able to reload a table views data on the fly without having to dispatch the reload to the main thread. However, now that I am testing on a device that has iOS 11 installed it seems I have to dispatch every UI update to the main…
tentmaking
  • 2,076
  • 4
  • 30
  • 53
2
votes
1 answer

Idioms for enabling type dispatching

There's a few questions here, I would be satisfied if any one of them was answered sufficiently well. Background - what is the end goal? I am interested in representing a date-range in R. Bare-minimum requirement is that we represent a start and end…
Andreas
  • 1,923
  • 19
  • 24
2
votes
1 answer

Win32com.client.dispatch Python call Equivalent in C#

I have a 3rd party dynamically-linked-library given to me by a vendor. The library is object oriented. I'm currently trying to access this library from either .Net or C#, however, when trying to call methods, no methods are available in .Net Support…
5unnyr4y3
  • 85
  • 1
  • 2
  • 11
2
votes
0 answers

React Redux - using dispatch() outside component?

Is it possible to dispatch action outside React component? import dispatch from 'react'; ... dispatch(actionCreator()) or: bindActionCreators(actionCreator, dispatch)(); has no effect. (FYI, I am trying to invoke action from axios interceptor - I…
IProblemFactory
  • 9,551
  • 8
  • 50
  • 66
2
votes
1 answer

Clojure multimethod dispatch by java generics

Possible solution that I need: How to implement a multimethod for a collection of type like Map? Something like this: (defmethod multimethod Map [map] {(.key (first map)) (.value (first map))}) Whole…
Defake
  • 373
  • 4
  • 15
2
votes
0 answers

How to get a controller of API project from UI project with DispatchProxy in ASP.NET CORE

I have some projects in my solution, for example UI and API. I want to create a controller instance from the API project in my UI project without adding a reference from the UI project to the the API project. Like this: public T CreateProxy() { …
canmustu
  • 2,304
  • 4
  • 21
  • 34
2
votes
1 answer

react-redux redux-thunk: dispatch performance issue

There is application which uses react, redux, react-redux, redux-thunk. react: "16.0.0-alpha.6" redux: "3.6.0" react-redux: "5.0.2" redux-thunk: "2.1.0" Concept: Reducers: import { createStore, applyMiddleware } from 'redux'; import…
viktor_aky
  • 31
  • 5