Plex 2E

  • 1.  TrimSpaces() in C#

    Posted Jun 12, 2008 09:39 AM
    [left] Hi,[left]  [left] I got a simple script to trim spaces in C++.   I'm passing in a field of type Obwin/character into the script.[left]  [left] the script looks like this:[left] {[left]           &(1:).TrimSpaces();[left] }[left] This script will work fine when generating and building on the client side since it's C++ but gives this error when generating on the server side (since it's in C#).   The error I get is[left] error CS0117: 'ObRun.ObRTTypes.ObCharFld' does not contain a definition for 'TrimSpaces'  [left] I have tried many different ways but still cannot get it to work.   If you guys have a solution to this, I will greatly appreciate it.[left]  [left]  [left] Tried:[left] {[left]     &(1:).Trim();[left] }[left]  [left] same result.  [left]


  • 2.  Re: TrimSpaces() in C#

    Posted Jun 12, 2008 12:25 PM
    [left] hmm.. It seems like not only is it TrimSpaces(), but other API calls are throwing the same error as well.   I tried the API &(1:).MakeAllUpper and it throws the same error.   Maybe I'm not setting up something  correctly?    I'm thinking you would make API calls with Parameters the same way you would in C++?[left]

    Message Edited by Hmong_Lee on 06-12-2008 04:27 PM


  • 3.  Re: TrimSpaces() in C#
    Best Answer

    Posted Jun 12, 2008 02:14 PM
    Try &(1:).Value.Trim();

    Message Edited by Srini on 06-12-2008 04:15 PM


  • 4.  Re: TrimSpaces() in C#

    Posted Jun 17, 2008 07:37 AM
    Srini,[left]  [left] Thanks for the help.   I think that did it.[left]