here's an example from some code I worked on using the 
jakarta apache Project's HSSp java classes:

<cfset wb = 
createObject("java","org.apache.poi.hssf.usermodel.HSSFWorkbook").init()/>

this is creating an object that creates an excel 
spreadshhet workbook...

Eric

On Wed, 18 Jan 2006 09:36:00 -0400
  Richard East <[EMAIL PROTECTED]> wrote:
> I have seen code where an object was created like this:
>       <cfset userInfo=CreateObject("component", 
>"objects.player").init(REQUEST.id) />
> 
> The method I had been using that works is like this:
>       <cfset REQUEST.id = 1 />
>       <cfset userInfo=CreateObject("component", 
>"objects.player") />
>       <cfset userInfo.init(datasource) />
>       <cfset REQUEST.qryUserDetails = 
>userInfo.getUserDetails(REQUEST.id) />
>       <cfdump var="#REQUEST.qryUserDetails#"><cfabort />
> 
> I have tried the method of initiating the Object as it 
>is created, but when I do I get an error:
> 
>       <cfset userInfo=CreateObject("component", 
>"objects.player").init(REQUEST.id) />
>       <cfset REQUEST.qryUserDetails = 
>userInfo.getUserDetails(REQUEST.id) />
>       <cfdump var="#REQUEST.qryUserDetails#"><cfabort />
> 
> This fails with the error message, “Variable userInfo 
>is undefined.€? Would someone clarify how I can do this 
>correctly and what would be best practice?
> 
> Thank you for your help and opinions,
> 
> Richard
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229891
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to