Table 52 Arguments for the Buffer Constructor for Format D Argument Description

Table 52 arguments for the buffer constructor for

This preview shows page 113 - 116 out of 334 pages.

Table 52. Arguments for the Buffer Constructor for Format D Argument Description bufferobject The buffer object that Siebel eScript uses as input to create the new buffer.
Image of page 113
Siebel eScript Language Reference Version 8.1, Rev. A Methods Reference Buffer Methods 114 // Trace the buffer value TheApplication().Trace("Buffer 1 value: "+val); } with(buff2) { // Trace buffer 2 TheApplication().Trace("Buffer 2 value: "+getString()); } // Trace buffer 3 with(buff3) { TheApplication().Trace("Buffer 3 value: "+getString()); } } catch(e) { TheApplication().Trace(e.toString()); } } Create Buffer Method The Create Buffer method extracts the data that exists between two positions in a buffer. It returns this data in a new buffer object. This method does the following: If the value that the beginning argument contains is less than 0, then it treats this value as 0, which is the beginning of the buffer. If the value that the end argument contains is beyond the end of the buffer, then it uses null bytes to increase the size of the new buffer. It does not modify the source buffer. It duplicates the values of the unicode argument and the bigEndian argument in the new buffer. Sets the length of the new buffer to the value that the end argument contains minus the value that the beginning argument contains. Format bufferVar .subBuffer( beginning , end ) Table 53 describes the arguments for the Create Buffer method. Table 53. Arguments for the Create Buffer Method Argument Description beginning The position in the source buffer at which this method begins to extract data. end The position in the source buffer at which this method stops extracting data.
Image of page 114
Methods Reference Buffer Methods Siebel eScript Language Reference Version 8.1, Rev. A 115 How the Create Buffer Method Sets the Cursor Table 54 describes how the Create Buffer method sets the cursor. Example The following example creates a new buffer named language and displays the contents of this buffer in a string named Siebel eScript. The Siebel eScript text begins in the nineteenth position: var loveIt= new Buffer("I love coding with Siebel eScript!"); var language = loveIt.subBuffer(19, (loveIt.size - 1)) TheApplication().RaiseErrorText(language); Related Topics For more information, see “Get String From Buffer Method” on page 118 . Get Buffer Data Method The Get Buffer Data method returns a string that contains the same data that the buffer contains. If necessary, it performs a Unicode conversion according to the value of the Use Unicode in Buffer property. Format bufferVar .toString() Avoiding an Exception Error That Is Not Handled To avoid receiving an unhandled exception error in the text that the Get Buffer Data method returns, you can use the RaiseErrorText method or the RaiseError method instead of the Throw statement. If the Siebel Run-Time Engine creates an error message or if the Throw statement creates an error message, then Siebel CRM adds the following text to the error message: Unhandledexception Table 54. How the Create Buffer Method Sets the Cursor Original Cursor Position How the Create Buffer Method Sets the Cursor
Image of page 115
Image of page 116

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors