NSWindow setRepresentedFilename #1633

Closed
BlairDuncan opened this Issue Jul 25, 2012 · 5 comments

4 participants

@BlairDuncan

current code sets the representedURL to a string not a CPURL


/*!
    Sets the path to the file the receiver represents
*/
- (void)setRepresentedFilename:(CPString)aFilePath
{
    // FIXME: urls vs filepaths and all.
    [self setRepresentedURL:aFilePath];
}

/*!
    Returns the path to the file the receiver represents
*/
- (CPString)representedFilename
{
    return _representedURL;
}

fix:


- (void)setRepresentedFilename:(CPString)aFilePath
{
    // FIXME: urls vs filepaths and all.
    [self setRepresentedURL:[CPURL URLWithString:aFilePath]];
}

/*!
    Returns the path to the file the receiver represents
*/
- (CPString)representedFilename
{
    return [_representedURL absoluteString];
}

@cappbot

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

@ggsato

+AppKit
+#needs-review

NSWindow has both of representedFilename and representedURL.

@cappbot

Milestone: Someday. Labels: #needs-review, #new, AppKit. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.

@ahankinson ahankinson added a commit to ahankinson/cappuccino that referenced this issue Feb 10, 2013
@ahankinson ahankinson Fix for #1633: setRepresentedFilename
Without this fix, CPWindow setRepresentedFilename is set as a string, not a CPURL (as specified by the variable type). (With tests)
933a1be
@ahankinson

Fixed in fb577f8

-#new
+#fixed
+bug
milestone=0.9.7

@cappbot

Milestone: 0.9.7. Labels: #fixed, AppKit, bug. What's next? This issue is considered successfully resolved.

@cappbot cappbot closed this Feb 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment