473,748 Members | 7,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IsInitializing Property (boolean) hangs on property set

I am upgrading an app from 6.0 to VB.

Have a couple of radio buttons that gave me the "may fire when form is
initialized" upgrade message. (no problem)

Added an Isinitializing property (boolean):

----------------------------------------------------------------------------
---------
Private Property IsInitializing( ) As String

Get

Return IsInitializing

End Get

Set(ByVal Value As String)

IsInitializing = Value

End Set

End Property

----------------------------------------------------------------------------
-------------------------

When I try to set this property as such:

----------------------------------------------------------------------------
----
Me.IsInitializi ng() = "True"

InitializeCompo nent()

Me.IsInitializi ng = "False"

----------------------------------------------------------------------------
----------------------------------------------

in the "new" method of my form class, I get an error, as the property gets
hung when it tries to set the "isinitiali zed" property to true:

"An unhandled exception of type 'System.StackOv erflowException ' occurred "

The hanging app is the property get routine....I debugged and tracked it
into the property set routine where it blows up for no apparent reason.

Any wisdom out there???
--

Frank Bachman
(Grumpy Aero Guy)

Nov 20 '05 #1
3 1533
Hi Grumpy

I do not see it in this code however mostly this is the normal answer on an
infinite loop

Cor

"
Nov 20 '05 #2
"Grumpy Aero Guy" <fbachman@beer_ me.com> schrieb
I am upgrading an app from 6.0 to VB.

Have a couple of radio buttons that gave me the "may fire when form
is initialized" upgrade message. (no problem)

Added an Isinitializing property (boolean):

-------------------------------------------------------------------------- -- ---------
Private Property IsInitializing( ) As String

Get

Return IsInitializing
Here you recursively call the Get method again.
End Get

Set(ByVal Value As String)

IsInitializing = Value
Here you recursively call the Set method again.
End Set

End Property


You need a field to store the value, otherwise you'll get a stack overflow.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
* "Grumpy Aero Guy" <fbachman@beer_ me.com> scripsit:
I am upgrading an app from 6.0 to VB.


No multiposts, please!

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

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

Similar topics

2
4840
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property. But, for complex property types (e.g., instance types) this does not work because System.ComponentModel.DefaultValue requires a constant value In order to indicate if a property should be serialized you can include a boolean function named...
5
4442
by: Dan Iregren | last post by:
Hi, I need to know when a property has ben modified (IsDirty). The most obvious way to solve the problem is perhaps something like the following; Private m_sFirstName As String Private m_bFirstName_changed As Boolean = False Public Property FirstName() As String Get Return m_sFirstName
27
1847
by: Just Me | last post by:
I made a Usercontrol that must have AutoScroll set to true when it is used. So I set it to True in the Load event. However the property still shows in the properties window when the control is placed on a form. That's confusing. How can I make that property not show in the properties window?
8
9213
by: Richard Collette | last post by:
When attempting to debug a webservice, I get the error: Cannot serialize member System.Exception.Data of type System.Collections.IDictionary, because it implements IDictionary. In reading about web services (http://msdn2.microsoft.com/en-us/library/ds492xtk.aspx), the documentation states that exceptions will automatically be handled as a fault element in the message and then converted to a SoapException in the client.
8
3426
by: Jordi Rico | last post by:
Hi, I've made the next inherited class in Visual Studio 2005: Public Class LabelEx Inherits System.Windows.Forms.Label Sub New() MyBase.New() Me.ForeColor = Color.Black Me.AutoSize = False Me.Height = 16
2
2030
by: Lespaul36 | last post by:
I have a control that I have made that uses a custom class for storage of some of the information. I want it to display in the VS.Net 2003 property grid in the IDE like the Font property does, so a use can expand it and set the properties. How do I do this? Thanks in advance.
1
1052
by: shapper | last post by:
Hello, I created a Structure as follows: ' Pair Public Structure Pair ' -- ---- ' Expression
2
1674
by: =?Utf-8?B?Z2FkeWE=?= | last post by:
I use one of 2 arrays dependent on the country. Rather than say: if exchangeID = 1 then dim myPlaceBets() as As UK.exchange.PlaceBets many statements myPlaceBetsReq.bets = myPlaceBets else dim myPlaceBets() As AU.exchange.PlaceBets many statements
0
1512
by: Hans Koller | last post by:
Hello group, I design a class to bind it to a property grid for easy modification of some settings. My problem is now that I want to raise an event when a settings has been changed. Thats not a problem with some "normal" properties (see property DisplayGrid). But when I use a subclass and TypeConverter the setter of the property is not called. Set(ByVal value As LineSetting) m_Limit1 = value
0
8828
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
9367
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
9319
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
9243
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...
0
8241
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
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
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
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 we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.