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

    #1
    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.

    Thanks
    Chris
     

    Attached Files:

  2. TEG
    macrumors 604

    TEG

    #2
    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.

    TEG
     
  3. macrumors regular

    #3
    actually im trying to imitate that in cocoa...

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

    #4
    Regex matching?
     
  5. TEG
    macrumors 604

    TEG

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

    TEG
     
  6. macrumors regular

    #6
    Here is what I need to validate:
    #css {
    Content
    }

    // 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) {
    NSLog(@"Match!");
    } else {
    NSLog(@"No match!");
    }


    No go...
     
  7. macrumors regular

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

Share This Page