Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22951
    Yang Yang
    Participant

    document.GetLine(1, eeGetLineWithNewLines) can be used to (roughly) get the current document’s return method, but isn’t it better to expose this as a property of the document object?

    It’s pleasant to write utility scripts to insert multiple lines of text into a document, but it’s a pain to copy and paste the same detection method across them. After all, document.Config.FileNew.ReturnMethod doesn’t always fit our needs. A constant could be added for the mixed-mode return method.

    Thanks for your consideration.

    #22953
    Yutaka Emura
    Keymaster

    Hello Yang Yang,

    I will think about that in future versions.

    Thanks!

    #22983
    Yutaka Emura
    Keymaster

    I added this property to v17.6.0 beta 1.

    document.NewLineCode

    This is a GET-ONLY property. You can’t use it to set a value.

    For example:

    code = document.NewlineCode;
    switch( code ) {
    case eeCrAndLf:
      ...
    case eeCrOnly:
      ...
    case eeLfOnly:
      ...
    case eeNewlineMixed:
      ...
    }
    
    #22992
    Yang Yang
    Participant

    Thank you so much!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.