473,499 Members | 1,862 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.

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 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 label 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 new bool OnDetailsView(out string title,

out GoogleDesktopDisplayDetailsViewFlags flags, out object detailsControl) {

Label loLabel = new Label();

loLabel.Text = "Hello there";
detailsControl = loLabel;//details;

title = heading;

flags =

GoogleDesktopDisplayDetailsViewFlags.GDD_DETAILS_V IEW_FLAG_TOOLBAR_OPEN |

GoogleDesktopDisplayDetailsViewFlags.GDD_DETAILS_V IEW_FLAG_NEGATIVE_FEEDBACK;

return false; // return false to show details view, true to cancel it.

}

Nov 17 '05 #1
0 1714

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

Similar topics

6
22487
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
2721
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
2450
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...
0
925
by: Patrick | last post by:
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...
12
5502
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
2466
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
2619
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
7012
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
7225
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
7392
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
5479
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,...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3105
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
1429
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 ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
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.