Questions tagged [dynamic-binding]

Dynamic binding (aka dynamic dispatch) is the process of mapping a message to a specific piece of code (method) at runtime.

257 questions
0
votes
0 answers

C++: When is method redefinition preferred over virtual method override?

Do virtual methods bind statically when objects are not created dynamically? If virtual methods have the best of both worlds (static and dynamic binding when needed), what is the point of having non-virtual methods? In what cases would one prefer…
0
votes
1 answer

Cases of static and dynamic binding in C++

The following code has 4 classes: Base1, Derived1 (derived from Base1), Base2, Derived2 (derived from Base2). Both base classes have integer data1 and display_data() functions. Both derived classes have integers data1 and data2, and display_data()…
0
votes
1 answer

Vue - How to dynamically set a grid area name

I have a list of objects that I loop through and generate inside the template. Those objects need to be positioned differently inside the grid depending on the screen size. So I would like to use the grid-area property in CSS to define their…
Stephen
  • 913
  • 3
  • 24
  • 50
0
votes
1 answer

Question about dynamic binding, Objective C and methods

According to Apple's Objective C guide, methods with the same name all use the same selector and that they need to have the same return type as well as parameters. Then there is something about "static typed" methods being the exception. So is it…
AndIWonder
  • 43
  • 2
0
votes
1 answer

Bind TabIndex property of WPF dynamically

i need to create below mention code at runtime in Wpf i.e. create AutoCompleteBox dynamically set size, width, location etc dynamically. Then set TabIndex dynamically. How to do this.
Shashank
  • 6,117
  • 20
  • 51
  • 72
0
votes
1 answer

Dynamic binding for two arguments

This question concerns design patterns, and in particular dynamic binding, in statically typed languages (I use Kotlin here, but it could also be C++ or Java). The problem is as follows: I have an interface Node (representing nodes in an Ast) and…
Searles
  • 1,447
  • 1
  • 11
  • 26
0
votes
1 answer

I'm trying to make a derived class method available through a base class reference

I'm trying to call a derived class method with a base class reference but I do not want to implement it in the base class or other derived classes. Only in that one derived class. One alternative I looked into was to declare the function and base…
ndubs18
  • 11
  • 2
0
votes
1 answer

c++ particle system inheritance

i'm creating particle system and i want to have possibility to choose what kind of object will be showing on the screen (like simply pixels, or circle shapes). I have one class in which all parameters are stored (ParticleSettings), but without those…
Tojmak
  • 155
  • 1
  • 7
0
votes
1 answer

Is there a method to bind Tabulator to a dynamically created

I am attempting to bind an instance of the Tabulator plug-in to a dynamically created
element but to no avail. I have no issue binding Tabulator to static elements created with the page load event; however, I need to be able to dynamically…
R Powell
  • 99
  • 1
  • 10
0
votes
1 answer

Polymorphism example? (Substitution principle and late dynamic binding)

Below is a snippet of my code and I can’t decide whether or not it is an example of Polymorphism. Class hierarchy 1 Within my Player class (This is a subclass of Character) there is a method called showStats(). public String showStats(){ //…
Notorious
  • 41
  • 1
  • 7
0
votes
1 answer

Azure Java Function, Get HttpTrigger body attribute value in BlobOutput path annotation

I have a HttpTrigger function with request body as { "id":"222", "name":"some name" } I want to get the Id from request body into @BlobOuput path like below @BlobOutput(name="blob", path="input-blob/{body.id}") Is there any way to achieve this…
Usman Ali
  • 58
  • 4
0
votes
1 answer

Trying to use a virtual function in my initialization list

I am trying to create a base and a derived class with a const member that has to be initialized: class baseClan { public: baseClan(const string firstName) : fullName(createFullName(firstName)) {} private: const string lastName =…
PF Chang
  • 47
  • 6
0
votes
0 answers

Why there isn't a dynamic binding in the method arguments in Java?

I am wondering why there isn't a dynamic binding in Java in method arguments? Example: static class C { public static void test(C c) { System.out.println("C"); } } static class D extends C { public static void test(D d) { …
0
votes
2 answers

Why is dynamic binding necessary?

I cannot figure out why do we need dynamic binding (late binding). Let's say we have Class A and Class B and lets say that class B extends class A, now we can write stuff like "A var= new B();" Now let's say that both classes contain method with the…
Harry
  • 101
  • 5
0
votes
1 answer

How to update(reload) columns of kendo grid after datasource read method?

I have Kendo MVC grid and the columns of the grid are dynamic based on the model that gets filled on the datasource read method. I need to loop through the dynamic columns to generate it on the grid. I have kept autobind(false) and have called the…
Shubhankar Bapat
  • 81
  • 1
  • 1
  • 8