473,804 Members | 3,153 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_contro l' 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.NullRefe renceException: Object reference not set to an instance
of an object.
at System.Windows. Forms.ActiveXIm pl.InPlaceActiv ate(Int32 verb)
at System.Windows. Forms.ActiveXIm pl.InPlaceActiv ate(Int32 verb)
at System.Windows. Forms.ActiveXIm pl.OnFocus(Bool ean focus)
at System.Windows. Forms.ActiveXIm pl.OnFocus(Bool ean focus)
at System.Windows. Forms.Control.A ctiveXOnFocus(B oolean focus)
at System.Windows. Forms.Control.O nGotFocus(Event Args e)
at System.Windows. Forms.TextBox.O nGotFocus(Event Args e)
at System.Windows. Forms.Control.W mSetFocus(Messa ge& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.TextBoxBa se.WndProc(Mess age& m)
at System.Windows. Forms.TextBox.W ndProc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at
System.Windows. Forms.ActiveXIm pl.System.Windo ws.Forms.IWindo wTarget.OnMessa *ge(Message&
m)
at
System.Windows. Forms.ActiveXIm pl.System.Windo ws.Forms.IWindo wTarget.OnMessa *ge(Message&
m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr 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
----------------------------------------
GoogleDesktopDi splayVBSample
Assembly Version: 1.0.2113.34762
Win32 Version: 1.0.2113.34762
CodeBase:
file:///D:/Development/VB.NET/Learn/Temp/WindowsApplicat ion1/bin/GoogleDesk*topD isplayVBSample. DLL
----------------------------------------
Interop.GoogleD esktopDisplayLi b
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase:
file:///D:/Development/VB.NET/Learn/Temp/WindowsApplicat ion1/bin/Interop.Go*ogle DesktopDisplayL ib.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__b77 a5c5619*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__b03 f5f7f11d50a3a/stdole.*dll
----------------------------------------
Microsoft.Visua lBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f1*1d50a3a/microsoft.visua lbasic.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__b77 a5c561934e089/system.*dll
----------------------------------------
GoogleDesktopDi splayCSharpSamp le
Assembly Version: 1.0.2114.33663
Win32 Version: 1.0.2114.33663
CodeBase:
file:///D:/Development/GD_SDK/api/samples/GoogleDesktopDi splayCSharpSamp le/*bin/Debug/GoogleDesktopDi splayCSharpSamp le.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__b03 f5f7f11d50a3a*/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:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</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(o ut string title,

out GoogleDesktopDi splayDetailsVie wFlags flags, out object detailsControl) {

Label loLabel = new Label();

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

title = heading;

flags =

GoogleDesktopDi splayDetailsVie wFlags.GDD_DETA ILS_VIEW_FLAG_T OOLBAR_OPEN |

GoogleDesktopDi splayDetailsVie wFlags.GDD_DETA ILS_VIEW_FLAG_N EGATIVE_FEEDBAC K;

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

}

Nov 17 '05 #1
0 1744

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

Similar topics

6
22541
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 instance (in this case 'myDog'). Of course it would be better if I could somehow know from within write() that the name of the object instance was 'myDog' without having to pass it as a parameter. //////////////////////////////// function...
13
2764
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 like this... On Error Resuse Next MyFoo 123 lngErrNum = Err.Number On Error Goto 0
15
2474
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 objects that the app used to speed up some global level data access and functionality. I have recoded the class libraries in .net and would like to acomplish the same functionality in asp.net.
3
4237
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 that needs the class module I get an error on web site: Object reference not set to an instance of an object Here is where the error is:
0
941
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 placing a label control and setting the reference of this new lable into the 'details_control' parameter. This worked.
12
5560
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. Foo = function(type) { this.num = 0; this.type = type this.trigger(); } Foo.prototype.trigger = function() {
6
2483
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
2662
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
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9587
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7623
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2998
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.