1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Css Editor?

Discussion in 'Mac Programming' started by varsis, Sep 5, 2008.

  1. macrumors regular

    I am wondering how I can add in so I can see the CSS tags in a css document, in a separate window. Also, so you see the tags for each when you click on them. I don't even have a clue, I know I can find the start and end tags, but I want it to be more full proof...

    Have a look at cssedit in the attachment.

    I need the editor I am making to show like that.


    Attached Files:

  2. TEG
    macrumors 604


    I would almost suggest using Dreamweaver, as it has a window that pulls out the CSS for a page and lets you see what each style name does. Just a thought.

  3. macrumors regular

    actually im trying to imitate that in cocoa...

    But don't know how I would do that. Any ideas?
  4. macrumors regular

    Regex matching?
  5. TEG
    macrumors 604


    Sounds like the easiest way, Regex is quite useful for this.

  6. macrumors regular

    Here is what I need to validate:
    #css {

    // also need to see comments

    Tried this:
    NSString *begin = [NSString stringWithFormat:mad:"{"];
    NSNumber *end = [NSString stringWithFormat:mad:"}"];
    NSPredicate *betweenPredicate =
    [NSPredicate predicateWithFormat: @"attribute BETWEEN %@",
    [NSArray arrayWithObjects: begin, end]];

    if ([betweenPredicate evaluateWithObject:contentsOfFile] == YES) {
    } else {
    NSLog(@"No match!");

    No go...
  7. macrumors regular

    can anyone help me with the format? Thanks...

Share This Page