Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

.cas contain not exist cocoa class #107

Open
minerany opened this issue Oct 27, 2015 · 1 comment
Open

.cas contain not exist cocoa class #107

minerany opened this issue Oct 27, 2015 · 1 comment

Comments

@minerany
Copy link

if the .cas file contain the not exist class (not css dot class) , the all .cas sheet will not apply, so i think if this is the right thing.maybe we should log a warning ,not return a error and nil?

        if ([tokenValue hasPrefix:@"."]) {
            styleSelector.styleClass = [tokenValue substringFromIndex:1];
        } else {
            styleSelector.objectClass = NSClassFromString(tokenValue);
        }

        if (!styleSelector.objectClass && !shouldConcatToParent) {
            self.error = [self.lexer errorWithDescription:[NSString stringWithFormat:@"Invalid class name `%@`", tokenValue]
                                                   reason:@"Every selector must have a objectClass"
                                                     code:CASParseErrorFileContents];
            return nil;
        }
@dnedrow
Copy link
Member

dnedrow commented Oct 18, 2017

@minerany , what do you propose should be the expected behavior if a non-existent class is in the stylesheet?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants