late-binding

Action<T> to call a method based on a string value

Is there a way to use Action to call a method based on a string value that contains the name of that method? ...

Is it possible to overuse late static binding in PHP?

Starting with version 5.3, PHP supports late binding for static methods. While it's an undoubtedly useful feature, there are only several cases where its use is really necessary (e.g. the Active Record pattern). Consider these examples: 1. Convenience constructors (::create()) class SimpleObject { public function __construct() {...

Late binding an Object in VBA

I am getting the "run-time error 429" in my attempt at late binding to the VBProject object: Dim vbProj As Object Set vbProj = CreateObject("ActiveDocument.VBProject") Is there something fundamental I am failing to understand? For example, how would you write the code in article 308340 to use late binding?: Sub CheckReference() ...

What exactly is late-static binding in PHP?

Hello, What exactly is late-static binding in PHP? ...

vb.net reflection vs. late binding?

What should be more proper or what is recommended to use in VB.NET from either reflection vs. late binding: 'Type can be various objects that have a common property for sure.' Dim type = sender.GetType() Dim prop = type.GetProperty("Text", 20) Dim value = property.GetValue(sender, Nothing) versus: Dim value = sender.Text ...

Is there any way to use Late Bound Profile objects with the .NET Custom Profile Provider.

I am attempting to write a Custom Profile Provider for use in a multi-site CMS. In order to make the CMS more generic I was trying to allow you to specify the Profile that you wish to use on a site by site basis. The profile to use is stored in the database with the namepace and class name. When a user access something that requires t...

How to access Microsoft Word existing instance using late binding

Hi, i am developing some code in c# where i will be interacting with Microsoft Word. I want to be able to have the option of re-using an existing instance or as an alternative creating a new instance. Keeping in mind i want to do all of this using LATE BINDING... it is safe to say i have figured out how to get things working when creati...

php: get the name of an inheriting class in a static method

Okay, the post title might be a little confusing. I have this code: class A { public static foo() { return get_called_class(); } } class B extends A { } class C { public function bar() { echo B::foo(); } } Output: C WHat I want to get in foo() is the class name of B. How can I do this without chang...

Implicit casting in VB.NET

The question is intended for lazy VB programmers. Please. In vb I can do and I won't get any errors. Example 1 Dim x As String = 5 Dim y As Integer = "5" Dim b As Boolean = "True" Example 2 Dim a As EnumType = 4 Dim v As Integer = EnumType.EnumValue Example 3 Private Sub ButtonClick(sender As Object, e As EventArgs) Dim btn ...

Why should I prefer OSGi Services over exported packages?

Hi, I am trying to get my head around OSGi Services. The main question I keep asking myself is: What's the benefit of using services instead of working with bundles and their exported packages? As far as I know it seems the concept of Late Binding has something to do with it. Bundle dependencies are wired together at bundle start, so t...

C# - Disable Dynamic Keyword

Is there any way to disable the use of the "dynamic" keyword in .net 4? I thought the Code Analysis feature of VS2010 might have a rule to fail the build if the dynamic keyword is used but I couldn't fine one. ...

C# Late Binding for Parameterized Property

I'm trying to use late binding to connect to a COM automation API provided by a program called Amibroker, using a C# WinForms project. So far I've been able to connect to everything in the API except one item, which I believe to be a "parameterized property" based on extensive Googling. Here's what the API specification looks like acco...

Is there a way to get Visual Studio to provide intellisense for late-bound objects in classic ASP?

I'm working on a Classic ASP (with VB Script) project where I'm instantiating an object from an ActiveX control like so: Dim objHelper Set objHelper = Server.CreateObject("HelperLib.HelperObj") Visual Studio 2005 provides intellisense for the first "layer" of properties and methods, but it can't seem to see properties and methods that...

Interpreted vs. Compiled vs. Late-Binding

Python is compiled into an intermediate bytecode(pyc) and then executed. So, there is a compilation followed by interpretation. However, long-time Python users say that Python is a "late-binding" language and that it should`nt be referred to as an interpreted language. How would Python be different from another interpreted language? Co...

How do I dynamically load raw assemblies that contains unmanaged code?(bypassing 'Unverifiable code failed policy check' exception)

I'm going to give an example of using System.Data.SQLite.DLL which is a mixed assembly with unmanaged code: If I execute this : var assembly= Assembly.LoadFrom("System.Data.SQLite.DLL") No exceptions are thrown, but if I do this : var rawAssembly = File.ReadAllBytes("System.Data.SQLite.DLL"); var assembly = Assembly.Load(rawA...

Problem with late binding!

Hi everyone, i was asked this question in an interview. late binding is dynamically identifying the symbol during the runtime as far as my knowledge is concerned.please correct me if i am wrong. i was asked a question like what are some of the problem that we would face when we use late binding in c++. i was actually out of my own ide...

late binding in C

How can late binding can be achieved in c language? can anybody please provide an example. i think it can be achieved using dlopen and dlsym but i am not sure about it.please correct me if i am wrong! ...

VB.NET: impossible to use Extension method on System.Object instance

Can I make an Extension method for all the subclasses of System.Object (everything)? Example: <Extension> Public Function MyExtension(value As Object) As Object Return value End Function The above functions won't work for object instance: Dim myObj1 As New Object() Dim myObj2 = myObj1.MyExtension() The compiler does not accept...

WebBrowser Issue with Late Bind object/property names

There are issue with using WebBrowser late bind calls related to object/property names generation. For example: WebBrowser1.Document.DomDocument.Forms.Myform.mycontrol.Value = "test" will fail with more than one instance of the WebBrowser control what actually happen is that mycontrol object become Mycontrol and compiled vb.net appl...

Delphi CreateOleObject events

Hello there is a code var myobject:OleVariant; begin myobject:=CreateOleObject('SomeNamespace.SomeClass'); end; this com object has event OnClick for example. How must I connect to them without importing tlb? Regards, Yuriy ...