|
Well, sure, if you want your screen to match your Underoos.
|
|
|
|
|
I have some sad news for you both
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Any wallpaper that is NSFW
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If you can see your desktop wallpaper, you aren't using your screen real estate effectively.
|
|
|
|
|
|
Occasionally, I accidently bump the "make wallpaper" button and I get surprised when I see my desktop some time later.
|
|
|
|
|
|
I find wallpapers distracting, preferring solid black instead...have for years...boring, I know!
"Go forth into the source" - Neal Morse
|
|
|
|
|
I used to like taking a screenshot of my desktop and using it as my locked screen display. People who thought they would "teach me a lesson" when I went to the restroom got taught their own lesson.
|
|
|
|
|
try
{
Filtering = !filters.IsEmpty;
}
catch(Exception ex)
{
}
finally
{
Filtering = !filters.IsEmpty;
}
Oh My eyes
|
|
|
|
|
Oh go on, you know you want to..
try
{
Filtering = !filters.IsEmpty;
}
catch(Exception ex)
{
Filtering = !filters.IsEmpty;
}
finally
{
Filtering = !filters.IsEmpty;
}
Ah, I see you have the machine that goes ping. This is my favorite. You see we lease it back from the company we sold it to and that way it comes under the monthly current budget and not the capital account.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
I want my filters to be NON-EMPTY!!!! I'll get my filters to be NON-EMPTY!!!
And why not just? :
Filtering = true;
If it throwing an exception on that, then maybe it is the Filtering var that is undefined?
|
|
|
|
|
Hammer.
Bigger Hammer.
Biggest Hammer.
Ah, I see you have the machine that goes ping. This is my favorite. You see we lease it back from the company we sold it to and that way it comes under the monthly current budget and not the capital account.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
At least make it catch only null reference exceptions? And let Bob sort out the rest?
|
|
|
|
|
Hmmm,
I can infer from this snippet that the filters variable is most likely a CString[^] member variable which is being modified/accessed by multiple threads.
Am I right?
Best Wishes,
-David Delaune
|
|
|
|
|
Nope. filter is ICollectionView ^ type. It is possible it could be null.
|
|
|
|
|
I am trying to figure out how that can work. What about
private Something _filters;
private Something filters
{
get
{
if (_filters == null)
{
Task.Run(() => CreateFilters());
}
return _filters;
}
}
private void CreateFilters()
{
} That could cause such a strange behavior, couldn't it?
|
|
|
|
|
I think he might not know what Multi-Threaded Programming is.
|
|
|
|
|
Exactly. But somewhere he read something about lazy initialization, and somewhere else he saw a Task.Run, understood neither of them, and ... Welcome to the wonderful world of code monkeys who've used every programming concept during their career.
|
|
|
|
|
var filters = Grid.RecordManager.FilteredInDataItems;
it is using 3rd party grid control. It returns ICollectionView
[^](https://msdn.microsoft.com/en-us/library/system.componentmodel.icollectionview(v=vs.110).aspx)
|
|
|
|
|
Just remove the try-catch and stack-trace the exception. I don't see the problem. o7
|
|
|
|
|
OMG that is terrible
try {
Filtering = !filters.IsEmpty;
}
catch(Exception ex) {
}
finally {
Filtering = !filters.IsEmpty;
}
|
|
|
|
|
My guess is that either "filters" isn't instantiated or is getting instantiated at the same time that it is being called. What is happening when "IsEmpty" is called? It might be trying to kick something off when it is called.
|
|
|
|
|
I second that request. Can we be shown the IsEmpty code please? Can't be too many company secrets hidden in there... god, please say there isn't!
|
|
|
|
|
public bool IsEmpty
{
get {
try {
return _filters.IsEmpty();
}
catch (NullReferenceException e)
{
InstantiateFilters();
throw new NullReferenceException("Try it again now please.");
}
}
}
|
|
|
|