StackLayout works do not (children that overlap)

I'm trying to use the StackLayout in AIR BB10 application for the first time and things are not stacked.

Example code:

package
{
    import flash.display.Sprite;
    import qnx.fuse.ui.dialog.AlertDialog;
    import qnx.fuse.ui.text.Label;
    import flash.events.Event;
    import qnx.fuse.ui.text.TextFormat;

    import qnx.fuse.ui.core.*;
    import qnx.fuse.ui.layouts.stackLayout.*;
    import qnx.fuse.ui.listClasses.*;

    [SWF(width="768", height="1280", backgroundColor="#000000", frameRate="60")]
    public class Example extends Sprite
    {
        private var label1:Label = new Label();
        private var label2:Label = new Label();

        public function Example()
        {
            try
            {
                init();
            }
            catch(error:Error)
            {
                dialog("Error on Initialization", error.message);
            }
        }

        private function init():void
        {
            var container : Container = new Container();
            container.setActualSize(stage.stageWidth, stage.stageHeight);
            container.scrollDirection = ScrollDirection.VERTICAL;

            var layout : StackLayout = new StackLayout();
            layout.padding = 25;

            container.layout = layout;
            addChild(container);

            var myFormat:TextFormat = new qnx.fuse.ui.text.TextFormat();
            myFormat.bold = true;
            myFormat.size = 50;
            myFormat.color = 0xFFFFFF;
            myFormat.font = "Slate Pro";

            label1.text = "A";
            label1.format = myFormat;
            label1.validateNow();
            label1.height = label1.textHeight;
            label1.width = label1.textWidth;
            container.addChild(label1);

            label2.text = "B";
            label2.format = myFormat;
            label2.validateNow();
            label2.height = label2.textHeight;
            label2.width = label2.textWidth;
            container.addChild(label2);
        }

        private function debug(msg:String):void
        {
            dialog("Debug", msg);
        }

        private function dialog(title:String, msg:String):void
        {
            var alert:AlertDialog = new AlertDialog();
            alert.title = title;
            alert.message = msg;
            alert.addButton("Ok");
            alert.show();
        }
    }
}

The labels 'A' and 'B' overlap in the upper left corner.

"The StackLayout class organizes controls in a pile that overlap, where the stack is defined by the control hierarchy."

Well, this explains why.

Why the Cascades StackLayout work go and AIR StackLayout work otherwise?

The Cascades class organizes things horizontally or vertically.

Sigh.

Tags: BlackBerry Developers

