• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bad news if I can't debug cfcs in a flex project

Enthusiast ,
Jun 01, 2010 Jun 01, 2010

Copy link to clipboard

Copied

I'm trying to debug a cfc in a flex project Coldfusion builder installed as a plugin is Flash builder 4

But I'm getting a message saying:

File does not belong to a coldfusion project. Apply Coldfusion nature to the project to which the file belongs.

This is bad news if I can't debug cfcs in a flex project

TOPICS
Builder

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jun 03, 2010 Jun 03, 2010

Personally I'd keep them as separate projects.  You can still have both projects opened in eclipse and it will choose the proper editor when you open an .mxml/as vs .cfc/cfm file.

I'm actually developing a project now that embeds Railo into my Flex/Air app (to take my cf apps offline) so I have CFML that lives inside the packaged air application.  Even in this situation I keep them separate and use a custom ant build to export my CF project (from svn) to the appropriate directory in my Flex/Air p

...

Votes

Translate

Translate
Explorer ,
Jun 03, 2010 Jun 03, 2010

Copy link to clipboard

Copied

Just trying to understand this, but why do you have ColdFusion CFCs within a Flex project?  Your Flex project is compiled and will live client side, while your ColdFusion CFCs are going to live on the server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 03, 2010 Jun 03, 2010

Copy link to clipboard

Copied

Because the cfcs are specific to the flex project, I like having all my files that relate to an application in a single flex project.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 03, 2010 Jun 03, 2010

Copy link to clipboard

Copied

Personally I'd keep them as separate projects.  You can still have both projects opened in eclipse and it will choose the proper editor when you open an .mxml/as vs .cfc/cfm file.

I'm actually developing a project now that embeds Railo into my Flex/Air app (to take my cf apps offline) so I have CFML that lives inside the packaged air application.  Even in this situation I keep them separate and use a custom ant build to export my CF project (from svn) to the appropriate directory in my Flex/Air project.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 03, 2010 Jun 03, 2010

Copy link to clipboard

Copied

I think your right mate, its taking me 5 programming years to figure this out


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 09, 2010 Jun 09, 2010

Copy link to clipboard

Copied

can you share your ant build?


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 09, 2010 Jun 09, 2010

Copy link to clipboard

Copied

Here are the targets (simplified) that are specific to the cfml export.  The real build.xml reads a build.properties file for the variables, and main runs the flex build first:

<!-- Refresh CFML -->

<property name="SVN.USERNAME" value="MY SVN USERNAME"/><!-- change to your svn username -->
<property name="SVN.PASSWORD" value="MY SVN PASSWORD"/><!-- change to your svn password -->
<property name="SVN.PROJECT_URL" value="http://mysvnproject.com/trunk"/><!-- change to your svn url -->
<property name="BUILD.EXPORT_DIR" value="c:/CFML/project/export/path"/><!-- change to your CFML project path -->
<property name="DEPLOY_DIR" value="c:/flex/project/deploy/path"/><!-- change to your Flex project path -->

<!-- runs the targets -->
<target name="main" depends="export-cfml, copy-cfml"/>

<target name="export-cfml" depends="find_revision, check-svn-build" unless="build.exists">
     <echo>Lates SVN build did not exist, export it</echo>
     <!-- export from svn -->
     <exec executable="svn">
          <arg line="export &quot;${SVN.PROJECT_URL}&quot; ${build.dir} -r ${revision.number} --username ${SVN.USERNAME} --password ${SVN.PASSWORD}"/>
     </exec>          
</target>


<!-- Get the latest revision number -->
<target name="find_revision" description="Sets property 'revision.number' to the head svn revision">
     
     <!-- Use SVN to learn the latest revision number -->
     <exec executable="svn" outputproperty="revision.number">
          <arg line="info &quot;${SVN.PROJECT_URL}&quot;"/>
          <redirector>
               <outputfilterchain>
                    <linecontainsregexp>
                         <regexp pattern='^Last Changed Rev' />
                    </linecontainsregexp>
                    <tokenfilter>
                         <replaceregex pattern='[\D]+([\d]+)' replace="\1" />
                    </tokenfilter>
               </outputfilterchain>
          </redirector>
     </exec>
     <echo message="Current SVN Revision: ${revision.number}"/>
</target>

<!-- we only export from svn if we haven't already for current revision.number -->
<target name="check-svn-build">
     <!-- setup the build dir name based on the latest revision number -->
     <property name="build.dir" value="${BUILD.EXPORT_DIR}/${revision.number}" />
     <available file="${build.dir}" property="build.exists" value="true" type="dir" />
     <echo>SVN build exists: ${build.exists}</echo>
</target>

<!-- we always copy from the latest svn export dir to the flex project -->
<target name="copy-cfml">
     <echo>Copy CFML to Flex Project</echo>
     <!-- copy cfml to flex project -->
     <copy todir="${DEPLOY_DIR}/www">
          <fileset dir="${build.dir}"/>
     </copy>
</target>

Note: I quickly stripped out all "extra" stuff we do for our project, so this is untested and may contain typos.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 18, 2010 Jun 18, 2010

Copy link to clipboard

Copied

Thats nice because I find it easier to have my cfcs locally for svn backup then deploy them

to network for testing.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 18, 2010 Jun 18, 2010

Copy link to clipboard

Copied

How do you define the location of the svn executable?

It looks as if you are saving the air code in a different location to the coldfusion code?

cheers and respect

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 18, 2010 Jun 18, 2010

Copy link to clipboard

Copied

LATEST

I'm using the CollabNet Subversion Client, which when installed adds the binary's path to the windows %PATH% environment variable.  Therefore the:

<exec executable="svn" 

just knows where it is.  You could set that up as a property just as easy though.

It looks as if you are saving the air code in a different location to the coldfusion code?

I have my CFML and Flex/Air projects in two separate directories.  The svn task exports the latest version of the CFML code to a folder where I keep all exported builds (based on a milestone + build number naming convention).  Once exported, ant then copies the CFML into my Air project release path.  So ultimately they live together.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation