473,509 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Google Side Bar - Object reference not set to an instance of an object.

I'm using VB.NET to create an add-in for the Google Sidebar, and have
implemented the OnDetailsView method.
NOTE : I've come across this same problem (error message) even in C#.
I tried placing a label control and setting the reference of this new
lable into the 'details_control' parameter.
This worked.
How ever, when i tried creating a textbox control and setting the
reference of this textbox to details_control I got the below error
message (NOTE : I tried this even with a user control, button and panel
- but all gave the same error message).
Below is the error message:
-------------------------------------------------------------------
An unhandled except has occurred in a compnent in your application.
Click continue and application will ignore this error and attemp to
continue.
Object reference not set to an instance of an object.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.ActiveXImpl.InPlaceActivate(I nt32 verb)
at System.Windows.Forms.ActiveXImpl.InPlaceActivate(I nt32 verb)
at System.Windows.Forms.ActiveXImpl.OnFocus(Boolean focus)
at System.Windows.Forms.ActiveXImpl.OnFocus(Boolean focus)
at System.Windows.Forms.Control.ActiveXOnFocus(Boolea n focus)
at System.Windows.Forms.Control.OnGotFocus(EventArgs e)
at System.Windows.Forms.TextBox.OnGotFocus(EventArgs e)
at System.Windows.Forms.Control.WmSetFocus(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at
System.Windows.Forms.ActiveXImpl.System.Windows.Fo rms.IWindowTarget.OnMessa*ge(Message&
m)
at
System.Windows.Forms.ActiveXImpl.System.Windows.Fo rms.IWindowTarget.OnMessa*ge(Message&
m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
GoogleDesktopDisplayVBSample
Assembly Version: 1.0.2113.34762
Win32 Version: 1.0.2113.34762
CodeBase:
file:///D:/Development/VB.NET/Learn/Temp/WindowsApplication1/bin/GoogleDesk*topDisplayVBSample.DLL
----------------------------------------
Interop.GoogleDesktopDisplayLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase:
file:///D:/Development/VB.NET/Learn/Temp/WindowsApplication1/bin/Interop.Go*ogleDesktopDisplayLib.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c5619*34e089/system.windows.forms.dll
----------------------------------------
stdole
Assembly Version: 7.0.3300.0
Win32 Version: 7.00.9466
CodeBase:
file:///c:/windows/assembly/gac/stdole/7.0.3300.0__b03f5f7f11d50a3a/stdole.*dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f1*1d50a3a/microsoft.visualbasic.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.*dll
----------------------------------------
GoogleDesktopDisplayCSharpSample
Assembly Version: 1.0.2114.33663
Win32 Version: 1.0.2114.33663
CodeBase:
file:///D:/Development/GD_SDK/api/samples/GoogleDesktopDisplayCSharpSample/*bin/Debug/GoogleDesktopDisplayCSharpSample.DLL
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a*/system.drawing.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
-------------------------------------------------------------------
Below is the code i used to place a lable and a textbox on the detail
view of the content item.
This works, how ever, if i use a textbox, button, user control or any
other control i get the above error message.
Public Function OnDetailsView1(ByRef title As String, ByRef flags As
GoogleDesktopDisplayLib.GoogleDesktopDisplayDetail sViewFlags, ByRef
details_control As Object) As Boolean Implements
GoogleDesktopDisplayLib.IGoogleDesktopDisplayConte ntItem.OnDetailsView
Dim loControl As New Label
loControl.Text = "hello"
details_control = loControl
title = "This is the title"
flags =
GoogleDesktopDisplayDetailsViewFlags.GDD_DETAILS_V IEW_FLAG_TOOLBAR_OPEN
Or
GoogleDesktopDisplayDetailsViewFlags.GDD_DETAILS_V IEW_FLAG_NEGATIVE_FEEDBAC*K
Return False
End Function
Reply


Nov 21 '05 #1
0 929

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
22489
by: Martin | last post by:
I'd like to be able to get the name of an object instance from within a call to a method of that same object. Is this at all possible? The example below works by passing in the name of the object...
13
2725
by: Steve Jorgensen | last post by:
== On Error Resume next, and Err.Number == If you want to call one of your procedures from another procedure, and check for errors afterward, you mayimagine that you should write code something...
15
6719
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
0
1719
by: Patrick | last post by:
This is a C# post. I'm using VB.NET to create an add-in for the Google Sidebar, and have implemented the OnDetailsView method. NOTE : I've come across this same problem (error message) even in...
15
2452
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
3
4198
by: Adam | last post by:
We have a web site that uses .vb for the web pages and .cs for a class module. We are getting the error in .NET 2.0 and VS 2005 beta 2. It does work with .NET 1.1. When trying to access a page...
12
5505
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. ...
6
2467
by: Shailen Sukul | last post by:
Observed a weird behaviour with object references. See code listing below: using System; using System.Collections.Generic; using System.Text; namespace PointerExceptionTest { /*
2
2621
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7347
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.