Similar Questions

  • make it work how I want that he the rman backup-shared-disk fix - up

    Network of Oracle greetings!
    (Oracle 10g enterprise edition on windows server 2003 platform)

    http://www.DBA-Oracle.com/t_os_error_os5_access_denied.htm

    is a link where a fix on the location of the rman backups is suggested. It asks me to change logon oracleservicesid. my database is what runs a Web site. When I change the connection oracleservicesid the Web site is no longer functions.this is not desirable.
    How can I fix it?
    Even on my test server that hosts the databases, change the opening of session oracleservicesid to administrator, disable all connections made to the database on the local network using SQL developer. How to not let that happen?

    Help, please
    Thanks in advance
    cordially 946207

    Edited by: 946207 July 14, 2012 03:01

    10g is desupported for a long time.
    Your question is you backup to a network drive.
    The solution provided by Donald Burleson is correct.
    Why the site no longer works is not clear that you provide no error message, or whatever.
    Course, a simple solution would be to buy an extra drive to connect directly to the server.
    Your post is poorly understood why you plan to implement that.
    Also, your statement on the test server is far too vague. You did not yet provide no error message.

    ------------
    Sybrand Bakker
    Senior Oracle DBA

  • Settings of records that overlap do not work

    When I call my settings of the duplication of records, they are all "replace". I choose another option in the menus, but they do not. I can not any setting other than "replace". This is true for MIDI and Audio settings.

    Everything else in the dialog box (boxes and count the settings seem to work well. Does anyone else have this problem? I tried to restart my computer and logic, without success. I'm running Logic Pro X 10.2.3 on an iMac 27 "mid-2011.

    Any ideas? Really miss me my records to take.

    OK, set it to 'Create a folder take' to create a folder to take.

    Overlap simply writes a new region that overlaps exist areas, it does not have a folder to take.

    http://help.Apple.com/LogicPro/Mac/10.2.3/#/lgcpbc10f1ea

  • Yahoo page does not work. It seems that java does not work, but I have the latest version installed. Yahoo email page has all scrambled together all left links

    Yahoo page does not work. It seems that java does not work, but I have the latest version installed. Yahoo email page has all the links scrambled together on the left side of the page. Same thing with face book page. All use them to work properly. 64 Waterfox win 7

    Do not use waterfox, it is not supported and is a non-official version of Firefox that often has known bugs. Downlaod Firefox from www.getfirefox.com, uninstall waterfox, then try again.

  • I updated Firefox on my Mac (10.6.8), and now the story is not known (that option is checked) and the back button will not work. Help?

    I updated Firefox on my Mac (10.6.8), and now the story is not known (that option is checked) and the back button will not work. Help?

    One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.

    You can also try to repair the database of places with this extension:

  • IPad disabled with thousands of pictures of children that are not backed up with iTunes or icloud. Recommendations for the recovery of photos please?

    IPad disabled with thousands of pictures of children that are not backed up with iTunes or icloud. Recommendations for the recovery of photos please?

    Sorry, but if your device is disabled and you have no backup, then you won't be able to save the data on the device:

    https://support.Apple.com/en-us/HT204306

    You should back up your device regularly to iCloud or import your photos to an application on your computer. Otherwise, you will be risking losing those photos. If your device has been lost, stolen, or crushed by your car, you'd be in the same situation. Really sorry for your photos.

    Good luck

    GB

  • When I first installed the new 5.1 icloud, OUTLOOK 2016 worked well. Updated windows 10 and know icloud will not work. ICloud show that it works.

    When I first installed the new 5.1 icloud, OUTLOOK 2016 worked well. Updated windows 10 and know icloud will not work. ICloud show that it works. Have reinstalled icloud a lot of time and know that the add-in does not show up in OUTLOOK.  Help

    I was pulling my hair re the incompatibility of iCloud and Outlook of Office 365 2016.  I finally got things to work on three of my computers - which are on the latest version of Windows 10.

    The steps that worked for me:

    (1) uninstall the plugin iCloud (what version you have); the uninstall may fail but if so don't worry as step 3 below overlays some iCloud plugin version you have installed

    (2) open the Control Panel, uninstall, change/repair Office 365; Select fast repair

    (3) reinstall iCloud plugin (version 5.1), then restart the system by following the instructions

    (4) after the reboot, plug in iCloud application Apple ID and password; Make sure that you enter your apple with the suffix icloud.com ID (e.g., [email protected])

    (5) check the iCloud options to your will (e.g., photo synch, synchronization of bookmarks, sync mail/calendar, etc.)

    (6) check apply it, leave the work plugin iCloud for a minute, when he finishes, check the closing

    (7) open Outlook 2016 and check your calendar or contacts or anything that you indicated in step 5, that you want to synchronize with iCloud.com

    I hope it works for you!

  • is there a free download of a certain type of evil or spy ware that will work on windows 2000? I have Clamwin and Spybot, although I'm not sure that Spybot always works because she says that nothing is found.

    Under Win 2000 again.  I have ClamWin and Spybot, even though I'm not sure that Spybot works, he always says that is no problem, ClamWin says he has isolated the virus when I run.

    Is there something the internet compatible with Win 2000 I can download safe?

    Thank you.

    http://Forum.avast.com/index.php?topic=94069.0

    http://www.oldapps.com/avast_antivirus.php?system=Windows_2000

    If Spybot S & D is not may find problems, it's because you're doing a good job in avoiding malware.   Ok...

  • How to remove a domain controller that was removed from the Internet works but not demoted

    How to remove a domain controller that has been remove from the Internet works but not demoted

    got two domain controllers and been deleted but not retrograde

    can help pls

    Hello

    Your Windows is better suited for the directory on TechNet Services. You can follow the link to ask your question: http://social.technet.microsoft.com/Forums/en-us/winserverDS/threads

    I hope this helps.

  • my microsoft work does not work error message that I need to reinstall, but I don't have a disck because it was already installed when I bought at walmart

    I bought my dell computer 2009 Wal-Mart, that he has is already set up with windows vista basic... and now my microsoft works does not work it says I have to reinstall.  However, he is not come with a disc. so, how can I do without having to buy a disc

    Go here: https://smartsource.dell.com

    This is where you go to download programs that have been installed on your computer that you do not have a CD for.

  • My mouse no longer works 2 days ago... I restored my pc on the eve, it works... but that did not help my mouse. This mouse works on another pc... I am getting error usb? I removed & charged all under the usb tab__

    My mouse no longer works 2 days ago... I restored my pc on the eve, it works... but that did not help my mouse.   This mouse works on another pc... I am getting error usb?  I removed & charged all the usb tab

    Hello

    You may need assistance from a real store tech computer (no leeks and glances at a BestBuy or)
    other BigBox stores) or the manufacturer of your system Support.

    What is the error of USB?

    Follow these steps to remove corruption and missing/damaged file system repair or replacement.

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe)
    program generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    -----------------------------------------------

    Please make these now even though you might have tried this before:

    Remove the mouse if indicated in the Manager of devices - devices of score - click right on - UNINSTALL.

    Then lets refresh the USB stack

    Control Panel right CLICK on EVERYTHING - Serial USB controllers - device configuration-manager and
    UNINSTALL all but the category itself - REBOOT - it refreshes the drive and battery USB

    This KB shows XP how to and the method of Vista is identical
    http://support.Microsoft.com/kb/310575

    ----------------------------------------------

    If necessary try these two:

    Tips for solving problems of USB devices - and a Mr Fixit
    http://windowshelp.Microsoft.com/Windows/en-us/help/c39bd203-f729-47a4-8351-83291e13c8a81033.mspx#EGB

    Hardware devices not detected or not working - Mr. Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Overlap two images, ordinary java works, and not in BlackBerry JDE 5

    I have an application for swing of simple java that takes two images and overlaps the other. While trying to this port in JDE5, I got out there is no class BufferedImage in the api of BB, but a similar class of the Bitmap. It's brought to BB mixing function is unable to produce an image that overlap. It shows a blank white screen.

    Here's the plain java function

    public BufferedImage blend( BufferedImage bi1, BufferedImage bi2,            double weight )   {     if (bi1 == null)          throw new NullPointerException("bi1 is null");
    
          if (bi2 == null)          throw new NullPointerException("bi2 is null");
    
          int width = bi1.getWidth();       if (width != bi2.getWidth())          throw new IllegalArgumentException("widths not equal");
    
         int height = bi1.getHeight();     if (height != bi2.getHeight())
    
              throw new IllegalArgumentException("heights not equal");
    
            BufferedImage bi3 = new BufferedImage(width, height,              BufferedImage.TYPE_INT_RGB);      int[] rgbim1 = new int[width];        int[] rgbim2 = new int[width];        int[] rgbim3 = new int[width];
    
          for (int row = 0; row < height; row++)     {         bi1.getRGB(0, row, width, 1, rgbim1, 0, width);           bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
             for (int col = 0; col < width; col++)          {             int rgb1 = rgbim1[col];               int r1 = (rgb1 >> 16) & 255;                int g1 = (rgb1 >> 8) & 255;             int b1 = rgb1 & 255;
    
                    int rgb2 = rgbim2[col];               int r2 = (rgb2 >> 16) & 255;                int g2 = (rgb2 >> 8) & 255;             int b2 = rgb2 & 255;
    
                    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));               int g3 = (int) (g1 * weight + g2 * (1.0 - weight));               int b3 = (int) (b1 * weight + b2 * (1.0 - weight));               rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;            }
    
               bi3.setRGB(0, row, width, 1, rgbim3, 0, width);       }
    
           return bi3;   } 
    

    Here's the java function of BB

      public Bitmap blend( Bitmap bi1, Bitmap  bi2,                      double weight )        {
    
                  if (bi1 == null)                       throw new NullPointerException("bi1 is null");
    
                    if (bi2 == null)                       throw new NullPointerException("bi2 is null");
    
                    int width = bi1.getWidth();            if (width != bi2.getWidth())                   throw new IllegalArgumentException("widths not equal");
    
                   int height = bi1.getHeight();          if (height != bi2.getHeight())
    
                            throw new IllegalArgumentException("heights not equal");
    
             Bitmap bi3 = new Bitmap(width, height);         int[] rgbim1 = new int[width];         int[] rgbim2 = new int[width];         int[] rgbim3 = new int[width];
    
                    for (int row = 0; row < height; row++)         {
    
                           bi1.getARGB(rgbim1,0,width,0,row, width,1);                       bi2.getARGB(rgbim2,0,width,0,row, width,1); 
    
                           for (int col = 0; col < width; col++)                  {                              int rgb1 = rgbim1[col];                                int r1 = (rgb1 >> 16) & 255;                           int g1 = (rgb1 >> 8) & 255;                            int b1 = rgb1 & 255;
    
                              int rgb2 = rgbim2[col];                                int r2 = (rgb2 >> 16) & 255;                           int g2 = (rgb2 >> 8) & 255;                            int b2 = rgb2 & 255;
    
                              int r3 = (int) (r1 * weight + r2 * (1.0 - weight));                            int g3 = (int) (g1 * weight + g2 * (1.0 - weight));                            int b3 = (int) (b1 * weight + b2 * (1.0 - weight));                            rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;                     }
    
                         bi3.setARGB(rgbim3, 0, width, 0,  row,width, 1);
    
                    }
    
                 return bi3;    }
    

    The weight of the arg is a value from 1 to 100.

    For reference, the full plain java source

    /* * To change this template, choose Tools | Templates * and open the template in the editor. */
    
    package imagetest;
    
    /** * * @author COMPUTER */// Blender1.java
    
    import java.awt.*;import java.awt.image.*;
    
    import javax.swing.*;import javax.swing.event.*;
    
    /** * This class describes and contains the entry point to an application that * demonstrates the blending transition. */
    
    public class Blender1 extends JFrame{  /**    *     */   private static final long serialVersionUID = 1L;
    
        /**    * Construct Blender1 GUI.     */
    
     public Blender1() {     super("Blender #1");      setDefaultCloseOperation(EXIT_ON_CLOSE);
    
            // Load first image from JAR file and draw image into a buffered image.
    
         ImageIcon ii1 = new ImageIcon(getClass().getResource("x.png"));       final BufferedImage bi1;      bi1 = new BufferedImage(ii1.getIconWidth(), ii1.getIconHeight(),              BufferedImage.TYPE_INT_RGB);      Graphics2D g2d = bi1.createGraphics();        int h = ii1.getImage().getHeight(null);       System.out.println("Blender1.Blender1()--------> height :" + h);       g2d.drawImage(ii1.getImage(), 0, 0, null);        g2d.dispose();
    
          // Load second image from JAR file and draw image into a buffered image.
    
            ImageIcon ii2 = new ImageIcon(getClass().getResource("y.png"));       final BufferedImage bi2;      bi2 = new BufferedImage(ii2.getIconWidth(), ii2.getIconHeight(),              BufferedImage.TYPE_INT_RGB);      g2d = bi2.createGraphics();       int h2 = ii2.getImage().getHeight(null);      System.out.println("Blender1.Blender1()--------> height :" + h2);      g2d.drawImage(ii2.getImage(), 0, 0, null);        g2d.dispose();
    
          // Create an image panel capable of displaying entire image. The widths       // of both images and the heights of both images must be identical.
    
         final ImagePanel ip = new ImagePanel();       ip.setPreferredSize(new Dimension(ii1.getIconWidth(), ii1             .getIconHeight()));       getContentPane().add(ip, BorderLayout.NORTH);
    
           // Create a slider for selecting the blending percentage: 100% means      // show all of first image; 0% means show all of second image.
    
          final JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 100);      slider.setMinorTickSpacing(5);        slider.setMajorTickSpacing(10);       slider.setPaintTicks(true);       slider.setPaintLabels(true);      slider.setLabelTable(slider.createStandardLabels(10));        slider.setInverted(true);     ChangeListener cl;        cl = new ChangeListener()     {         public void stateChanged( ChangeEvent e )         {             // Each time the user adjusts the slider, obtain the new              // blend percentage value and use it to blend the images.
    
                   int value = slider.getValue();                ip.setImage(blend(bi1, bi2, value / 100.0));          }     };        slider.addChangeListener(cl);     getContentPane().add(slider, BorderLayout.SOUTH);
    
           // Display the first image, which corresponds to a 100% blend     // percentage.
    
          ip.setImage(bi1);
    
           pack();       setVisible(true); }
    
       /**    * Blend the contents of two BufferedImages according to a specified weight.   *     * @param bi1  *            first BufferedImage  * @param bi2  *            second BufferedImage     * @param weight   *            the fractional percentage of the first image to keep     *     * @return new BufferedImage containing blended contents of BufferedImage  *         arguments   */
    
     public BufferedImage blend( BufferedImage bi1, BufferedImage bi2,         double weight )   {     if (bi1 == null)          throw new NullPointerException("bi1 is null");
    
          if (bi2 == null)          throw new NullPointerException("bi2 is null");
    
          int width = bi1.getWidth();       if (width != bi2.getWidth())          throw new IllegalArgumentException("widths not equal");
    
         int height = bi1.getHeight();     if (height != bi2.getHeight())
    
              throw new IllegalArgumentException("heights not equal");
    
            BufferedImage bi3 = new BufferedImage(width, height,              BufferedImage.TYPE_INT_RGB);      int[] rgbim1 = new int[width];        int[] rgbim2 = new int[width];        int[] rgbim3 = new int[width];
    
          for (int row = 0; row < height; row++)     {         bi1.getRGB(0, row, width, 1, rgbim1, 0, width);           bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
             for (int col = 0; col < width; col++)          {             int rgb1 = rgbim1[col];               int r1 = (rgb1 >> 16) & 255;                int g1 = (rgb1 >> 8) & 255;             int b1 = rgb1 & 255;
    
                    int rgb2 = rgbim2[col];               int r2 = (rgb2 >> 16) & 255;                int g2 = (rgb2 >> 8) & 255;             int b2 = rgb2 & 255;
    
                    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));               int g3 = (int) (g1 * weight + g2 * (1.0 - weight));               int b3 = (int) (b1 * weight + b2 * (1.0 - weight));               rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;            }
    
               bi3.setRGB(0, row, width, 1, rgbim3, 0, width);       }
    
           return bi3;   }
    
       /**    * Application entry point.    *     * @param args     *            array of command-line arguments  */
    
     public static void main( String[] args )  {     Runnable r = new Runnable()       {         public void run()         {             // Create Blender1's GUI on the event-dispatching             // thread.
    
                  new Blender1();           }     };        EventQueue.invokeLater(r);    }}
    
    /** * This class describes a panel that displays a BufferedImage's contents. */
    
    class ImagePanel extends JPanel{ /**    *     */   private static final long serialVersionUID = 4977990666209629996L;    private BufferedImage bi;
    
       /**    * Specify and paint a new BufferedImage.  *     * @param bi   *            BufferedImage whose contents are to be painted   */
    
     void setImage( BufferedImage bi ) {     this.bi = bi;     repaint();    }
    
       /**    * Paint the image panel.  *     * @param g    *            graphics context used to paint the contents of the current   *            BufferedImage    */
    
     public void paintComponent( Graphics g )  {     if (bi != null)       {         Graphics2D g2d = (Graphics2D) g;          g2d.drawImage(bi, null, 0, 0);        } }}
    

    Full java BB source

    /* * ImageScreen.java * * © ,  * Confidential and proprietary. */
    
    package src;
    
    /** *  */
    
    import java.io.OutputStream;import javax.microedition.io.Connector;import javax.microedition.io.file.FileConnection;import net.rim.device.api.system.Bitmap;import net.rim.device.api.ui.Field;import net.rim.device.api.ui.FieldChangeListener;import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.component.BitmapField;import net.rim.device.api.ui.component.ButtonField;import net.rim.device.api.ui.component.Dialog;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.HorizontalFieldManager;import net.rim.device.api.ui.container.MainScreen;import net.rim.device.api.ui.component.GaugeField;/** * The main screen to display an image taken from the camera demo. */public final class ImageScreen extends MainScreen{    /** The down-scaling ratio applied to the snapshot Bitmap */    private static final int IMAGE_SCALING = 7;
    
        /** The base file name used to store pictures */    private static final String FILE_NAME = System.getProperty("fileconn.dir.photos") + "IMAGE";
    
        /** The extension of the pictures to be saved */    private static final String EXTENSION = ".bmp";
    
        /** A counter for the number of snapshots taken */    private static int _counter;    Bitmap image1,image2; BitmapField imageField;     /** A reference to the current screen for listeners */    private ImageScreen _imageScreen;
    
       /**    * Constructor    * @param raw A byte array representing an image    */    public ImageScreen( final byte[] raw1,final byte[] raw2 )    {        // A reference to this object, to be used in listeners        _imageScreen = this;
    
            setTitle("Blend and Save");
    
            // Convert the byte array to a Bitmap image        image1 = Bitmap.createBitmapFromBytes( raw1, 0, -1, 1 );        image2 = Bitmap.createBitmapFromBytes( raw2, 0, -1, 1 );        // Create two field managers to center the screen's contents        HorizontalFieldManager hfm1 = new HorizontalFieldManager( Field.FIELD_HCENTER );        HorizontalFieldManager hfm2 = new HorizontalFieldManager( Field.FIELD_HCENTER );        HorizontalFieldManager hfm3 = new HorizontalFieldManager( Field.FIELD_HCENTER );        // Create the field that contains the image//blend(image1, image2, 50/ 100.0)        imageField = new BitmapField(blend(image1, image2, 50/ 100.0) ){
    
               public int getPreferredWidth(){ return 250;}           public int getPreferredHeight(){ return 150;}
    
             };
    
            hfm1.add( imageField ); 
    
            GaugeField scroller = new GaugeField("Adjust (alt + < >)",0,100,50,Field.EDITABLE | Field.FOCUSABLE);        //scroller.setBackground( net.rim.device.api.ui.decor.BackgroundFactory.createSolidBackground(0x00000000));          scroller.setChangeListener( new GaugeFieldListener() );         hfm2.add(scroller);         // Create the SAVE button which returns the user to the main camera        // screen and saves the picture as a file.        ButtonField photoButton = new ButtonField( "Save" );        photoButton.setChangeListener( new SaveListener(raw1,raw2) );        hfm3.add(photoButton);
    
            // Create the CANCEL button which returns the user to the main camera        // screen without saving the picture.        ButtonField cancelButton = new ButtonField( "Cancel" );        cancelButton.setChangeListener( new CancelListener() );        hfm3.add(cancelButton);
    
            // Add the field managers to the screen        add( hfm1 );        add( hfm2 );        add( hfm3 );scroller.setFocus();//scroller.setValue(50);    }    public Bitmap blend( Bitmap bi1, Bitmap  bi2,                      double weight )        {
    
                  if (bi1 == null)                       throw new NullPointerException("bi1 is null");
    
                    if (bi2 == null)                       throw new NullPointerException("bi2 is null");
    
                    int width = bi1.getWidth();            if (width != bi2.getWidth())                   throw new IllegalArgumentException("widths not equal");
    
                   int height = bi1.getHeight();          if (height != bi2.getHeight())
    
                            throw new IllegalArgumentException("heights not equal");
    
             Bitmap bi3 = new Bitmap(width, height);         int[] rgbim1 = new int[width];         int[] rgbim2 = new int[width];         int[] rgbim3 = new int[width];
    
                    for (int row = 0; row < height; row++)         {            // bi -> int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize) 
    
                 // bit - > int[] argbData, int offset, int scanLength, int x, int y, int width, int height) 
    
                           bi1.getARGB(rgbim1,0,width,0,row, width,1);//  row, width, 1, , 0, width);                       bi2.getARGB(rgbim2,0,width,0,row, width,1); 
    
                           //bi1.getRGB(0, row, width, 1, rgbim1, 0, width);                       //bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
                           for (int col = 0; col < width; col++)                  {                              int rgb1 = rgbim1[col];                                int r1 = (rgb1 >> 16) & 255;                           int g1 = (rgb1 >> 8) & 255;                            int b1 = rgb1 & 255;
    
                              int rgb2 = rgbim2[col];                                int r2 = (rgb2 >> 16) & 255;                           int g2 = (rgb2 >> 8) & 255;                            int b2 = rgb2 & 255;
    
                              int r3 = (int) (r1 * weight + r2 * (1.0 - weight));                            int g3 = (int) (g1 * weight + g2 * (1.0 - weight));                            int b3 = (int) (b1 * weight + b2 * (1.0 - weight));                            rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;                     }                    //bi -> int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)                     //bit -> (int[] data, int offset, int scanLength, int left, int top, int width, int height)                      bi3.setARGB(rgbim3, 0, width, 0,  row,width, 1);
    
                        // bi3.setRGB(0, row, width, 1, rgbim3, 0, width);                }
    
                 return bi3;    }
    
       /**    * Handles trackball click events    * @see net.rim.device.api.ui.Screen#invokeAction(int)    */       protected boolean invokeAction(int action)    {        boolean handled = super.invokeAction(action); 
    
            if(!handled)        {            switch(action)            {                case ACTION_INVOKE: // Trackball click.                {                                 return true;                }            }        }                return handled;              }
    
     /**    * A listener used for the "Save" button    */    private class GaugeFieldListener implements FieldChangeListener    {        public void fieldChanged(Field field, int context)        {          int value =  ((GaugeField)field).getValue(); if (value==0){return;}          imageField.setBitmap( blend(image1, image2, value/ 100.0) );          ((GaugeField)field).setLabel("Adjust (alt + < >)"+value);        }    }   /**    * A listener used for the "Save" button    */    private class SaveListener implements FieldChangeListener    {        /** A byte array representing an image */        private byte[] _raw1,_raw2;
    
           /**        * Constructor.        * @param raw A byte array representing an image        */        SaveListener(byte[] raw1,byte[] raw2)        {            _raw1 = raw1;            _raw2 = raw2;        }
    
           /**        * Saves the image as a file in the BlackBerry filesystem        */        public void fieldChanged(Field field, int context)        {            try            {                       // Create the connection to a file that may or                // may not exist.                FileConnection file = (FileConnection)Connector.open( FILE_NAME + _counter + EXTENSION );
    
                    // If the file exists, increment the counter until we find                // one that hasn't been created yet.                while( file.exists() )                {                    file.close();                    ++_counter;                    file = (FileConnection)Connector.open( FILE_NAME + _counter + EXTENSION );                }
    
                    // We know the file doesn't exist yet, so create it                file.create();
    
                    // Write the image to the file                OutputStream out = file.openOutputStream();                out.write(_raw1);
    
                    // Close the connections                out.close();                file.close();            }            catch(Exception e)            {                Dialog.alert( "ERROR " + e.getClass() + ":  " + e.getMessage() );            }
    
                // Inform the user where the file has been saved            Dialog.inform( "Saved to " + FILE_NAME + _counter + EXTENSION );
    
                // Increment the image counter            ++_counter;
    
                // Return to the main camera screen            UiApplication.getUiApplication().popScreen( _imageScreen );        }    }
    
       /**    * A listener used for the "Cancel" button    */    private class CancelListener implements FieldChangeListener    {       /**        * Return to the main camera screen        */        public void fieldChanged(Field field, int context)        {            UiApplication.getUiApplication().popScreen( _imageScreen );        }    }}
    

    Yes, your original code:

    for (int col = 0; col < width; col++){int rgb1 = rgbim1[col];int r1 = (rgb1 >> 16) & 255;int g1 = (rgb1 >> 8) & 255;int b1 = rgb1 & 255;
    
    int rgb2 = rgbim2[col];int r2 = (rgb2 >> 16) & 255;int g2 = (rgb2 >> 8) & 255;int b2 = rgb2 & 255;
    
    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));int g3 = (int) (g1 * weight + g2 * (1.0 - weight));int b3 = (int) (b1 * weight + b2 * (1.0 - weight));rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;}
    

    Labour Code:

    for (int col = 0; col < width; col++)
    {
    int rgb1 = rgbim1[col];
    int a1 = (rgb1 >> 24) & 255;
    int r1 = (rgb1 >> 16) & 255;
    int g1 = (rgb1 >> 8) & 255;
    int b1 = rgb1 & 255;
    
    int rgb2 = rgbim2[col];
    int a2 = (rgb2 >> 24) & 255;
    int r2 = (rgb2 >> 16) & 255;
    int g2 = (rgb2 >> 8) & 255;
    int b2 = rgb2 & 255;
    
    int a3 = (int) (a1 * weight + a2 * (1.0 - weight));
    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));
    int g3 = (int) (g1 * weight + g2 * (1.0 - weight));
    int b3 = (int) (b1 * weight + b2 * (1.0 - weight));
    rgbim3[col] = (a3 << 24) | (r3 << 16) | (g3 << 8) | b3;
    }
    
  • To run all the applications of the laptop or install download applications works does not error message indicating that the application is not valid "win32.exe or win32.application.

    To run all the applications of the laptop or install download applications works does not error message indicating that the application is not valid "win32.exe or win32.application.

    Hello m.velentino,

    Not sure if you are still having the error message isn't valid win32.applicaiton.

    Get the error: not a valid 32-bit application can have several origins:
    I have listed some of them below.

    The file is corrupted, bad or missing.
    -If the hard disk is damaged or hurt it cause work programs to fail, either because not all data can be read from the hard drive the program is damaged on the drive. Run scandisk and defrag on the hard disk to check for potential errors.
    -If you run the program from a shortcut on the computer, verify that the program is still on the computer. In some cases if the program is no longer installed on the computer, you can get this error.

    File is not designed for your version of Windows:
    -If you try to run a program that is not designed for your version of Windows, you can get this error.
    -Although many old programs designed to work in older versions of Windows will work with new versions of Windows, unfortunately, not all programs will not work.
    -If the program is an MS-DOS program more former start program or Windows, you can get this error.
    -If the program is designed for a 64-bit version of Windows and you are running in a 32-bit version of Windows, it will not work and generate this error.

    File is a virus, worm or other malicious program file.
    -
    This error can be generated by a file that is a virus, worm, Trojan horse or other type of malware file. Often, this will result because the antivirus installed on the computer will not allow the file to install or run. Try to analyze the file to check, it is not a virus or infected.
    -If the file has been checked and is clean, it is always possible that the virus protection program or a another program installed on the computer is at the origin of questions during installation or execution of the program. Start the computer in Mode safe and try to run the program. start the computer in Mode safe will be that nothing is running in the background that could cause this problem.

    Hardware incompatibility.

    -If you get this error during the installation of a program, it is also possible that the CD-ROM drive or the drive that you are installing the program from is not compatible with Windows or has drivers that are not compatible with Windows.
    -Download the latest drivers for your CD player or other of the manufacturer of the computer or the manufacturer of the equipment. (Microsoft does not pilot for other materials)

    Let us know if these suggestions help you.

    Marilyn

  • I bought my Gateway laptop that incorporates a webcam, and it will not work, did not work as I had. How can I solve this problem?

    I bought my Gateway laptop that incorporates a webcam, and it will not work, did not work as I had. How can I solve this problem?

    Have you contacted technical support Gateway?  http://support.gateway.com/us/en/support/default.aspx

    If for some reason you can't do that, more information about what you mean by "will not work" would be useful - how you try to use it (in an application provided by gateway, Skype, etc.) and what (error?) when you try?

  • Packer of creative cloud in creating a package that I can install do not.  He goes through the motions, download all updates, create setup file, but it does not work despite the fact that there are no errors in the log files

    Packer of creative cloud in creating a package that I can install do not.  He goes through the motions, download all updates, create setup file, but it does not work despite the fact that there are no errors in the log files

    After hitting my head against the desk to repeatedly create packages, try on different computers I have finally found a solution.

    These packages have been copied on an external drive, if I try and install from the external drive, which is a common practice, it fails.

    If I then copy this file pkg from the outside, to the computer I install, then run it, it will to and moved very well.

    That is mind-boggling stupid, because it's rare that you have to copy the file into any computer, it is less always installed off the coast of externally, and many people in the company are pushing on the network and the management of the suites so there is a serious problem in Adobe package manager if this is the case where it cannot manage the Middle installed offshore.

    I hope that if anyone else is having problems so it suits.

Maybe you are looking for

  • AOL mail won't open in Firefox and guess what is the solution?

    Oddly enough, this also occurs in Firefox, Chrome and IE9. Scanned for malware with no result. Finally, I downloaded surprise and AOL desktop, I can now open AOL mail, but only in their office. This seems to be blackmail and coercion by AOL. I say th

  • Satellite A500 Pro keeps freezing

    Help... I have a Satellite A500. It keeps freezing. Sometimes it will boot when turned on, but then as soon as I select a program to open, it freezes.I can't do anything. I can't control alt delete to open the Task Manager. The only thing I can do is

  • Yamaha AC - XG Audio device

    Could someone tell me if the generic driver available at Yamaha (AC - XG Drivers generic version 6.13.10.3157) can be used instead of the driver provided by Toshiba, which is the version of the driver 6.13.10.3152. Also would lose any functionality b

  • Vision Assistant has theAlgorithms.Resample feature

    I'm just not see it, or is there no way to resize (Resample) an image in Vision Assistant? It seems to me that the resizing of an image is one of the simplest function of image processing. I'm used to having to open images in MS Paint to resize, and

  • Get the 43 pilot error after installing new graphics card

    Original title: graphics card problem Help, please. I just put in my new nvidia Geforce GT 430 graphics card. It came with a disc that would install all necessary records, when the computer has restarted a message says that the driver has been arrest