Using GetFormattedValue with Boolean Array to create ReportText

What is the C (printf) style format for outputting a Boolean array?
I currently use to get 
Step.Result.ReportText = Locals.Outlets.GetFormattedValue("",0,"",False,"\n")
Outlet State
Status:
Done
Module Time:
1.6116278
False
True
False
False
False
False
False
False  
I would like to format the output to show:
Outlet State
Status:
Done
Module Time:
1.6116278
OFF
ON
OFF
OFF
OFF
OFF
OFF
OFF
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Hi Phillip,
interresting question, because the c-style doesnt know a datatype "boolean".
So i am quite sure there is no support.
You can do a simple workaround by using twice SearchAndReplace to rename True and False
in the same expression
Hope that helps
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
Attachments:
Example.seq ‏5 KB

Similar Messages

  • Airline Reservation System with boolean Array

    Good morning,
    I have written the following code for an airline reservation system. The applet will assign the user a seat in either economy or first class. When first class is full, it will offer economy seats. This works - but when it is about to assign the last seat in 'economy', the program stops working. The error messages suggest a problem in the method call to selectSeat() in the 'economy' part of the code. I can't see the problem, though, as this code is identical to the code I used for the 'first class' part.
    //Airline booking
    //Coded by Eoghain on 16/9/07
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class AirlineApplet extends JApplet implements ActionListener {
         JButton printPass;
         JTextArea outputArea;
         String output;
         int seatType, seatNum, choice;
         boolean[] seatArray = {false, false, false, false, false, false, false, false, false, false};
         public void init() {
              Container container = getContentPane();
              container.setLayout(new FlowLayout());
              chooseType();
              printPass = new JButton ("Click to print boarding pass");
              printPass.addActionListener(this);
              outputArea = new JTextArea(40, 40);
              container.add(printPass);
              container.add(outputArea);
         public void chooseType() {
              seatType = Integer.parseInt(JOptionPane.showInputDialog("Please type 1 first First Class or 2 for Economy"));
              selectSeat(seatType);
         public void actionPerformed(ActionEvent event) {
              outputArea.append(output);
              chooseType();
         public void selectSeat(int x) {
              //argument selects between first and economy
              if (x == 1)
                   if (seatArray[0] && seatArray[1] && seatArray[2] && seatArray[3] && seatArray[4])
                        choice = Integer.parseInt(JOptionPane.showInputDialog("There are no seats available in First Class. Would you like Economy? 1 for Yes, 2 for No."));
                        if (choice == 1)
                             selectSeat(2);
                        else
                             JOptionPane.showMessageDialog(null, "Next flight leaves in 3 hours.");
                   else
                   //do first stuff and make sure the seat is unoccupied
                   seatNum = (int)(Math.random()*5);
                        if (!seatArray[seatNum])
                             seatArray[seatNum] = true;
                        else
                             selectSeat(x);
                   output = "Your have seat " + seatNum + " in First Class. \n";
              else
                   if (seatArray[5] && seatArray[6] && seatArray[7] && seatArray[8] && seatArray[9])
                        JOptionPane.showMessageDialog(null, "There are no seats available in Economy. Sorry.");
                   else
                   //do economy stuff
                   seatNum = (5 + (int)(Math.random()*4));
                        if (!seatArray[seatNum])
                             seatArray[seatNum] = true;
                        else
                             selectSeat(x);
                   output = "Your have seat " + seatNum + " in Economy. \n";
    }Any advice would be greatly appreciated,
    -Eoghain

    You've created a nice little infinite loop in selectSeat here:
        if (!seatArray[seatNum])
            seatArray[seatNum] = true;
        else
            selectSeat(x);If you run out of 2nd class seats, your program isn't told to stop, it's told to just keep looking and looking and looking and looking and looking and looking and looking and looking and looking ...
    and so on. Don't do this.

  • How do I use Firebug with a website I created? I want to see how long each thing takes to load on the page. The server is very slow.

    I have created a website/blog with Wordpress. It appears to be on a slow server because it can't be opened or takes forever to open. A representative from Wordpress told me to download Firebug to find out how long each thing takes to load on the page. I downloaded Firebug but I can't figure out how to use it. Please advise.

    OK. You've kind of skipped over the reason why you want to go back five hours, but my assumption would be that you've made changes to a Pages file that you want to revert.
    There are two ways to tackle this. From Pages itself, open the current version of your document, and from the File menu, click Revert To, and Browse All Versions. You'll then be in the Time Machine interface for that file, and can browse back to the version you want.
    Or, outside of Pages, you can select the file (or the folder it was originally in, if you've since deleted it) and enter Time Machine from the TM menu (it sounds like you've already tried this?)
    best
    Matt

  • Anyone using Cisco with Fujitsu arrays?

    It looks like a partner company will probably need access on our SAN, and they are a fujitsu shop(I've gotten only an email stating a quick meeting with them next week and mentioning fujitsu). So, I deal only with EMC and IBM hardware, and haven't used Fujitsu....How do the devices compare, are there any issues with san attaching their arrays to MDS....Etc.

    it does look like the oem some of their smaller arrays from EMC... I can't find anything on their larger ones....

  • Trying to use .split with an array element

    I have tried multiple ways to split an array element into its components that are separated with a space with this code:
    public static void compareHand(String[] hand){
            for (int i = 0; i < hand.length; i++){
                System.out.println(i);
                System.out.println(hand);
    String[] tokens = hand[i].split("\\s");
    System.out.println(tokens.length);
    for (int j = 0; j < tokens.length; j++){
    System.out.println(tokens);
    I keep getting strange output like the following:
    King of Spades
    3
    [Ljava.lang.String;@10b62c9
    [Ljava.lang.String;@10b62c9
    [Ljava.lang.String;@10b62c9
    where I am expecting:
    King of Spades
    3
    King
    of
    Spades
    Any ideas where I am going wrong?

    public static void compareHand(String[] hand){
             for (int i = 0; i < hand.length; i++){
                  System.out.println(i);
                  System.out.println(hand);
    String[] tokens = hand[i].split("\\s");
    System.out.println(tokens.length);
    for (int j = 0; j < tokens.length; j++){
    System.out.println(tokens); // your error is on this line. Hint ... System.out.println(tokens[...]);

  • Change spacing between "LED's" in 2D boolean array indicator

    Hi All
    In my application I am tring to mimic a LED matrix sign using a 2D boolean array indicator. Its obvious enough how to chage the size of the LED's in the array indicator but I would also like to reduce  the spacing between LED's as I have very small leds with two much space between them!!
    Could someone kindly send me an example or tell me waht steps to take using customize indicators function etc.
    Also can this be changed programatically using property nodes, so for instance i can resize the spacing to mimic LED signs with different LED densities?
    Many Thanks!
    Tristan

    Hi Tristan
    You could try customising the boolean in your array.  Right click on an element of your array, select Advanced->Customise....  You can then modify the appearance of the boolean to your requirements, using decorations for example to modify the spacing.
    You will be prompted to update your array with the modified version once you have finished your edits.
    Had a quick play, see attachments
    Hope this helps
    Steve
    There are 10 types of people in the world that understand binary, those that do and those that don't.
    Attachments:
    ModArray.vi ‏9 KB
    ModBoolean.ctl ‏6 KB

  • Entities with booleans in JPA Diagram

    Hi,
    I'm trying to use the EJB/JPA Diagram in jdev 11.1.1.2.0 with entities that have boolean field and, everytime I add them to the diagram, jdev crashes. If I remove the booleans, everything works.
    Does anyone has seen that? It is easy to replicate:
    1) Create a new entity in java editor with booleans members;
    2) Create a new EJB/JPA diagram
    3) Add the entity to the diagram
    The error details are:
    Performing action Grid[ from oracle.modeler.addin.ModelerEditor ]
    Invoking command: Layout
    Performing action Hierarchical (Bottom to Top)[ from oracle.modeler.addin.ModelerEditor ]
    Invoking command: Layout
    Performing action Symmetrical[ from oracle.modeler.addin.ModelerEditor ]
    Invoking command: Layout
    Performing action Hierarchical (Bottom to Top)[ from oracle.modeler.addin.ModelerEditor ]
    Invoking command: Layout
    Performing action Properties...[ from oracle.modeler.addin.ModelerEditor ]
    Performing action Properties...[ from oracle.modeler.addin.ModelerEditor ]
    Performing action Save[ from oracle.modeler.addin.ModelerEditor ]
    Invoking command: [ from oracle.modeler.addin.ModelerEditor ]
    java.lang.NullPointerException
    o.j.ejb.Entity30Helper.gatherEntity30Fields(Entity30Helper.java:205)
    o.j.ejb.EjbClassEngine.getEjbFields(EjbClassEngine.java:301)
    o.j.ejb.EjbClassEngine.getEjbFields(EjbClassEngine.java:277)
    o.j.ejb.BaseEjbEngine.gatherEjbFields(BaseEjbEngine.java:1536)
    o.j.ejb.BaseEntityEngine.getFields(BaseEntityEngine.java:400)
    o.j.ejbmodeler.mediator.EjbModelerNodeMediator.loadFields(EjbModelerNodeMediator.java:145)
    o.j.ejbmodeler.mediator.EjbModelerNodeMediator.updateGraphic(EjbModelerNodeMediator.java:101)
    o.modeler.uml.config.BaseMediator.handleUpdate(BaseMediator.java:367)
    o.modeler.uml.config.BaseMediator.updateGraphic(BaseMediator.java:234)
    o.modeler.uml.config.MGMediator.updateGraphic(MGMediator.java:139)
    o.modeler.uml.config.ClassifierMediator.updateGraphic(ClassifierMediator.java:27)
    o.modeler.mediation.MediationManager$GraphicUpdater.apply(MediationManager.java:640)
    ilog.views.IlvManager.applyToObject()
    o.modeler.mediation.MediationManager$GraphicUpdater.run(MediationManager.java:628)
    o.modeler.mediation.MediationManager.updateGraphics(MediationManager.java:594)
    o.modeler.mediation.MediationManager.processEvent(MediationManager.java:510)
    o.modeler.mediation.MediationEvent.process(MediationEvent.java:185)
    o.modeler.mediation.MediationManager.dispatchEvents(MediationManager.java:439)
    o.modeler.mediation.MediationManager.access$100(MediationManager.java:86)
    o.modeler.mediation.MediationManager$1.run(MediationManager.java:356)
    j.a.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    j.a.EventQueue.dispatchEvent(EventQueue.java:597)
    j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    j.a.EventDispatchThread.run(EventDispatchThread.java:122)
    java.lang.NullPointerException
    o.j.ejb.Entity30Helper.gatherEntity30Fields(Entity30Helper.java:205)
    o.j.ejb.EjbClassEngine.getEjbFields(EjbClassEngine.java:301)
    o.j.ejb.EjbClassEngine.getEjbFields(EjbClassEngine.java:277)
    o.j.ejb.BaseEjbEngine.gatherEjbFields(BaseEjbEngine.java:1536)
    o.j.ejb.BaseEntityEngine.getFields(BaseEntityEngine.java:400)
    o.j.ejb.BaseEntityEngine.getEjb3Relationships(BaseEntityEngine.java:1413)
    o.j.ejbmodeler.id.EjbElementReference.populateThatEndIfOwningSide(EjbElementReference.java:248)
    o.j.ejbmodeler.id.EjbElementReference.get(EjbElementReference.java:145)
    o.j.ejbmodeler.config.RelationshipConfig$1.findEnds(RelationshipConfig.java:134)
    o.modeler.dif.ModelerGraphicBridge.verifyConnections(ModelerGraphicBridge.java:1053)
    o.modeler.dif.ModelerGraphicBridge.verifyConnections(ModelerGraphicBridge.java:1009)
    o.j.ejbmodeler.mediator.EntityMediator.loadEntityRelationships(EntityMediator.java:138)
    o.j.ejbmodeler.mediator.EntityMediator.mediate(EntityMediator.java:86)
    o.j.ejbmodeler.mediator.EjbModelerNodeMediator.updateGraphic(EjbModelerNodeMediator.java:104)
    o.modeler.uml.config.BaseMediator.handleUpdate(BaseMediator.java:367)
    o.modeler.uml.config.BaseMediator.updateGraphic(BaseMediator.java:234)
    o.modeler.uml.config.MGMediator.updateGraphic(MGMediator.java:139)
    o.modeler.uml.config.ClassifierMediator.updateGraphic(ClassifierMediator.java:27)
    o.modeler.mediation.MediationManager$GraphicUpdater.apply(MediationManager.java:640)
    ilog.views.IlvManager.applyToObject()
    o.modeler.mediation.MediationManager$GraphicUpdater.run(MediationManager.java:628)
    o.modeler.mediation.MediationManager.updateGraphics(MediationManager.java:594)
    o.modeler.mediation.MediationManager.processEvent(MediationManager.java:510)
    o.modeler.mediation.MediationEvent.process(MediationEvent.java:185)
    o.modeler.mediation.MediationManager.dispatchEvents(MediationManager.java:439)
    o.modeler.mediation.MediationManager.access$100(MediationManager.java:86)
    o.modeler.mediation.MediationManager$1.run(MediationManager.java:356)
    j.a.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    j.a.EventQueue.dispatchEvent(EventQueue.java:597)
    j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    j.a.EventDispatchThread.run(EventDispatchThread.java:122)
    (sorry for my english)

    uhmm... I guess not, the specification says:
    "The persistent fields or properties of an entity may be of the following types: Java primitive types; java.lang.String; other Java serializable types (including wrappers of the primitive types, java.math.BigInteger, (...) "
    so it should accept the Booleans or booleans members. I've tried both and got the same problem. It looks more like a bug in the layout designer.

  • For new upgrade Camera Raw 8.4, I cant'nt use it with Bridge ...

    Bonjour
    Depuis la mise a jour Camera raw 8.4
    je n'y ai plus accès dans bridge ; Je ne peut plus ouvrir directement Camera raw dans bridge par le clic droitet  il ne prend plus en compte les mots clés et les corrections déjà faitesCordialement
    Loïc

    Thank you 
    Message du 17/04/14 10:56
    De : "R_Kelly"
    A : "Grignon Loic"
    Copie à :
    Objet : For new upgrade Camera Raw 8.4, I cant'nt use it with Bridge ...
    Re: For new upgrade Camera Raw 8.4, I cant'nt use it with Bridge ...
    created by R_Kelly in Bridge General Discussion - View the full discussion
    Okay, now your in the right library.Use the plugin from this page to replace the existing one in your screenshot.
    (don't forget to remove the plugin folder and plugin you created in your user library)http://helpx.adobe.com/bridge/kb/acr-84-bridge-cs6-metadata.htmlThen you'll probably need to purge the Bridge CS6 cache.http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-6306475-630487/450-209/Untitle d-1.png
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6306475#6306475
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6306475#6306475
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6306475#6306475. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Bridge General Discussion at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • 'Using ColdFusion with Flex – sample does not work

    Hi, I am having problems with Tom Jordahl's article on 'Using
    ColdFusion with Flex – Part 1: Creating and running a contact
    manager application' found on link '
    http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html'
    I do not understand his instruction. In step 4, it states:
    "Copy the channel definition from the example Flex
    configuration files found in resources/config (default location:
    C:\fds2\resources\config\). "
    In that folder, I have the following files:
    data-management-config.xml, messaging-config.xml, proxy-config.xml,
    remoting-config.xml. So which file in this folder am I supposed to
    copy from. And where am I supposed to paste it to? Is it into
    WEB-INF/services-config.xml file ?
    When I ran the test,
    http://localhost:8700/samples/dataservice/cfcontact/contactmgr.mxml,
    I get the following errors:
    4 Errors found.
    Error /dataservice/cfcontact/contactmgr.mxml:31
    Definition samples.contact could not be found.
    30: import mx.rpc.events.*;
    31: import samples.contact.*;
    32:
    I am very new at Flex and trying hard to understand this sw.
    Can someone pse help. Thanks a million.

    What he means is to copy the channel section from the
    C:\fds2\resources\config\services-config.xml file:
    <!-- ColdFusion specific RTMP channel -->
    <channel-definition id="cf-dataservice-rtmp"
    class="mx.messaging.channels.RTMPChannel">
    <endpoint uri="rtmp://{server.name}:2048"
    class="flex.messaging.endpoints.RTMPEndpoint"/>
    <properties>
    <idle-timeout-minutes>20</idle-timeout-minutes>
    <serialization>
    <!-- This must be turned off for any CF channel -->
    <instantiate-types>false</instantiate-types>
    </serialization>
    </properties>
    </channel-definition>
    <!-- ColdFusion specific HTTP channel -->
    <channel-definition id="cf-polling-amf"
    class="mx.messaging.channels.AMFChannel">
    <endpoint
    uri="
    http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling"
    class="flex.messaging.endpoints.AMFEndpoint"/>
    <properties>
    <serialization>
    <!-- This must be turned off for any CF channel -->
    <instantiate-types>false</instantiate-types>
    </serialization>
    <polling-enabled>true</polling-enabled>
    <polling-interval-seconds>8</polling-interval-seconds>
    </properties>
    </channel-definition>
    To the file
    C:\fds2\jrun4\servers\default\samples\WEB-INF\flex\services-config.xml.
    The resources directory contains just templates for
    development, the samples
    directory is a fully-deployed flex app.
    Jorge Hernandez
    "watsonValu" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi, I am having problems with Tom Jordahl's article on
    'Using ColdFusion
    > with
    > Flex ? Part 1: Creating and running a contact manager
    application' found
    > on
    > link
    > '
    http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html'
    > I do not understand his instruction. In step 4, it
    states:
    > "Copy the channel definition from the example Flex
    configuration files
    > found
    > in resources/config (default location:
    C:\fds2\resources\config\). "
    > In that folder, I have the following files:
    data-management-config.xml,
    > messaging-config.xml, proxy-config.xml,
    remoting-config.xml. So which file
    > in
    > this folder am I supposed to copy from. And where am I
    supposed to paste
    > it to?
    > Is it into WEB-INF/services-config.xml file ?
    > When I ran the test,
    >
    http://localhost:8700/samples/dataservice/cfcontact/contactmgr.mxml,
    I get
    > the
    > following errors:
    > 4 Errors found.
    > Error /dataservice/cfcontact/contactmgr.mxml:31
    > Definition samples.contact could not be found.
    > 30: import mx.rpc.events.*;
    > 31: import samples.contact.*;
    > 32:
    >
    > I am very new at Flex and trying hard to understand this
    sw. Can someone
    > pse
    > help. Thanks a million.
    >
    >

  • Using CS5.5 Master Collection for MAC, I can't use "Replace with After Effects composition"

    Using CS5.5 Master Collection for MAC, I can't use "Replace with After Effects composition" because I updated AE to CS6 (but only AE). Even that AE CS 5.5 is still installed, it won't connetct.
    How can that be fixed?
    Thanks a lot for any suggestions.

    Thanks for the answer: I tried different ways (after I read your suggestion) but it always changes back right away ... I can't change it.
    Am 16.01.2013 um 03:04 schrieb Jim Simon:
    Re: Using CS5.5 Master Collection for MAC, I can't use "Replace with After Effects composition"
    created by Jim Simon in Premiere Pro CS5, CS5.5, & CS6 - View the full discussion
    Maybe try associating AE project files with 5.5 instead of 6.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4997081#4997081
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4997081#4997081
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4997081#4997081. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Premiere Pro CS5, CS5.5, & CS6 by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Use boolean array to perform set operations

    I am currently taking a computer science class that uses Java as the language of choice. I have no prior experience with Java. We have a homework assignment in which we are supposed to use a boolean array to implement set operations. We have to create a method that inserts an integer into the array, another that deletes an integer element, and several others. I am confused as how to do this with integers, as it is a boolean array. The datr for this class is:
    private boolean base[];The constructor is:
    public largeset(int size){ }We then have to create a method that inserts an integer into the array:
    public void insert(int i){ }And one that deletes the element:
    public void delete(int i) { }I am unsure how to do this using a boolean array. If it were an integer array I would not have any trouble, but I get an error when trying to insert/delete an integer from the boolean array. Can anyone help point me in the right direction? I would prefer advice only, not the actual code, as this is a homework assignment, and I would like to create the code myself so I actually know what I am doing. Thanks.

    This is the assignment exactly as posted on the course website:
    In this homework, we will use a boolean array to implement various set operations. Please create a class called largeset that supports set operations of any number of elements. The data of this class is
    private boolean[] base;The constructor of the class is
    public largeset(int size);  // create a boolean array of size "size" and store it in "base"The methods of the class are:
    public void insert(int i);  // insert number i into the current set, where 0 <= i < base.length
    public void delete(int i);  // delete number i from the current set, where 0 <= i < base.length
    public boolean member(int i); // test if i is in the set
    public largeset union(largeset B); // return the union of two sets
    public largeset interset(largeset B); // return the intersection of two sets
    public largeset subtract(largeset B); // return the subtraction of two sets
    public largeset complement(); // return the complement of the current set
    public boolean subset(largeset B); // test if the current set is a subset of set B
    public int cardinality();  // return the number of elements in the current set
    public String toString();  // return a string which is a printing of the current setThen create another class called testset that uses the largeset class. At first, please create the following two sets:
    X = { 1, 3, 5, 7, ..., 999 };
    Y = { 9, 18, 27, 36, ..., 999 };
    Please perform the following tests:
    1. display the cardinalities of X and Y, respectively.
    2. display the content of substraction of Y by X.
    3. display the square root of the sum of all the elements of X (Math.sqrt(x) will return the square root of x in double type).
    4. For every pair of distinct elements x and y in Y, compute the sum of (Math.max(x, y) - Math.min(x, y)) (or equivalently, Math.abs(x - y)), and report this sum.

  • Looking for way to replace " with \" inside of coldFusion created array for JSFL

    I am trying to figure out the best way to fix data coming from a database table through the use of ColdFusion, in which there are some quotation marks that JavaScript Flash doesn't want in the array before adding the text content to a quiz.
    At the moment, if there are any quotation marks in the elements of the array, even though each element is surrounded by quotation marks, I have to add a backslash to escape them.
    I was wondering what would be the regular expression to use to do this, not for the quotation marks surrounding each element, but for those used inside of them.
    For example,
    ["08 Working with Flash Forms_16",
    "The syntax for the submit button was .",
    "name="submit" type="submit"",
    "name="submit"action="submit"",
    "id="submit" type="submit"",
    "id="submit"action="submit"",
    "No, name="submit" type="submit" is correct.",
    "true",
    "false",
    "false",
    "false",
    "897"] ,
    is an example of an element created that has quotation marks inside of the quotation marks for each element.
    I am debating about handling this either with XML by writing code to do that with ColdFusion instead of using the code I generated with ColdFusion to create this.
    I am also debating about writing the regular expression in a way that I could use it from either ActionScript 2 or 3.0, going at it at the file level maybe.
    At the moment I am opening the file and experimenting with writing a Find expression that uses regular expression to select what I want to change before changing it.

    I figured this out already. You can use the either the ColdFusion function, Replace, or REReplace if you want to use regular expressions. But I just wrote an actionscript prototype function inside the superclass called replace to fix it using split and join array methods.

  • Using NetBeans Matisse to build a form with an array of JButtons

    With Matisse I can build a form with a lot of buttons on it, but i want to use a 2-dim array of JButtons so that I can easily access the buttons. How should I do this?

    Code it by hand. It's not that hard.
    JButton [][]buttons = new JButton[NUM_ROWS][NUM_COLUMNS];
    for (int row = 0; row < NUM_ROWS; row++) {
       for (int row = 0; row < NUM_ROWS; row++) {
          buttons[row][col] = new JButton();
          // set other properties of buttons[row][col]
    }If there is a lot of stuff, you could even make a separate method for creating a single button:
    private JButton createButton()
       JButton button = new JButton();
       // whatever else
       return button;
    }Then, in the "for" loops:
    buttons[row][col] = createButton();

  • Creating polygons with an array of doubles instead of ints

    Hi,
    I want to create a polygon using:
    Polygon u = new Polygon(xPoints, yPoints, numTs);
    my problem is that my x & y points are stored in double arrays not ints. Is there a way to create a polygon using double arrays instead of ints?
    cheers,
    elmicko

    or cast them as int. imaginr posX, posY, width and height are doubles.
    Rectangle rect = new Rectangle( (int)posX, (int)posY, (int)width,(int)height );or, with an array of doubles:
    Rectangle rect = new Rectangle( (int)array[0], (int)array[1], (int)array[2],(int)array[3] );

  • There should be a way to index an array with an array of indexes or booleans (without a loop)

    Hi, often I would love to index an array with an array of indexes or an array of booleans without having to loop it.  I.e: let the IndexArray function accept an array of indexes instead of discrete indexes.  The output should then be an array of indexes values.  
    Another use case is to index with an array of booleans, so each TRUE element would index the input array and FALSE elements are not indexed.
    arrResult = arrInput[ arrIndexes ];  or
    arrResult = arrInput[ arrVal > 20 ];
    Would this be useful? Possibly it could be implemented in future versions?

    You forgot the link.

Maybe you are looking for