Re: Problem compiling mxml with Flex-SDK-3 and CF

2008-04-28 Thread Seth Duffey
@João - Thanks! I downloaded the 'Flex 3 Compiler Module for ColdFusion 8' 
2.6Beta from here 
http://labs.adobe.com/downloads/livecycle_dataservices2_6.html and installing 
this allowed me to build a SWF.

@Cameron - Yes using the variable 'application' was a bad idea, I was so 
focussed on duplicating the example I blanked out on that. It had no affect on 
the code running correctly.


Here's some slightly more detailed code that will display any compile errors:


//set mxml file name
input = expandPath('Test2.mxml');
output = expandPath('Test.swf');
//read file
mxmlFile = createObject("Java","java.io.File").Init(input);
//create flex sdk
app = createObject("Java","flex2.tools.oem.Application").init(mxmlFile);
//create output swf file
swf = createObject("Java","java.io.File").Init(output);
//set output swf
app.setOutput(swf);
//get config
config = app.getDefaultConfiguration();
// Enable ActionScript optimizer.
config.optimize(true);
// Replace this with a valid license key.
config.setLicense("flexbuilder3", "-----");
// Disable warnings.
config.showActionScriptWarnings(false);
config.showBindingWarnings(false);
config.showUnusedTypeSelectorWarnings(false);
config.keepConfigurationReport(false);
// Apply the new configuration to the Application.
app.setConfiguration(config);
//build SWF
result = app.build(JavaCast("Boolean",true));
//create report
report = app.getReport();
messages = report.getMessages();


Success: 




#messages[1].getLevel()# :: 
#messages[1].getPath()# :: 
#messages[1].getColumn()# :: 
#messages[1].toString()# ::




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304316
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Problem compiling mxml with Flex-SDK-3 and CF

2008-04-28 Thread Jo�o_Fernandes
Flex 3 Support is added with LCDS 2.6 that you can get on labs. There is 
a specific additional file to download for CF.
I guess you can grab that file ( webtier for cf ) without LCDS 2.6 and 
upgrade your server anyway.
-- 

João Fernandes

http://www.onflexwithcf.org
http://www.riapt.org
Portugal Adobe User Group (http://aug.riapt.org)


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304309
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Problem compiling mxml with Flex-SDK-3 and CF

2008-04-27 Thread Cameron Childress
I have no idea if the code you are trying to do will work, but it's almost
certainly not going to work if you use "application" as your variable name.
Try a different variable name.

-Cameron

On Fri, Apr 25, 2008 at 5:35 PM, Seth Duffey <[EMAIL PROTECTED]> wrote:

> I'm trying to use the Flex 3 SDK to compile a swf file from an mxml text
> file using ColdFusion.
>
> I am getting this error:
> java.lang.NoSuchMethodError:
> flex2.compiler.API.usePathResolver(Lflex2/compiler/common/SinglePathResolver;)V
> at flex2.tools.oem.internal.OEMUtil.init(OEMUtil.java:88) at
> flex2.tools.oem.internal.OEMUtil.getApplicationConfiguration(OEMUtil.java:226)
> at...
>
>
> Here's the code I'm trying:
>
> 
>   //set mxml file name
>   input = expandPath('Test.mxml');
>   output = expandPath('Test.swf');
>   //read file
>   mxmlFile = createObject("Java","java.io.File").Init(input);
>   //create flex sdk
>   application =
> createObject("Java","flex2.tools.oem.Application").init(mxmlFile);
>   //create output swf file
>   swf = createObject("Java","java.io.File").Init(output);
>   //set output swf
>   application.setOutput(swf);
>   //build it
>   result = application.build(true);
> 
>
> 
>
> Above code adapted from first example here
> livedocs.adobe.com/flex/3/compilerAPI_flex3.pdf
>
> I'm on CF8.0.1, the Flex 3 SDK has been added to the classpath, LiveCycle
> Data Services ES was also installed.
>
> Any ideas? thanks
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304302
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Problem compiling mxml with Flex-SDK-3 and CF

2008-04-25 Thread Seth Duffey
I'm trying to use the Flex 3 SDK to compile a swf file from an mxml text file 
using ColdFusion.

I am getting this error:
java.lang.NoSuchMethodError: 
flex2.compiler.API.usePathResolver(Lflex2/compiler/common/SinglePathResolver;)V 
at flex2.tools.oem.internal.OEMUtil.init(OEMUtil.java:88) at 
flex2.tools.oem.internal.OEMUtil.getApplicationConfiguration(OEMUtil.java:226) 
at...


Here's the code I'm trying:


   //set mxml file name
   input = expandPath('Test.mxml');
   output = expandPath('Test.swf');
   //read file
   mxmlFile = createObject("Java","java.io.File").Init(input);
   //create flex sdk
   application = 
createObject("Java","flex2.tools.oem.Application").init(mxmlFile);
   //create output swf file
   swf = createObject("Java","java.io.File").Init(output);
   //set output swf
   application.setOutput(swf);
   //build it
   result = application.build(true);




Above code adapted from first example here 
livedocs.adobe.com/flex/3/compilerAPI_flex3.pdf

I'm on CF8.0.1, the Flex 3 SDK has been added to the classpath, LiveCycle Data 
Services ES was also installed.

Any ideas? thanks 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304274
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4