MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 782

Developing coldfusion mx applications
Table of Contents

Advertisement

Boolean data considerations
ColdFusion treats any of the following as Boolean values:
True
False
You can use any of these values with CORBA methods that take Boolean parameters, as the
following code shows:
IDL
CFML
Struct data type considerations
For IDL struct types, use ColdFusion structures. You can prevent errors by using the same case for
structure key names in ColdFusion as you do for the corresponding IDL struct field names.
Enum type considerations
ColdFusion treats the enum IDL type as an integer with the index starting at 0. As a result, the
first enumerator corresponds to 0, the second to 1, and so on. In the following example, the IDL
enumerator a corresponds to 0, b to 1 and c to 2:
IDL
CFML
782
Chapter 34: Integrating COM and CORBA Objects in CFML Applications
"yes", "true", or 1
"no", "false", or 0
module Tester
{
interface TManager
{
void testBoolean(in boolean a);
void testOutBoolean(out boolean a);
void testInoutBoolean(inout boolean a);
boolean returnBoolean();
}
}
<CFSET handle = CreateObject("CORBA", "d:\temp\tester.ior", "IOR", "")
>
<cfset ret = handle.testboolean("yes")>
<cfset mybool = True>
<cfset ret = handle.testoutboolean("mybool")>
<cfoutput>#mybool#</cfoutput>
<cfset mybool = 0>
<cfset ret = handle.testinoutboolean("mybool")>
<cfoutput>#mybool#</cfoutput>
<cfset ret = handle.returnboolean()>
<cfoutput>#ret#</cfoutput>
module Tester
{
enum EnumType {a, b, c};
interface TManager
{
void testEnum(in EnumType a);
void testOutEnum(out EnumType a);
void testInoutEnum(inout EnumType a);
EnumType returnEnum();
}
}
<CFSET handle = CreateObject("CORBA", "d:\temp\tester.ior", "IOR", "")
>
<cfset ret = handle.testEnum(1)>

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents