Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

varsis

macrumors regular
Original poster
Nov 30, 2005
209
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
 

Attachments

  • Picture 3.png
    Picture 3.png
    11.7 KB · Views: 64

TEG

macrumors 604
Jan 21, 2002
6,625
173
Langley, Washington
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
 

varsis

macrumors regular
Original poster
Nov 30, 2005
209
1
actually im trying to imitate that in cocoa...

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

varsis

macrumors regular
Original poster
Nov 30, 2005
209
1
Sounds like the easiest way, Regex is quite useful for this.

TEG

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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.