Compiling with mxmlc Using CS3 Components

Hi, I would like to use the Flex SDK 3.0 to compile a project
which currently compiles successuflly in Flash CS3 (because it's
quicker). I am importing assets from swfs using [Embed ...] tags
without any problems. I can also use CS3 components by exporting
them to an SWC file, adding that to the library path for mxmlc and
then reating new instances of them in AS. However, I have some
assets which contain components which were statically placed within
them in the CS3 IDE and given an instance name. These are not
working. For example, the buttons I have typed as
fl.controls.Button in the AS code but I get a run time error saying
that it can't coerce a MovieClip instance into a Button. Does
anyone have any ideas? The CS3 compiler is driving me nuts because
it's so slow. I used to use MTASC and am looking for something
similar to work with AS 3.0.

I agree that compiler is painfully slow, especially when you use a library and have some (one is enough) projects dependendant upon it. Minor change in library starts compiling everything for a few minutes . This really slows development process in later stages. Adobe should do something about this.

Similar Messages

  • App fails to compile with mxmlc command-line but builds fine with flash builder IDE.

    Hi,
    i have this flex app (its a flex project created from flash builder ), it compiles fine when i build it from IDE.
    it fails to compile when i do it from command line through mxmlc.
    i am invoking the mxmlc at the location <flash-builder-installation>\sdks\<flex-ver>\bin\
    the mxml file is test.mxml
    i am invoking like the following
    c:\<bin>\mxmlc test.mxml
    i dont have any dependency on any of custom swc file.
    i am getting the following type errors when i compile it from my .as file
    Error: Type was not found or was not a compile-time constant: TouchEvent
    Error: Type was not found or was not a compile-time constant: File.
    Error: Type was not found or was not a compile-time constant: FileStream
    could you please let me know what i am missing here ?
    thanks,

    Is this a AIR app or a mobile app? If you are building AIR app for desktop then you can use amxmlc instead of mxmlc.
    If its a mobile app then use mxmlc +configname=airmobile
    -Gaurav
    http://www.gauravj.com/blog

  • Compiling with JRockit using ant

    I am considering switching to JRockit.
    Our java code is compiled using ant, with the 'javac' task.
    The javac task has an option to invoke different compilers:
    - classic (the standard compiler of JDK 1.1/1.2) – javac1.1 and javac1.2 can be used as aliases.
    - modern (the standard compiler of JDK 1.3/1.4/1.5/1.6) – javac1.3 and javac1.4 and javac1.5 and javac1.6 can be used as aliases.
    - jikes (the Jikes compiler).
    etc
    The Jrockit compiler is not on this list.
    I have found a suggestion (http://www2.sys-con.com/ITSG/virtualcd/Java/archives/0811/pepperdine/index.html) to use an exec call as a workaround,
    but are there any alternatives? I could perhaps persuade ant to use JRockit by deinstalling any other JDK's and pointing JAVA_HOME to JRockit;
    what I want however is to keep the option to use different compilers.
    Has anyone got any suggestions?

    The javac compiler bundled with JRockit is the exact same one that you get with the Sun JDK. Oracle licenses the JDK (class libraries, tools, etc) from Sun. So I would just set JAVA_HOME to point at JRockit as you suggest.
    Henrik

  • Help With MXMLC Ant task

    Hello all. I've been using the MXMLC servlet compiler that
    comes with the fds-tomcat tutorial. I have recently tried to
    compile with MXMLC using the ant task. The application compiles the
    swf correctly except it cant seem to find the spring services I had
    configured.
    [MessagingError message='Unknown destination 'xxxxx'.']
    Now, when I go and try to get the servlet to compile it; ie:
    Bringing up the MXML file from the web browser, it works fine. Can
    Anybody identify what i'm doing wrong?

    Hey
    After scratching my head for couple hours and wrestling with
    the FDS configuration I have managed to get the application going.
    Here is my ant target
    <taskdef resource="flexTasks.tasks"
    classpath="${file.flexTasks.jar}" />
    <mxmlc file="${flex.main.file}"
    keep-generated-actionscript="true"
    use-network="true" output="${flex.output.file}"
    as3="true" es="false"
    benchmark="true" debug="true"
    optimize="true" services="${file.flex.services.conf}"
    context-root="/analytics" strict="true" >
    <!--Third party classes -->
    <compiler.library-path dir="${flex.user.classes.dir}"
    append="true">
    <include name="Cairngorm.swc" />
    <include name="CairngormEnterprise.swc" />
    </compiler.library-path>
    <!--XDoclet generated DTOs -->
    <compiler.source-path
    path-element="${flex.actionscript.output.dir}"/>
    </mxmlc>

  • Using XVID with Premiere Pro CS3?

    I'm trying to export to video using XVID encoder, two pass. I start the first pass, an XVID status window appears, and then it appears to get stuck.
    Has anyone here used XVID with Premiere Pro CS3? If so, any suggestions?

    Thanks, I'll try the options on XVID. Currently I've been exporting to raw AVI, then using AutoGK. I normally don't do use XVID, but for a partcicular racing game, there are some telephone wires that appear less aliased with XVID mpeg4, than the encoders you get with Premiere. I've tried the mpeg2, mpeg4, and windows encoders, and don't get quite the same results. One of the final destinations is a you tube "hi-def" video. I also make windows movie files since they also can be viewed while streaming via Windows Movie player. My web host throttles throughput to 350kb per second now, so I keep most of my videos at 640x480 at around 1972kbps for the video, 128kbps for the audio. <br /><br />Example wmv video from racing game<br />http://jeffareid.net/nfsuc/nucreoznds.wmv<br /><br />Example youtube video same video (<ctrl>+click to open new window):<br />http://www.youtube.com/watch?v=wQuRfJMgsms&fmt=22<br /><br />Better example of youtube video, I don't know if it's content related or if youtube compressed better. This video was uploaded well before youtube had hi-def, but apparently they keep the original and re-encoded it for me. This is of a radio control glider at a slope site. Click on the lower right icon box to toggle between desktop and full screen (<ctrl>+click to open new window):<br /><br />http://www.youtube.com/watch?v=LUVRUMc7DP8&fmt=22

  • How to use Flex Components with Flash?

    Hi!!
    I found a lot of very useful components in the web, but they are all for  Flex, is it possible to use Flex Components with Flash IDE?
    Thanks !!!
    jenry
    PS: this is one of the components I need to use (a tree with checkbox  nodes)
    http://www.sephiroth.it/file_detail.php?pageNum_comments=30&id=151
    another one:
    http://www.darronschall.com/weblog/2006/09/a-flex-2-checked-tree-control-component.cfm

    Flex components are delivered as SWCs just like Flash components, but the
    SWC format is incompatible with the Flash IDE.
    Also, the default fl.. components in the Flash IDE are incompatible with
    Flex components.
    You should be able to load a Flex SWF into a Flash SWF as long as you aren't
    using fl.. components in the Flash SWF.  If the Flex SWF overlays things
    in your Flash SWF then it might block interaction, but otherwise it
    shouldn't.  I don't think the statement you quoted is true for all
    configurations.
    But loading a Flex SWF into a Flash SWF isn't going to help you use those
    Flex components from your Flash IDE.  Try Flash Builder 4 to build out the
    Flex portion of your application.  I haven't tried it myself, but it I think
    it is supposed to have better integration with Flash.

  • Using GDB to debug a code compiled with Sun cc

    When using gdb to debug C code compiled with Sun's cc, the step-into doesn't work, i can only "step into" a function if i put a breakpoint on it. Also, sometimes if i set a breakpoint on a function name, like "break foo", gdb indeed breaks when foo is reached, but without showing the source code (this i could not reproduce with a small demo program).
    I am using Sun Studio 12 on a SunOS 5.10 sun4u sparc machine.
    My demo program is:
    #include <stdio.h>
    #include <strings.h>
    void func1(str)
    char str;
    printf("This is the first line\n");
    printf("STR: %s\n",str);
    int main()
    char str[10];
    strcpy(str,"lalalal");
    printf("Calling func1\n");
    func1(str);
    printf("Returned from func1\n");
    The compilation command i run is:
    cc -c -g step_into.c -o step_into.o
    cc -g -o step_into step_into.o
    When running the program with gdb, the "step" command does not step into func1, but runs it like "next".
    I know there's the dbx debugger, but if there's a way to fix this with gdb - it is much preferable for us. Switching to dbx is not really feasible for us.
    Regards,
    Yael

    Hello Yael,
    I tried your example on my laptop (OpenSolaris x86/x64) with Sun Studio 12 update 1
    and GDB 6.3.50 - it works properly:
    $ gdb dist/Debug/SunStudio-Solaris-x86/forum_c_20091230
    GNU gdb 6.3.50_2004-11-23-cvs
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i386-pc-solaris2.11"...
    (gdb) break main
    Breakpoint 1 at 0x8050a87: file src/args.c, line 15.
    (gdb) run
    Starting program: /export/home/nikm/SunStudioProjects/Forum_C_20091230/dist/Debug/SunStudio-Solaris-x86/forum_c_20091230
    Breakpoint 1, main () at src/args.c:15
    15         printf("Calling func1\n");
    Current language:  auto; currently minimal
    (gdb) next
    Calling func1
    16         func1(str);
    (gdb) step
    This is the first line
    func1 (str=0x80477ba "lalalal") at src/args.c:7
    7         printf("STR: %s\n",str);
    (gdb) Could you please download and try Sun Studio 12 update 1?
    It is available for free. Here is the web page:
    http://developers.sun.com/sunstudio/
    BTW, which GDB version do you use?
    I'll try it on a sparc system and let you know.
    Thanks.
    Nik
    P.S.: there is a typo in the source code:
    void func1(str)
    *char *str;I think it should be:
    void func1(char *str)Probably a copy-paste problem.
    Please use "CODE" mode when you copy-paste source lines (selected text, press 'CODE' button).

  • Using BC4J Components with different App Servers

    Can we use BC4J with 3rd party Application Servers (WebSphere, Weblogic, iPlanet etc)?
    If so any advantages (Performance, Implementation, installation) in using these components with Oracle iAS?
    Thanks
    null

    BC4J allows different ways of deploying your application.
    1) Local Mode : where your client application and BC4J application are colocated togther and running in the same VM
    2) As a EJB session bean
    3) As a corba server object.
    Using the Local mode deployment option you can deploy the BC4J application to any appservers (weblogic, websphere, iplanet) as long as they have standard VM and if your client application is JSP or Servlet then the appservers need a JSP or Servlet engine.
    In JDeveloper 3.1 you can deploy BC4J applicaiton as EJB session bean to Oracle8i
    In JDeveloper 3.2 ( which will released in next few weeks) you can deploy BC4J application as EJB session bean to Oracle8i , Oracle iAS and weblogic .
    iAS comes preconfigured with BC4J runtime by default
    raghu

  • HTML plays swf using CS3 but not with CS4

    I apologize if this is a question that gets answered and I just haven't seen it...
    I encode an .avi file to .flv using CS3 encoder, publish it to an html page and upload it (along with all neccessary pages and files) and it plays fine. Here is my page.
    http://www.dreammakerproductions.com/cs3.html
    I do the exact same thing using CS4 and I get nothing when trying to play it via the web. I have all necessary files uploaded.
    http://www.dreammakerproductions.com/cs4.html
    I try to manuallly insert the .swf into the html page (rather than "publishing" using Flash) and I still get nothing.
    http://www.dreammakerproductions.com/cs4_insert_swf.html
    I manually insert the .flv file into html page, and it plays, however, it is very jerky and not the look and feel I want, but it does play, which confuses me even more?
    http://www.dreammakerproductions.com/cs4_insert_flv.html
    All 4 examples play locally on my machine. The only difference is when I play any of the CS4 versions locally, I get the active X security bar, but when I play the CS3 version, I do not get it.
    Also, I am using GoDaddy as my hosting, surely the problem isn't on their end with some sort of CS4 issue?
    Am I not doing something right when I encode using CS4?
    Any help would be appreciated. I am trying not uninstall CS4 and reinstall CS3 but I am losing hope.

    The CS4 file is being loaded into the page, it just isn't playing for some reason.  If you link direcly to the swf rather than any html page embedding it you can see this (or not see it to be more correct).  So the problem doesn't involve the embedding.  The file is stuck setting up somewhere along the line when it loads.
    Do you have the most recent version of CS4 installed (10.0.2, I believe)?

  • Using 4.2 compiler with solaris 8?

    Does anyone know if it is possible to get/use the 4.2 compiler with Solaris 2.8? If not, have people found that compat=4 was an adequate workaround? Thanks, John Ranta
    Feel free to copy reply to my email
    [email protected]

    i don't know if it is possible to use the 4.2 compiler with solaris 8.
    however we have used the compat=4 option for some ported code that
    did not compile under the Forte 6 compiler without compat. we
    have not seen a problem using compat=4 as a workaround.

  • Other Components Drawing Dashed Lines doesn't compile with Flex 4

    The lib was created in 2006 so it doesn't compile with Flex 4.
    The lib can be downloaded here http://www.quietlyscheming.com/blog/charts/dashed-lines/
    When compiling I get this error:
    Description     Resource     Path     Location     Type
    1136: Incorrect number of arguments.  Expected 3.     GraphicsUtils.as     /arrows/src/qs/utils     line 66     Flex Problem
    The line which doesn't compile:
    stroke.apply(target);
    How do I fix this error?

    I managed to compile the lib by rewriting the line:
    stroke.apply(target, new Rectangle(), new Point());
    But I don't understand what I have done.
    All Rectangle and Point dimensions are 0, but I'm sure it shouldn't be this way.

  • Using Flash Components in multiple SWCs inside AS-only project

    Ok, this is a somewhat complicated issue dealing with SWCs and compilers. I've outlined steps to reproduce the problem below. I'm using the method outlined here to bring in Flash content to my project. I have 15-20 SWCs already, and it's working fine for those assets, the problem is specifically related to Flash's components (ComboBox, RadioButton etc.) If anyone has *any* advice on this, please let me know as we are completely stumped at this point!
    The issue we're having involves using multiple external SWC files which contain AS3 components from Flash CS4. When two SWCs are linked to an ActionScript project (using Flash Builder 4 Beta (build 4.0.0)) there are collisions in the referenced classes which cause the most recently published SWC to knock out any duplicate classes in the other SWCs. A simple way to replicate this is as follows:
    1. Create one FLA, called 'compA', drag one ComboBox, RadioButton and TextInput component onto the stage. Select all and convert to symbol, marking the symbol for export with a class name of Test1.
    2. Create a second FLA, called 'compB', drag one ComboBox, Label and UIScrollbar onto the stage. Convert these to a symbol with a classname of 'Test2'.
    3. Create a new ActionScript-only project in Flash Builder, called 'ComponentTest'.
    4. Create a 'libs' folder in this new project. Select 'Project -> Properties -> ActionScript Build Path' and add the libs folder as a new SWC folder in the Library Path window.
    5. Go back to compA.fla and right click the Test1 symbol in the library. Select 'Export SWC file...' and save it as compA.swc in the libs folder.
    6. Do the same thing for compB.fla.
    7. Edit ComponentTest.as and in the constructor, create an instance of Test1 and Test2, placing each on the stage.
    8. Run the app, and the ComboBox will only be functional in one instance (whichever was published last.) The other ComboBox will behave like a MovieClip, cycling over the two frames in the stage asset (avatar and skin.) It will have no association to anything in the fl.* package.
    Looking at the 'Referenced Libraries' in Flash Builder, compA may show it contains classes for the RadioButton and TextInput, but no ComboBox classes are referenced (sometimes it will show no classes at all, but this appears to be an unrelated bug with refreshing external libraries in Flash Builder.)
    Unzipping the SWC files and examining their catalog.xml manifests shows all the necessary classes are listed (i.e. ComboBox is in both.)
    Removing either SWC will cause the remaining one to work properly, so the problem appears to be in compiling the ComponentTest project which includes both.
    Attempted Workarounds:
    1. Create a new FLA, drag all components used in both files onto the stage and export a SWC called 'components.swc'. Add this SWC to the project's libs folder. In both compA and compB FLA files, add this SWC as an external library in the ActionScript 3.0 Publish settings. Re-export both SWCs. The theory is that the compiler will look for the required classes in the components.swc first, and thus not include them in the export, however this is not the case.
    2. Same as above, deleting ComponentShim from both FLAs before exporting. The result is that no component classes are included, so all components act like MovieClips.
    3. Add the Components source folder to the external library path of both FLAs, assuming the compiler will favor classpath references over compiled class references (ComponentShim). Same result.
    Summary: We have been unable to find a way to use Flash Components in a project if they are referenced in more than one asset library. If we were able to import them once, and have all SWCs which need those classes use a single source, this might not be an issue, but the compiler does not appear to handle this (and we are admittedly not advanced enough to even know if this is possible.)

    Hi!
    I'm having the same problem. Any news on the matter?
    Also, this looks like a very similar problem.
    Best regards,
    X_AmonPL.

  • Can I distribute the open source SWF compiler with my application?

    I'm unclear reading the documentation if there is a difference between Adobe's official Flex SDK, and the open source version?
    Can I distribute the open source SWF compiler with my application?
    I have a flash application that users can change the fonts being displayed, if they supply the fonts in a compiled SWF. I found I can let the user select a font from their computer system, and using the mxmlc command I can easily generate a SWF with the font, which can be loaded by my application so the font will be part of the run time application when played on systems without that font already in the System fonts.
    I was wondering if I could distribute the open source SDK so that I could compile these font SWFs for the user so they would not have to get involved in complicated Flash development. The audience is non Flash audience.
    I tried using SWFMill but the fonts don't seem to work as they do with the mxmlc compile.
    Thank you,
    Scott Kerr

    Moreover check also the compatibility of your open source license with MPL
    Regards, Giuseppe

  • Installing GoLive CS2 with Master Collection CS3

    I have just taken possession of a beautiful new system with the full Adobe Master Collection already installed by my computer guru man. The new system is very fast etc but I kept with XP 'cos had heard too many horror stories about Vista.
    After getting the computer home (I live 2 hours drive away from the guru) I remembered that I forget to ask him to install my old CS2 GoLive with menumachine. I need to have GoLive (and the wonderful Menumachine) to update my GoLive sites. For a while anyway.
    He thinks I should be very careful about just installing GoLive with the new CS3 collection because it could cause problems like "some of the shared components may overwrite the new CS3 versions" (whatever that means) He said I should have installed the old version of GoLive before installing CS3 to make this less likely. He said I might be best to uninstall the Master Collection. Start again and install GoLive CS2 first and then the CS3 next. He suggested I ask you.
    Has anyone been down this path?
    Also I still have GoLive CS2 installed and active on my old PC, will I be allowed to legally install it on the new one too? Or will that count as piracy and cause problems? I also have it on another little computer I have that I use (very rarely) as a kind of laptop.
    My new computer has a two hard disks a C-drive and a D-drive - I was wondering if it would help if I installed GoLive CS2 on the D disk - everything is currently on the C disk.

    If it were up to me, I would only have GL on two systems per the license
    agreement.
    Then, I would try installing GL CS2 and if everything works, great. If not,
    then uninstall the Adobe stuff and reinstall it as your guru suggested.
    ~Nick

  • Example code for java compiler with a simple GUI

    There is no question here (though discussion of the code is welcome).
    /* Update 1 */
    Now available as a stand alone or webstart app.! The STBC (see the web page*) has its own web page and has been improved to allow the user to browse to a tools.jar if one is not found on the runtime classpath, or in the JRE running the code.
    * See [http://pscode.org/stbc/].
    /* End: Update 1 */
    This simple example of using the JavaCompiler made available in Java 1.6 might be of use to check that your SSCCE is actually what it claims to be!
    If an SSCCE claims to display a runtime problem, it should compile cleanly when pasted into the text area above the Compile button. For a compilation problem, the code should show the same output errors seen in your own editor (at least until the last line of the output in the text area).
    import java.awt.BorderLayout;
    import java.awt.Font;
    import java.awt.EventQueue;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JLabel;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JButton;
    import javax.swing.SwingWorker;
    import javax.swing.border.EmptyBorder;
    import java.util.ArrayList;
    import java.net.URI;
    import java.io.ByteArrayOutputStream;
    import java.io.OutputStreamWriter;
    import javax.tools.ToolProvider;
    import javax.tools.JavaCompiler;
    import javax.tools.SimpleJavaFileObject;
    /** A simple Java compiler with a GUI.  Java 1.6+.
    @author Andrew Thompson
    @version 2008-06-13
    public class GuiCompiler extends JPanel {
      /** Instance of the compiler used for all compilations. */
      JavaCompiler compiler;
      /** The name of the public class.  For 'HelloWorld.java',
      this would be 'HelloWorld'. */
      JTextField name;
      /** The source code to be compiled. */
      JTextArea sourceCode;
      /** Errors and messages from the compiler. */
      JTextArea output;
      JButton compile;
      static int pad = 5;
      GuiCompiler() {
        super( new BorderLayout(pad,pad) );
        setBorder( new EmptyBorder(7,4,7,4) );
      /** A worker to perform each compilation. Disables
      the GUI input elements during the work. */
      class SourceCompilation extends SwingWorker<String, Object> {
        @Override
        public String doInBackground() {
          return compileCode();
        @Override
        protected void done() {
          try {
            enableComponents(true);
          } catch (Exception ignore) {
      /** Construct the GUI. */
      public void initGui() {
        JPanel input = new JPanel( new BorderLayout(pad,pad) );
        Font outputFont = new Font("Monospaced",Font.PLAIN,12);
        sourceCode = new JTextArea("Paste code here..", 15, 60);
        sourceCode.setFont( outputFont );
        input.add( new JScrollPane( sourceCode ),
          BorderLayout.CENTER );
        sourceCode.select(0,sourceCode.getText().length());
        JPanel namePanel = new JPanel(new BorderLayout(pad,pad));
        name = new JTextField(15);
        name.setToolTipText("Name of the public class");
        namePanel.add( name, BorderLayout.CENTER );
        namePanel.add( new JLabel("Class name"), BorderLayout.WEST );
        input.add( namePanel, BorderLayout.NORTH );
        compile = new JButton( "Compile" );
        compile.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
              (new SourceCompilation()).execute();
        input.add( compile, BorderLayout.SOUTH );
        this.add( input, BorderLayout.CENTER );
        output = new JTextArea("", 5, 40);
        output.setFont( outputFont );
        output.setEditable(false);
        this.add( new JScrollPane( output ), BorderLayout.SOUTH );
      /** Compile the code in the source input area. */
      public String compileCode() {
        output.setText( "Compiling.." );
        enableComponents(false);
        String compResult = null;
        if (compiler==null) {
          compiler = ToolProvider.getSystemJavaCompiler();
        if ( compiler!=null ) {
          String code = sourceCode.getText();
          String sourceName = name.getText().trim();
          if ( sourceName.toLowerCase().endsWith(".java") ) {
            sourceName = sourceName.substring(
              0,sourceName.length()-5 );
          JavaSourceFromString javaString = new JavaSourceFromString(
            sourceName,
            code);
          ArrayList<JavaSourceFromString> al =
            new ArrayList<JavaSourceFromString>();
          al.add( javaString );
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          OutputStreamWriter osw = new OutputStreamWriter( baos );
          JavaCompiler.CompilationTask task = compiler.getTask(
            osw,
            null,
            null,
            null,
            null,
            al);
          boolean success = task.call();
          output.setText( baos.toString().replaceAll("\t", "  ") );
          compResult = "Compiled without errors: " + success;
          output.append( compResult );
          output.setCaretPosition(0);
        } else {
          output.setText( "No compilation possible - sorry!" );
          JOptionPane.showMessageDialog(this,
            "No compiler is available to this runtime!",
            "Compiler not found",
            JOptionPane.ERROR_MESSAGE
          System.exit(-1);
        return compResult;
      /** Set the main GUI input components enabled
      according to the enable flag. */
      public void enableComponents(boolean enable) {
        compile.setEnabled(enable);
        name.setEnabled(enable);
        sourceCode.setEnabled(enable);
      public static void main(String[] args) throws Exception {
        Runnable r = new Runnable() {
          public void run() {
            JFrame f = new JFrame("SSCCE text based compiler");
            f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            GuiCompiler compilerPane = new GuiCompiler();
            compilerPane.initGui();
            f.getContentPane().add(compilerPane);
            f.pack();
            f.setMinimumSize( f.getSize() );
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        EventQueue.invokeLater(r);
    * A file object used to represent source coming from a string.
    * This example is from the JavaDocs for JavaCompiler.
    class JavaSourceFromString extends SimpleJavaFileObject {
      * The source code of this "file".
      final String code;
      * Constructs a new JavaSourceFromString.
      * @param name the name of the compilation unit represented
        by this file object
      * @param code the source code for the compilation unit
        represented by this file object
      JavaSourceFromString(String name, String code) {
        super(URI.create(
          "string:///" +
          name.replace('.','/') +
          Kind.SOURCE.extension),
          Kind.SOURCE);
        this.code = code;
      @Override
      public CharSequence getCharContent(boolean ignoreEncodingErrors) {
        return code;
    }Edit 1:
    Added..
            f.setMinimumSize( f.getSize() );Edited by: AndrewThompson64 on Jun 13, 2008 12:24 PM
    Edited by: AndrewThompson64 on Jun 23, 2008 5:54 AM

    kevjava wrote: Some things that I think would be useful:
    Suggestions reordered to suit my reply..
    kevjava wrote: 2. Line numbering, and/or a line counter so you can see how much scrolling you're going to be imposing on the forum readers.
    Good idea, and since the line count is only a handful of lines of code to implement, I took that option. See the [line count|http://pscode.org/stbc/help.html#linecount] section of the (new) [STBC Help|http://pscode.org/stbc/help.html] page for more details. (Insert plaintiff whining about the arbitrary limits set - here).
    I considered adding line length checking, but the [Text Width Checker|http://pscode.org/twc/] ('sold separately') already has that covered, and I would prefer to keep this tool more specific to compilation, which leads me to..
    kevjava wrote: 1. A button to run the code, to see that it demonstrates the problem that you wish for the forum to solve...
    Interesting idea, but I think that is better suited to a more full blown (but still relatively simple) GUId compiler. I am not fully decided that running a class is unsuited to STBC, but I am more likely to implement a clickable list of compilation errors, than a 'run' button.
    On the other hand I am thinking the clickable error list is also better suited to an altogether more abled compiler, so don't hold your breath to see either in the STBC.
    You might note I have not bothered to update the screenshots to show the line count label. That is because I am still considering error lists and running code, and open to further suggestion (not because I am just slack!). If the screenshots update to include the line count but nothing else, take that as a sign. ;-)
    Thanks for your ideas. The line count alone is worth a few Dukes.

Maybe you are looking for

  • Importing Elastik loops into GB

    Well I thought I had it all figured out but now I find I'm missing something.... You can "bounce" samples from Elastik to wav files and convert them to Aiff through itunes but for some reason, I'm not able to import as a "loop" which will conform to

  • How to create a multi value property

    Hello, I've defined a new property to use with the FAQ form, and set it to a multi value enabled (Multi-Valued checkbox on, Property Renderer set to multivalued). I've added a new Combo Box object to the form using Form Builder, and assign the proper

  • How can I make settlement rule mandatory in create work order (IW31)

    How can I make settlement rule mandatory in create workorder and saving without release. I kanow we can make settlement rule mandatory upon Release order but here requirement is Create work order (IW21) save without releasing that time settlement rul

  • Catching java.lang.NullPointerException with cftry/cfcatch?

    I'm getting a java.lang.NullPointerException returned on an update function in a CFC: "The cause of this output exception was that: java.lang.NullPointerException." I want to find where it's generating this error so I can fix it. I've never really us

  • How to create an event

    hi to all i m beginner in java programming and i want to do event handling on mouse click. i have a button JButton btnclose = new JButton("Close"); //in main area btnclose.addMouseListener(this); //in main area then after the main block i have this c