473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Overridable limitations for Enumerations

I'm making an Base Class that will be inherited. In my base class, I
have a public enumeration that defines a list of things I want my class
to be able to do. I use it for Method input parameters, as well as
output Events.

Public Enum enmListOfValues
Value1
Value2
Value3
Value4
End Enum

....It works really great, because it allows me to have AutoSyntax
completion in the child classes that inherit from it. Makes for very
readible code.

However, there is a problem. I'm only able to use the Enumerations I
set up in my Base class. ...And what I would like to do on occasion,
is to have one of my Child Classes "Override" this, and feed in it's
own list of enmListofValues for the Classes that inherit from it.

....But it doesn't work. Overriding isn't allowed for Enumerations.

The best I can come up with, is to make a Public Integer Property in my
Base Class, and then Declare an Enum in each Child Class, as needed,
and CType() it. ...What a drag.

Does anyone have a better solution for this? ...I want my
AutoComplete. It's so dang useful. ...But I also want to either be
able to dynamically add to the Enumeration in my base class, or
Override it. ...And Shadows isn't any good. Because I want to have
other classes inherit from the class I redefine the Enumerations in.

Anyone encounter this, or have any ideas? Your help would be greatly
appreciated.

Jul 21 '05 #1
0 1144

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

Similar topics

3
by: Marina | last post by:
Hi, I have a class that inherits from CollectionBase, and I'm trying to override its Count property. As per the documentation, this property is overridable - so I should be able to do this. So...
1
by: someone else | last post by:
I have some code that creates dynamic enumerations for use in a PropertyGrid control. This all works perfectly but the memory usage of the program increases quite quicly when viewing the...
4
by: ChrisB | last post by:
Hello: I will be creating 50+ enumerations related to a large number of classes that span a number of namespaces. I was wondering if there are any "best practices" when defining enumerations. ...
0
by: Plinkerton | last post by:
I'm making an Base Class that will be inherited. In my base class, I have a public enumeration that defines a list of things I want my class to be able to do. I use it for Method input...
27
by: Ben Finney | last post by:
Antoon Pardon wrote: > I just downloaded your enum module for python > and played a bit with it. IMO some of the behaviour makes it less > usefull. Feedback is appreciated. I'm hoping to...
77
by: Ben Finney | last post by:
Howdy all, PEP 354: Enumerations in Python has been accepted as a draft PEP. The current version can be viewed online: <URL:http://www.python.org/peps/pep-0354.html> Here is the...
2
by: MDFS | last post by:
Hi, I was wondering if anyone has any information on the performance impact of using functions declared as overridable? To Explain more fully; By default every function created in VB is NOT...
3
by: grawsha2000 | last post by:
Hello, I have an overridable function in a base class (to do some basic database works) that gets inherited by many concrete classes. These concrete classes expands the work of that...
11
by: Ido Yehieli | last post by:
Hi, can I define types with a limitation on the data the type contain, rather than just the size it will have in memory? For example: a bound_int which can only be in a certain range, so don't...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.