|
Interesting. Seems like a good solution for your problem as described. What I was curious about though is the need for the override in the first place. For example the function X in the following doesn't need to be re-abstracted in class B.
abstract class A
{
public abstract void X();
public virtual void R() { return; }
}
abstract class B : A
{
public abstract override void R();
}
class C : B
{
public override void X() { return; }
public override void R() { return; }
}
Richard brought up a good point though in that it could be virtual function hiding like the function R above. I can't really think of why that would be useful though in this case.
|
|
|
|
|
The one question I haven't seen anyone else ask in this thread: does it do what you wanted it to do?
|
|
|
|
|
|
I had a similar thing happen a few weeks ago.
I was working on some sticky logic, and I created a true "goto" in my Java code using while(true) and labeled breaks.
It worked fine, but it was just SO WRONG that I introduced a new function to eliminate it.
Executing a "return" from the middle of a function is a lot more palatable to my brain.
First time in 20+ years of using Java that I ever came up with that particular construct, hopefully I won't do it again (in any language) for another 20 years.
For your particular case, it almost sounds like the super class constructor should require a parameter which represents the required "service." Sub classes will be forced to provide an implementation of the service to the parent appropriate to the subclasses requirements.
|
|
|
|
|
|
I thought you were going to add "final"
There are few problems in which another layer of abstraction can't delude you into thinking you are actually solving the problem!
|
|
|
|
|
|
Marc Clifton wrote: The macabre in me wonders why a fitness person was using whip cream.
That was my first thought on this too.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
If there's any group of people who can occasionally scarf down superconcentrated calories like that without consequences it'd be athletes and gym nuts.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Dan Neely wrote: without consequences
Well that's obviously not the case
|
|
|
|
|
Marc Clifton wrote: why a fitness person was using whip cream
Didn't read the entire story but you can put more than whipped cream in a whipped cream dispenser. Pretty much any liquid with the correct viscosity and foaming properties can be foamed.
|
|
|
|
|
In Summary: Unhealthy Foods kill even Healthy People?
(And if they can't, they get their machines to do it for them!)
|
|
|
|
|
The doctors always said too much cream is bad for the heart!
|
|
|
|
|
|
kmoorevs wrote: The wife is going to have a fit when she sees the 30' cat6 cable snaking through the living room to my office!
Ah, you have a safety-conscious spouse... just get some duct tape and cover it up, to make sure nobody trips over it. She'll be much more understanding after you cover the 30 feet up with duct tape.
|
|
|
|
|
Great idea!
"Go forth into the source" - Neal Morse
|
|
|
|
|
With the Duct tape you could attach it to the ceiling, no tripping hazard unless she becomes possessed.
|
|
|
|
|
It'll be much quiter if you use the duct tape on the wife!
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Sounds like someone looped a cable. Maybe the powerline widget is confused.. or maybe your neighbor bought one too?
|
|
|
|
|
So we switched from Cisco Jabber to MS Skype For Business yesterday as part of our move from MS Office 2016 to Office 365.
- The font size of contacts in the contacts list (the main UI) is best suited for vision impaired users, and there's no way to reduce it so you can see more contacts.
- You have to double-click the system tray icon to restore the Skype window.
- There seems to be no way to turn off notifications of people coming online. Well, there is a way, but it doesn't seem to to work.
- I can't permanently set my status to "Away". When I unlock my workstation, Skype shows me as "Available".
Admittedly, if these are my biggest problems in life, I'm indeed a lucky man.
/ravi
|
|
|
|
|
We've been using it for a few weeks and it seems to work pretty well.
|
|
|
|
|
We've been using it, or its predecessor, Lync for a couple of years.
I do NOT have notifications turned on the tell me when someone is available, others do.
So.. before you post in QA, have you tried to Google how to get them turned off?
And, yes, this is said tongue-in-cheek...
The answers are out there, it will just take patient and diligence to find them.
|
|
|
|
|
Tim Carmichael wrote: have you tried to Google how to get them turned off? Yes. Also UserVoiced it.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: and there's no way to reduce it so you can see more contacts. It's probably a system font setting. There is an option to only show 1 line per contact, instead of 2.
Ravi Bhavnani wrote: You have to double-click the system tray icon to restore the Skype window. As opposed to a single-click? Single-click opens the menu options, double-click opens the window. Works for me.
Ravi Bhavnani wrote: There seems to be no way to turn off notifications of people coming online. When we first started using it I had to turn that on per contact. I wonder if your org is pushing out specific settings through Group Policy.
Ravi Bhavnani wrote: When I unlock my workstation, Skype shows me as "Available". This does not happen to me when I set to Away, but does when I am set to Be Right Back.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
RyanDev wrote: There is an option to only show 1 line per contact, instead of 2. Yes, I've done that. It's still too big. I often have to scroll the list of just 20 people to select someone. That's annoying.
RyanDev wrote: Single-click opens the menu options That should be a context click. A single click should restore the window. Many IMs work that way.
RyanDev wrote: When we first started using it I had to turn that on per contact. Yes, I've done that manually for each contact. I hope it sticks. And yes, it is a group policy that I don't have privs to change. There's a Powershell cmdlet that will let you alter that, but it fails for me.
RyanDev wrote: This does not happen to me when I set to Away, but does when I am set to Be Right Back. Ah - thanks.
/ravi
|
|
|
|