Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#COMMENT observations #39

Open
resnape opened this issue Apr 30, 2015 · 2 comments
Open

#COMMENT observations #39

resnape opened this issue Apr 30, 2015 · 2 comments

Comments

@resnape
Copy link

resnape commented Apr 30, 2015

The guidance for the various types of comment indicate there is no space between the # and COMMENT/THEORY. If a space is inserted the comment is of the third type. However what the guidance does not provide is that in certain cases there is also no space after the #COMMENT, #THEORY or #.

In the following example there cannot be a space between #COMMENT and the bracketed number
#COMMENT(2) Entry for Mothers name reads as AAAA or AAAA

It does not throw up an error with the FreeBMD Site but falls foul of the FreeBMD mandarins

Just to complicate matters they allow for a space after a #COMMENT, #THEORY or # when there in no bracketed number as in this example:
#COMMENT Handwritten amendment of crossed out page number nnn

@resnape
Copy link
Author

resnape commented Jun 6, 2015

Steve

I have a suggestion to resolve this issue although I am sure there is a more elegant solution it works in the short term.

  • (IBAction)okCommentDLOG:(id)sender{
    NSString* string = nil;
    if ([commentMenu indexOfSelectedItem] == 0)
    string = [NSString stringWithFormat:@"#COMMENT %@\n", [commentField stringValue]];

    else if ([commentMenu indexOfSelectedItem] == 1)
    string = [NSString stringWithFormat:@"#THEORY %@\n", [commentField stringValue]];

    else
    string = [NSString stringWithFormat:@"# %@\n", [commentField stringValue]];

    // New Code to remove space before open Bracket when (n) present
    //
    string = [[string stringByReplacingOccurrencesOfString:@" (" withString:@"("]mutableCopy];

    [[[textView textStorage] mutableString] appendString: string];
    [NSApp endSheet:mCommentWindow returnCode:[sender tag]];

@resnape
Copy link
Author

resnape commented Apr 8, 2016

Steve
Having looked further into the guidance and almost a years worth of transcriptions the instances of #COMMENT and #THEORY including a bracketed number is quite prevalent, so this is worth clearing. The suggested one liner of code, albeit not elegant, has been in place for almost a year and is valid for all three types of Comment.

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

No branches or pull requests

1 participant