Type: Posts; User: Eggman002
Search took 0.01 seconds.
March 2nd, 2010, 03:32 PM
User's of the library consist of me. So that isn't really an issue.
Lets just forget about whether I could use the existing event system or not. As mentioned I have other reasons why I want to...
March 2nd, 2010, 02:51 PM
You can control when it gets fired in the existing system. But suppose you want a system where all events get fired at the same time. So in my system for example I want to be able to check for...
March 2nd, 2010, 01:45 PM
At the moment I only have one type of event but the plan is obviously to have more.
The exact types are yet to be determined but they could be pretty much anything (ButtonPressed, KeyPressed,...
March 2nd, 2010, 01:21 PM
Here is what I want:
class EventType1 : IEvent
February 26th, 2009, 08:23 AM
Actually I think I understand a way that I can use this technique now that I have thought about it a bit. As per my previous example if I have a SpecialModeCommon, then I can use the...
February 25th, 2009, 10:59 AM
Okay looking in further detail at the Double Dispatch idea, I still don't really see how I can make use of it. At least not with the current code base (which I am stuck with).
Looking at the...
February 24th, 2009, 04:13 PM
Sorry, I am not overly familiar with the concept of Double Dispatch. I Googled it but I am not really sure how it would apply here.
February 24th, 2009, 03:09 PM
There is no runtime checking of types happening here. That was not clear in the sample. There is runtime checking of a flag which indicates which mode we are currently in.
Though the flag is not...
February 24th, 2009, 08:37 AM
So I am revisiting this issue and I wonder what people think about the following solution. Is it appropriate? Is it good design?
To avoid multiple inheritance, I use the following setup:
January 16th, 2009, 09:36 AM
What about when implementing the method on the class doesn't make sense (or is impossible). For example what if you are inheriting from a class where you don't have the source (i.e. from a code...
January 14th, 2009, 10:14 AM
The problem with that solution (unless I am missing something) is that I then have to do the following:
if(Verify we are in SpecialModeType1)
SpecialModeType1* mode =...
January 14th, 2009, 08:37 AM
Well suffice it to say that I didn't write all the code, I just have to modify it.
So in my example, Mode, ModeType1, ModeType2 and ModeManager are written by someone else and can not be easily...
January 14th, 2009, 06:12 AM
That was just due to a sloppy rewrite of the code. I was using public.
As for the rest of the comments, that is sort of what I figured and yet I am not sure there is a nice way to change around...
January 13th, 2009, 04:15 PM
I have a circumstance where multiple inheritance is required. I have a class layout something like the following.
October 29th, 2008, 08:12 AM
Brilliant. That was the trick. I am pretty sure that is why JonnyPoet's solution also worked because he was storing a list of objects rather than MyObject. But the casting to Object first does the...
October 28th, 2008, 04:30 PM
No it doesn't have to be derived from MyObject. Certainly the objects in the list have to be derived from MyObject, but T could be anything.
So I might have:
class MyComparableObject :...
October 28th, 2008, 03:55 PM
Not sure what you mean by that. Can you elaborate?
October 28th, 2008, 03:38 PM
Suppose I have a class that has a collection. I want to make a generic method to access certain types of objects within that collection. Basically what I want is:
October 6th, 2008, 03:43 PM
The Binary Serializer has support for passing data to the Serialization Context.
I am using the DataContract Serializer and I would like to do the same thing.
Specifically, I want to be able to...
September 28th, 2008, 01:37 PM
Doing it on Dispose is fine, so long as I can ensure that the control is disposed. Simply closing the form does not seem to necessarily call the dispose method.
I could call dispose from the...
September 17th, 2008, 10:23 AM
Okay, so using:
this.ParentForm.FormClosing += StopTimer;
I am able to ensure the timer gets stopped. However, the issue now is that in order to attach this callback, I had to do a hack...
September 17th, 2008, 09:44 AM
The problem is that the timer is part of a User Control not a Form, so in the context where the timer exists, it doesn't know about the form.
Unless I can do something like:
September 16th, 2008, 09:24 AM
I need to know if there is a safe way to handle timers in a Component.
Specifically, I need to ensure the timer is stopped and destroyed.
If I have a User Control:
class MyControl :...
September 12th, 2008, 03:01 PM
I am working with the DataContractSerializer and I would like to know if it is possible to control the output a bit more.
Right now, I am getting a bunch of namespace references like d4p1 etc.
August 29th, 2008, 08:48 AM
Well perhaps some more information would get a response.
First, I am working in C# using DX 9.
I have found the following math:
yaw = Math.Atan2(2*qt.Y*qt.W - 2* qt.X*qt.Z, 1 -...
Click Here to Expand Forum to Full Width