possible BUG in derived component -> enumproperty 
Author Message
 possible BUG in derived component -> enumproperty

I have created a few "Entry" components that are derived from
standardcomponents like TextField, ListBoxes and such. The components have
special checks that make sure the user can only type what the EntryField
will accept, for instance only integer, long or dates.

The proplem or bug is in my NumberEntryField component. The component have a
enumeration for what type to use. Long, Integer or Floatingpoint (Double).

public enum NumberChoice { Floatingpoint , Integer, Long }

I then made a getter and setter that made this into a public property.

public NumberChoice NumberType{

get {return ivNumberType;}

set {ivNumberType = value;}

Quote:
}



Tue, 02 Mar 2004 21:05:43 GMT  
 possible BUG in derived component -> enumproperty
Sorry the message was sent before I was finnished, was trying to fix the
code. The rest of the message is entered at the bottom.

Quote:
> I have created a few "Entry" components that are derived from
> standardcomponents like TextField, ListBoxes and such. The components have
> special checks that make sure the user can only type what the EntryField
> will accept, for instance only integer, long or dates.

> The proplem or bug is in my NumberEntryField component. The component have
a
> enumeration for what type to use. Long, Integer or Floatingpoint (Double).

> public enum NumberChoice { Floatingpoint , Integer, Long }

> I then made a getter and setter that made this into a public property.

   public NumberChoice NumberType
  {
     get {return ivNumberType;}
      set {ivNumberType = value;}
   }

***new ****

All works fine and the values turn up in the properties and I can select the
type I want.

The bug is that when I select my entryfield to be a Integer or Long it
always goes back to the first value in the enumeration (float) when I select
the form in the Solutionexplorer.

If this isn't a bug, what am I doing wrong?

/Mikael Petersson
Palett HRM



Tue, 02 Mar 2004 21:14:31 GMT  
 possible BUG in derived component -> enumproperty

Quote:
> Sorry the message was sent before I was finnished, was trying to fix the
> code. The rest of the message is entered at the bottom.

> > I have created a few "Entry" components that are derived from
> > standardcomponents like TextField, ListBoxes and such. The components
have
> > special checks that make sure the user can only type what the EntryField
> > will accept, for instance only integer, long or dates.

> > The proplem or bug is in my NumberEntryField component. The component
have
> a
> > enumeration for what type to use. Long, Integer or Floatingpoint
(Double).

> > public enum NumberChoice { Floatingpoint , Integer, Long }

> > I then made a getter and setter that made this into a public property.

>    public NumberChoice NumberType
>   {
>      get {return ivNumberType;}
>       set {ivNumberType = value;}
>    }

> ***new ****

> All works fine and the values turn up in the properties and I can select
the
> type I want.

> The bug is that when I select my entryfield to be a Integer or Long it
> always goes back to the first value in the enumeration (float) when I
select
> the form in the Solutionexplorer.

> If this isn't a bug, what am I doing wrong?

> /Mikael Petersson
> Palett HRM

I am also experiencing this problem. Does anyone know if this is a bug that
will be squashed or if I need to add something to my enumerator?

Ben Jansens



Sun, 07 Mar 2004 23:42:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Is DDX_Control possible in CDialogbar-Derived class!

2. derived components ans events

3. Derived component notifications/messages

4. Possible bug with Bitmap(string) constructor?

5. ThreadPool possible bug? [NUnit test included]

6. Possible IDE Bug

7. Possible bug in development environment?

8. two possible bugs in 7.1

9. XMLReader exception - possible .NET2003 bug.

10. Possible MC++ bug in VS.NET 2003

11. UNICODE file handling - possible bug

12. Possible C++ bug .NET 2003 Final Beta

 

 
Powered by phpBB® Forum Software