• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
object model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

object model


  • Subject: object model
  • From: Darin Duphorne <email@hidden>
  • Date: Fri, 18 Jan 2002 08:44:43 -0600

I am planning a html editor application and am want to take full advantage of the cocoa frameworks and the new object model. I think this will make things easier to maintain and possibly be easier once I start coding than loads of linked lists and nested if..then and switch statements, but am having trouble trying to figure out an object model for the app. Can someone help me with this important first step of putting together a MVC paradigm for the app? I'm thinking of creating a method for parsing the html into sections and having a generic class to hold each section (head, body, etc.) and convert each section to an NSMutableAttributedString. That class would have methods for dealing with each tag type. My problem is in the nesting. How can a section belong, for example, to the body object and a paragraph or list object?
Each object would have properties to correspond to the attributes of the NSMutableAttributedString to be drawn to my NSView.

Another problem I foresee is how to edit text displayed on a custom NSView.

Any help in creating my MVC model would be appreciated. Like many here, I'
m new to object-oriented programming and am trying to grab hold with both hands, but it's tough.

By the way, this will be an open-source project and any help will contribute to that effort. Once I get the fundamentals working, I am hoping that folks will contribute to add support for additional tags, etc. This is why I'm trying to generalize the model as much as possible and what I see as one of the great benefits of object-oriented programming. Then, if one of my parsing methods or classes doesn't work well or is too slow, it can easily be replaced by someone with better string manipulation skills than my own, for example.
The result, I hope, will be something along the lines of FrontPageExpress - really simple and easy to use for basic web site editing.


  • Follow-Ups:
    • Re: object model
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Getting rid of explorers
  • Next by Date: Re: Output from NSTask and modal window
  • Previous by thread: Change in document
  • Next by thread: Re: object model
  • Index(es):
    • Date
    • Thread