From: Pa Per Date: 2006-10-26T18:45:48+09:00 Subject: Re: Beginner would like help with oo-modelling Benj, thanks for your input! The option of rendering different outputs is supposed to be part of The Concept, but although you're affirming my assumption that All Roads Lead to Rome, my hopes for a specific hint to one of those roads are disappointed now :-) Even as I'm trying to discover OO ways of modeling that may not be even sensible, I'm currently stuck, and I most likely would be stuck on the procedural path as well. Actually, I have been playing and now I've mostly run out of game ideas.. I would just like someone to push me into the right direction, specifically addressing the matter of storing the line data (whether as attribute or independent). I've been thinking about using a relational approch using two [storage units], one containing type and positional data of a line, while the other just stores line-type related information as color, width, .. As arrays apparently only support integer keys, and the order in which the line elements are stored does not really matter, my guess is that a hash using the position of each line (float) as keys, and the style of line as value, plus another hash or array that contains just the different styles might be a good approach. Then I could iterate with the step method to insert an element, if there is none yet. Resulting in a 'list' with all lines. I assume that I then could easily extract a specific type of line, fetch the corresponding style information from the other list, and voilĂ ! - generate what I want. Could you kindly provide me with your thoughts about this approach? If it is not doomed, I shall gain motivation and so will be able to try out procedural and OO constellations, learning the wonderous workings of arrays and hashes, and eventually improving the program, so everyone will be able to create her/his badly-needed ruler.. I have access to books describing OO with UML, but maybe I can extract the concept without having to 'bother' about UML yet. -- Posted via http://www.ruby-forum.com/.