Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 50
Registered: ‎10-09-2009
My Device: 9900
My Carrier: Bell
Accepted Solution

PictureScrollField.ScrollEntry problem


I am trying to use a PictureScrollField.  The code seems fine but don't want to compile.  The error I got is:  cannot find symbol and point to the PictureScrollField.ScrollEntry[4]; part of the code.  Can someone help me with this?


Here is the code sample:


        Bitmap img1 = Bitmap.getBitmapResource("img1.gif");
        Bitmap img2 = Bitmap.getBitmapResource("img2.gif");
        Bitmap img3 = Bitmap.getBitmapResource("img3.gif");
        Bitmap img4 = Bitmap.getBitmapResource("img4.gif");
        PictureScrollField.ScrollEntry[] se = PictureScrollField.ScrollEntry[4];
        se[0] = new ScrollEntry(img1, "lbl_img1", "callout_img1");
        se[1] = new ScrollEntry(img2, "lbl_img2", "callout_img2");
        se[2] = new ScrollEntry(img3, "lbl_img3", "callout_img3");
        se[3] = new ScrollEntry(img4, "lbl_img4", "callout_img4");
        PictureScrollField pict = new PictureScrollField(100, 100);
        pict.setData(se, 2);


Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-, Z10 (STL100-3)-, Z30 (STA100-5)-, Passport (SQW100-1)-, PlayBook (16GB)-
My Carrier: Verizon

Re: PictureScrollField.ScrollEntry problem

You forgot the "new" keyword.


It says:

PictureScrollField.ScrollEntry[] se = PictureScrollField.ScrollEntry[4];

It should say:

PictureScrollField.ScrollEntry[] se = new PictureScrollField.ScrollEntry[4];
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.