Questions tagged [early-binding]

Early binding is a mechanism in which objects are declared to the compiler as being of a specific type.

Early binding is a mechanism in which objects are declared to the compiler as being of a specific type.

The specific type of an early bound object is known to the compiler at compile time. This means the compiler can determine if method calls are valid, before a program is run by an end user. This is contrasted with late binding, where objects are declared generically and errors are caught during runtime.

It is expected that questions tagged specifically relate to programming using early bound code. You should also tag your post with the specific programming language being used.

Example (VBA):

' early bound objects are declared as a specific type
Dim obj As Excel.Application
Set obj = CreateObject("Excel.Application")

Related Tags:

64 questions
0
votes
2 answers

Log Parser Early Binding

Is it possible to use early binding with LogParser.dll on VB6/VBA? When I try to set a reference to it, it just disappears with no error.
Oorang
  • 6,630
  • 1
  • 35
  • 52
0
votes
0 answers

How to maintain referential integrity in Postgres’s functions/stored procedures in light of schema changes

I don’t understand how to deal with schema changes and function definitions (which are by nature strings). For example, if I have a table called tablename1 and/or a column called columnname1, and these are referenced throughout my functions, how…
0
votes
1 answer

Event handler argument freezes in a loop

I'm working on a PySide6 application that uses a loop to create a number of pushbuttons and assign each a click event handler which is obtained by calling a static function in the loop and passing to it the pushbutton generated in that loop…
Manin
  • 29
  • 1
  • 3
0
votes
0 answers

Can you achieve early-binding through Cython?

One thing always confuses me, which is the counterintuitive dynamic / early binding of Python, especially when I have a for loop. I heard that Cython has some C language-style semantics, so I tried the following code, but I found that it is still…
init 1
  • 39
  • 6
0
votes
0 answers

PHP Early Binding - Is there an alternative to requiring the file?

Premble: I am using composer and autoloader with PHP 8. I have this class:
user1274113
  • 436
  • 8
  • 21
0
votes
1 answer

Excel VBA: How to use early binding with class module in Personal workbook

I have a class module in my project that I want to make available to other projects. I moved the class module to my Personal workbook. Following this Microsoft document, I added this function to the Personal workbook to be able to to create an…
GBMedusa
  • 131
  • 4
  • 10
0
votes
1 answer

What are the major and minor in creating early binding in pywin32?

from win32com.client import gencache gencache.EnsureModule('{00020813-0000-0000-C000-000000000046}', 0, 1, 2) The script generates early binding for the application with the clsid {00020813-0000-0000-C000-000000000046}. In the book Python…
Borut Flis
  • 15,715
  • 30
  • 92
  • 119
0
votes
1 answer

C++ early binding and late binding

I read about early and late binding in C++: int add (int x, int y) { return x+y; } int main() { int a=add(5,6);//early binding int (*p_add)(int,int)=add; int b=p_add(5,19); } Why can't int b=p_add(5,19) be resolved at compile time? We…
Aayush Neupane
  • 1,066
  • 1
  • 12
  • 29
0
votes
1 answer

Convert early binding code to late binding

I have difficulty converting early binding code to late binding. I have tried several times but it doesn't work properly. When it comes to early binding it works well. Here is my code and I'd like to ask you to show me how it should look like and…
Arkadiusz
  • 369
  • 5
  • 18
0
votes
1 answer

Trouble with different kinds of polymorphism

From what I learned so far, there are two kinds of polymorphism, compile-time, and runtime. In compile-time, the polymorphed function or operator is resolved by compiler, while in runtime, its resolved at runtime. Examples of compiile time…
0
votes
0 answers

Applying early binding on COM object in Excel

I'm using VBA macro to get data from 3rd part program named Simpack. Simpack supports the COM-interface. But how is it possible to learn early binding naming of program. For my current process i'm connecting with late binding such a type; Dim Srv As…
user8666372
0
votes
2 answers

Initialize a object with a derived class constructor

Consider the following C++ code: #include using std::cout; class A { public: int a; A():a(0) { cout << "A constructor\n"; } virtual void f() { cout << "f inside A\n"; } }; class C : public…
Radioga
  • 416
  • 1
  • 5
  • 16
0
votes
1 answer

static method behaving like other method those can override

On object of child class, static methos of super class are available but when we define same method in child class, now object of child class start pointing to child class method.this complete sounds like overriding but it is not,since static…
user4768611
0
votes
2 answers

Late Binding vs. Early Binding with Embedded Word Documents

I am having issues getting my embedded document to run on older version of MS Office. I believe the issue lies in how I am declaring my objects, but am unsure how to declare my embedded documents using late binding (I'm still very new to both this…
Sooji
  • 169
  • 3
  • 18
0
votes
1 answer

Why delay of 30 to 40sec on first load from ProductSet?

Crm Product entity contains 40,000 records. In CustomerPortal, I am simply fetching all products and bind them to Grid. For fetching query and binding code is like: var DataSource = from products in xrm.ProductSet select…