thanx , you both cleaned my perspective with those abstract concepts !
Jarno Burger Video Jockey
thanx , you both cleaned my perspective with those abstract concepts !
Jarno Burger Video Jockey
Now : -abstract classA -inherited classB with interfaceX -inherited classC with interfaceX -inherited classD with interfaceX -sealed classX that calls interfaceX But a lot of the commands in interfaceX , could be directly handled by the base class. Only some of the commands in interfaceX , are specific enough to be handled by the inherited class. I think i want : -abstract classA with interfaceX -inherited classB overides interfaceX.commandC -inherited classC overides interfaceX.commandC -inherited classD overides interfaceX.commandC -sealed classX that calls interfaceX Am i right , or am i missing something ??
Jarno Burger Video Jockey
I am programming 5 years now. I am the phase of sharing my framework with some friends. - already using unfuddle.com , to svn my project between home and outdoors. - already using excell 2007 / google docs for my flowcharts. - got a 1 meter high pile of handdrawn graps and drawings to scan into pdf. - i want to rip out all the xml comments in my vs project towards a easy editabble help file online. - i already have my own website where i can host a sql database , if need be. - i would like to start with a project progress page. I would like be spending max 15 euro/month for this. I want to opensource for only a selected few , and the rest of the poeple can pay for my efforts. Can you guys point to a right dirrection articles/websites ?
Jarno Burger Video Jockey
.tag is normally object. comparing object with object sometimes work. but to be sure , do a ctype(image(x).tag , string/integer/double/your class type ) first. Your watch window in visual studio does some neat tricks to show you what is in the tags. But the bad thing is , that your code doesn't know, only that watch-window does (thats called reflection). You have to "convert the object back to your type of class"->ctype(thingie , class-type) . Just to make sure your tag is ok. And maybe Debug.WriteLine all the tag info constantly to your debugger window. Maybe something goes wrong somewhere else , working with tags , (that could behave like any object) , can be tedious. In your case , are your tags your game-data , or are there other array's of stuff with game-data ? Try to make a mental split-up of game-data and interface. Build a 'huge' game-data class . You'll add / remove / update /load / save / (de)serialize your gamedata. In that way , maybe in the future you only have to type in the intermediatewindow or debugwatcher :'gamedata.show' , to show all the gamedata in one list in the debugwindow or debugwatcher. Later in the future you can remember multiple "states" of gamedata , to have a undo/replay function.
Jarno Burger Video Jockey
what did for my debugger , put every given string in a array with a fixed length. when there was a new string , i fisrt moved every string one position in the array , meaning that the first one would be dumped. FIFO. a array with strings was a lot easier to edit/view. you could also use a queue , but i love to build stuff myself , loving hobby code :)
Jarno Burger Video Jockey
yeah ! cool ! whahoo ! we solved it !
Jarno Burger Video Jockey
maybe you'll have to use a clone ?
Jarno Burger Video Jockey
Errr , i dont know alot , but sound like subclassing/inheritance.. Me.Version = "1.0" is a setter thingie in this class, you are setting version to 1 , that will set property version to 1 , that will set version to 1 etc.. Version = value is also a setter thingie in this class. -did you ever type mybase in your subclass ? use and abuse ! -if you have a inherited control , then this class uses a already made class , maybe you'll have to dive into private/protected/public/must overidde/overiddes stuff..It's weird in the beginning but extremely helpfull in the end. -did you put your usercontrol in a different project and referenced that project into your inheritee project , (cause that how it works with me here) ? A usercontrol sometimes wants to be build first in a seperate project , before it wants to be patched up with new code by a different project.
Jarno Burger Video Jockey
Maybe your zoom could be more like a growing/shrinking rectangle instead of a double var ? Then you could easily find mouse-position relative to your zoom-rectangle. Then find your zoom-rectangle back in your pic in memory , and you'll have the pixel position. But you could do this in 10 / 15 ways , all depends what you like yourself most. But stick to the rectangles in rectangles concept, and only your mouse position as a position (relative to a rectangle to a reactangle to a rectangle to a rectangle etc...). You'll need that later on , for other drawing stuff too.. Also , using default scrollbar behaviour to scroll a picture to left / right / up / down , first looks like a nice and easy idea. But you'll end up writing patched stuff to let those scrollbars do what you want , when zoomed or something like that. First dump the scrollbars. Try to build a drag (with middle mousebutton) first , or use arrow/+/- keys or something. Just for the learning experience.
Jarno Burger Video Jockey
I made working dragdrop code, but everytime , when i end the drop (correctly/incorrectly), i end up with a ping sound, under vista. Anybody else also has this problem ? It's rather anoying..
Jarno Burger Video Jockey
Hint , start out by making a function like this : Function ScalePointAToPointOnLineB(PointOnLineA , LengthLineA , LengthLineB) And use this trick wisely..
Jarno Burger Video Jockey
thats cool to know for sure. i was always doubting that. thats why i qualified my question as a easy one. thnx.:thumbsup:
Jarno Burger Video Jockey
haha :laugh:
Jarno Burger Video Jockey
how is this possible , that raising event is as fast a calling the sub in the parent?
Jarno Burger Video Jockey
I am confused , I am delevering thousands of video frames from different movies to my main program. -BaseClass : 'papa' , handles frames -Has got a declared class : 'baby' , produces frames First it thought of raising a event in baby when a new frame arrived. Papa class could have a handler to handle the frames. But then it thought : events use a messageque somewhere , mayb no good idea. Secondly , i thought of calling parent.dowork sub in baby class. But when i wrote a test project, parent.dowork is a = only 1 % faster. raise event : 10138 papa.dostuff : 10067 raise event : 10123 papa.dostuff : 10171 raise event : 10154 papa.dostuff : 10143 raise event : 10338 papa.dostuff : 10264 raise event : 10204 papa.dostuff : 10799 raise event : 10729 papa.dostuff : 10720 raise event : 10579 papa.dostuff : 10156 raise event : 10181 papa.dostuff : 10285 raise event : 10918 papa.dostuff : 10752 raise event : 10377 papa.dostuff : 10317 ?????? HUH ???????
Jarno Burger Video Jockey
modified on Sunday, May 17, 2009 9:04 AM
oops , maybe the wrong place to ask here , maybe someone knows where to ask this question.
Jarno Burger Video Jockey
I made a vpn connection to my home using virtual vpn. Normally i am editting at home, but now i am often outside with my laptop and mobile phone with fast internet. Are there problems with opening the same solution on different pc's , using a mapped vpn network drive?
Jarno Burger Video Jockey
*i am a starter , trying to learn the GOF patterns. i am using vb.net , understand c#. still wan't a job in holland as starter in vb.net ;). i am a person who doesn't want to have full blown solutions , i want to learn by coding , what is happening deep inside the logic. *i am trying to serialize my tree , filled with nodes that work like groups(with nodes) / transforms(leaf) / 3d-meshes(boxes/ball/other primitives) in a world node. yes i am trying to share my servers '3d world' with my clients. *but when i try to serialize my tree to xml , i end up with errors like : -my leaf objects cannot have children. -xml serializer cannot recognize what kind of object a child is. *i am now trying to build my personal serializer , that breaks up my tree into a array of objects , and then seperately serializes each object. *in the future i want to grasp the idea of sending the whole world state and the delta-state (difference in worlds , inbetween two times). *did anybody found some examples. or know some ideas how to help me ? :omg:
Jarno Burger Video Jockey
i am sending messages over the network. i am doing that by first creating a message object and it has : -timecreated as date -priority as integer -sourcenode as enum (what part of the sender is creating the message) -targetnode as enum (wat part of the reciever has to solve the message) -sourcename as string (the sender name) -targetname as string (the reciever name , because multiple receivers could be on the same socket) -command as enum (to tell the part of the reciever what to do) -pvalue1 as object (custom extras) -pvalue2 as object (custom extras) -pvalue3 as object (custom extras) these messages are (de)serialized to : - string , to show them to my logscreens, and script them when needed in the future - stream , to send them over the network My Problem is with the command-enum , my list is becoming extremely big ! I am now in the progress of changing the enum into a class , with x number of classes in it, with x number of enums in it. I am doing this because it looks/feels nice when i type code , meaning : CmdE.General.Nada But now my questions start: -do i have to declare command as object , is there a trick to not have to ? -how do i check if command = cmde.general.niks ? -do i have any heavy changes to expect ?
Jarno Burger Video Jockey
Just use some math and convert this code into the other direction: Private Function LaLo_to_XYZ(ByVal Lattitude As Double, ByVal Longitude As Double) As XYZ Dim POS As XYZ 'bereken de afstand van het gegeven punt naar het midden toe , van bovenaf gezien... Dim radianLat As Double = (90 - Lattitude) * Math.PI / 180 Dim straal As Double = Math.Sin(radianLat) * StraalDome POS.Z = -(Math.Cos(radianLat) * StraalDome) 'bereken de longitude positie erboven op Dim radianLon As Double = Longitude * Math.PI / 180 POS.Y = Math.Sin(radianLon) * straal POS.X = Math.Cos(radianLon) * straal Return POS End Function To point your more in the right way First change your distance from center of the ball to a radius of 1.=>to get a new xyz point. Then calculate the triangle that lies flat on the table to get the degrees. Then calculate the triangle that stands up/down-wards on the triangle mentioned before.