RAD Studio
ContentsIndex
PreviousUpNext
Script Objects

Script objects are objects that script commands can reference. You make objects available for scripting by registering an IDispatch interface to the object with the active scripting engine. The following objects are available for scripting:  

Script objects  

Script object 
Description 
Application  
Provides access to the application adapter of the Web Application module.  
EndUser  
Provides access to the end user adapter of the Web Application module.  
Session  
Provides access to the session object of the Web Application module.  
Pages  
Provides access to the application pages.  
Modules  
Provides access to the application modules.  
Page  
Provides access to the current page  
Producer  
Provides access to the page producer of the Web Page module.  
Response  
Provides access to the WebResponse. Use this object when tag replacement is not desired.  
Request  
Provides access to the WebRequest.  
Adapter objects  
All of the adapter components on the current page can be referenced without qualification. Adapters in other modules must be qualified using the Modules objects.  

Script objects on the current page, which all use the same adapter, can be referenced without qualification. Script objects on other pages are part of another page module and have a different adapter object. They can be accessed by starting the script object reference with the name of the adapter object. For example,

<%= FirstName %>

displays the contents of the FirstName property of the current page's adapter. The following script line displays the FirstName property of Adapter1, which is in another page module:

<%= Adapter1.FirstName %>
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!