Search Results

Search found 11845 results on 474 pages for 'blackberry eclipse plugin'.

Page 48/474 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • How to put reminder in Blackberry calendar

    - by anta40
    I need to put several reminders in the BB calendar. The idea is several hours, or days before a promo expires, the alarm will remind it for you. Here's my code so far: long ONE_HOUR = 3600; long ONE_DAY = 24 * 3600; try { EventList eventList = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE); BlackBerryEvent bbEvent = (BlackBerryEvent) eventList.createEvent(); FavoritePromo promo; if (eventList.isSupportedField(BlackBerryEvent.ALARM)){ for (int x = 0; x < promos.size(); x++){ promo = (FavoritePromo) promos.elementAt(x); time = (StringUtil.strToDate(promo.getExpireDate())).getTime() - value; bbEvent.addString(BlackBerryEvent.SUMMARY, BlackBerryEvent.ATTR_NONE, promo.getTitle()); bbEvent.addDate(BlackBerryEvent.ALARM,0,time); bbEvent.commit(); } } } catch (PIMException e){ } Every time i run it, an "IllegalArgumentException" is always thrown. I'm not really sure what goes wrong here...

    Read the article

  • How to execute maven tasks in eclipse (Sonatype plugin)

    - by Bruce
    Hi all I know it must be something simple, but I just can't figure it out.. I'm using the Sonatype maven plugin on eclipse. When I want to build a war file for a webapp project, the only way I know to do it is to use the command line and type mvn package. I've looked all through the right click menu and I can't find any way to do it from eclipse. There's a maven submenu that seems to have no options to do with building, and there's a run menu that doesn't seem right - I don't want to run my project - I just want to build it. There is a maven build option in the run menu, but if I run it, a configuration window pops up for me to enter goals in.. How I do I just do a simple mvn package, but through gui? What am I missing? Thanks!

    Read the article

  • Blackberry - custom logic for checkboxes group

    - by SWATI
    if i click on any checkbox all previous checkboxes must get checked "my logic works" if i uncheck a checkbox then all checkboxes after it must get unchecked "how to do that" MyLogic works for storm but not for other models what to do //well what i want to do is i have 5 checkboxes class myscreen { chk_service = new CheckboxField[5]; chk_service[0]= new CheckboxField("1",true) chk_service[1]= new CheckboxField("2",false) chk_service[2]= new CheckboxField("3",false) chk_service[3]= new CheckboxField("4",false) chk_service[4]= new CheckboxField("5",false) CheckboxFieldChangeListener obj = new CheckboxFieldChangeListener(chk_service); chk_service[0].setChangeListener(obj); chk_service[1].setChangeListener(obj); chk_service[2].setChangeListener(obj); chk_service[3].setChangeListener(obj); chk_service[4].setChangeListener(obj); hm4 = new HorizontalFieldManager(); hm4.add(chk_service[0]); hm4.add(chk_service[1]); hm4.add(chk_service[2]); hm4.add(chk_service[3]); hm4.add(chk_service[4]); add(hm4); } public CheckboxFieldChangeListener (CheckboxField[] arrFields) { m_arrFields = arrFields; } public void fieldChanged(Field field, int context) { if(true == ((CheckboxField) field).getChecked()) { for(int i = 0; i < m_arrFields.length; i++) { if(m_arrFields[i]==field) { //a[j]=i; j++; break; } else { CheckboxField oField = m_arrFields[i]; oField.setChecked(true); } } } a[k] = j; if(false == ((CheckboxField) field).getChecked()) { for(int i =field.getIndex(); i < m_arrFields.length; i++) { if(m_arrFields[i]==field) { //a[j]=i; j++; break; } else { CheckboxField oField = m_arrFields[i]; oField.setChecked(false); } } } } }

    Read the article

  • Blackberry - Programmatically extract/open zip file

    - by KKlucznik
    I have looked online with mixed results, but is there a way to programmatically extract a zip file on the BB? Very basic my app will display different encrypted file types, and those files are delivered in a zip file. My idea was to have the user browse to the file on their SDCard, select it, and I extract what i need as a stream from the file. is this possible?

    Read the article

  • blackberry development problem?

    - by user188391
    i want to create this type of grid field can any one guide me? import net.rim.device.api.ui.Field; import net.rim.device.api.ui.Manager; public class GridFieldManager extends Manager { private int[] columnWidths; private int columns; private int allRowHeight = -1; public GridFieldManager(int columns, long style) { super(style); this.columns = columns; } public GridFieldManager(int[] columnWidths, long style) { super(style); this.columnWidths = columnWidths; this.columns = columnWidths.length; } public GridFieldManager(int[] columnWidths, int rowHeight, long style) { this(columnWidths, style); this.allRowHeight = rowHeight; } protected boolean navigationMovement(int dx, int dy, int status, int time) { int focusIndex = getFieldWithFocusIndex(); while(dy > 0) { focusIndex += columns; if (focusIndex >= getFieldCount()) { return false; // Focus moves out of this manager } else { Field f = getField(focusIndex); if (f.isFocusable()) { // Only move the focus onto focusable fields f.setFocus(); dy--; } } } while(dy < 0) { focusIndex -= columns; if (focusIndex < 0) { return false; } else { Field f = getField(focusIndex); if (f.isFocusable()) { f.setFocus(); dy++; } } } while(dx > 0) { focusIndex ++; if (focusIndex >= getFieldCount()) { return false; } else { Field f = getField(focusIndex); if (f.isFocusable()) { f.setFocus(); dx--; } } } while(dx < 0) { focusIndex --; if (focusIndex < 0) { return false; } else { Field f = getField(focusIndex); if (f.isFocusable()) { f.setFocus(); dx++; } } } return true; } protected void sublayout(int width, int height) { int y = 0; if (columnWidths == null) { columnWidths = new int[columns]; for(int i = 0; i < columns; i++) { columnWidths[i] = width/columns; } } Field[] fields = new Field[columnWidths.length]; int currentColumn = 0; int rowHeight = 0; for(int i = 0; i < getFieldCount(); i++) { fields[currentColumn] = getField(i); layoutChild(fields[currentColumn], columnWidths[currentColumn], height-y); if (fields[currentColumn].getHeight() > rowHeight) { rowHeight = fields[currentColumn].getHeight(); } currentColumn++; if (currentColumn == columnWidths.length || i == getFieldCount()-1) { int x = 0; if (this.allRowHeight >= 0) { rowHeight = this.allRowHeight; } for(int c = 0; c < currentColumn; c++) { long fieldStyle = fields[c].getStyle(); int fieldXOffset = 0; long fieldHalign = fieldStyle & Field.FIELD_HALIGN_MASK; if (fieldHalign == Field.FIELD_RIGHT) { fieldXOffset = columnWidths[c] - fields[c].getWidth(); } else if (fieldHalign == Field.FIELD_HCENTER) { fieldXOffset = (columnWidths[c]-fields[c].getWidth())/2; } int fieldYOffset = 0; long fieldValign = fieldStyle & Field.FIELD_VALIGN_MASK; if (fieldValign == Field.FIELD_BOTTOM) { fieldYOffset = rowHeight - fields[c].getHeight(); } else if (fieldValign == Field.FIELD_VCENTER) { fieldYOffset = (rowHeight-fields[c].getHeight())/2; } setPositionChild(fields[c], x+fieldXOffset, y + fieldYOffset); x += columnWidths[c]; } currentColumn = 0; y += rowHeight; } if (y >= height) { break; } } int totalWidth = 0; for(int i = 0; i < columnWidths.length; i++) { totalWidth += columnWidths[i]; } setExtent(totalWidth, Math.min(y, height)); } }

    Read the article

  • BlackBerry - Cropping image

    - by rupesh
    Hi all i want to crop a part of Image ,for that i am using following code: int x=20; int y=50; int [] rgbdata=new int[(0+width-x+height-y)* (image.getWidth())]; image.getARGB(rgbdata, 0, image.getWidth(), x, y, width, height); cropedImage=new Bitmap(image.getWidth(),image.getWidth()); cropedImage.setARGB(rgbdata, 0,image.getWidth(), 80,80, width, height); x an y are the position from where the cropping will be done in the rectangular form. but it is not working can any one help me out please. any sample code will work for me. its urgent. thanks in advance

    Read the article

  • Blackberry screen navigation probelm

    - by dalandroid
    I have a Screen name DownloaderScreen when the screen start it will start download some file and when download is complete it will go forward to next screen autometically. I using the following code. public DownloaderScreen() { super(NO_VERTICAL_SCROLL | NO_HORIZONTAL_SCROLL | USE_ALL_HEIGHT | USE_ALL_WIDTH); this.application = UiApplication.getUiApplication(); HorizontalFieldManager outerBlock = new HorizontalFieldManager(USE_ALL_HEIGHT); VerticalFieldManager innerBlock = new VerticalFieldManager(USE_ALL_WIDTH | FIELD_VCENTER); innerBlock.setPadding(0, 10, 0, 10); outerBlock.setBackground(BackgroundFactory .createBitmapBackground(LangValue.dlBgimg)); outerBlock.add(innerBlock); add(outerBlock); phraseHelper = new PhraseHelper(); final String[][] phraseList = phraseHelper.getDownloadList(); gaugeField = new GaugeField("Downloading ", 0, phraseList.length, 0, GaugeField.PERCENT); innerBlock.add(gaugeField); Thread dlTread = new Thread() { public void run() { startDownload(phraseList); } }; dlTread.start(); } private void startDownload(String[][] phraseList){ if(phraseList.length!=0){ for(int i=0; i < phraseList.length ; i++){// gaugeField.setValue(i); // code for download } } goToNext(); } private void goToNext() { final Screen currentScreen = application.getActiveScreen(); if (UiApplication.isEventDispatchThread()) { application.popScreen(currentScreen); application.pushScreen(new HomeScreen()); } else { application.invokeLater(new Runnable() { public void run() { application.popScreen(currentScreen); application.pushScreen(new HomeScreen()); } }); } } The code is working fine and starts download files and when download is completed it is going forward to next screen. But when there is no file to download phraseList array length is zero, it is not going forward. What is problem in my code?

    Read the article

  • Blackberry UI tool bar : fields alignment

    - by Galaxy
    i am developing custom toolbar manager, but i want to adjust the fields alignment to be centered not aligned to the left , any advice below is the code of toolbar package galaxy.bb.ui.container; import net.rim.device.api.ui.Color; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.XYEdges; import net.rim.device.api.ui.container.HorizontalFieldManager; import net.rim.device.api.ui.decor.Background; import net.rim.device.api.ui.decor.BackgroundFactory; import net.rim.device.api.ui.decor.Border; import net.rim.device.api.ui.decor.BorderFactory; public class ToolBarManager extends HorizontalFieldManager { private int bgColor = Color.BLACK; private int borderColor = Color.WHITE; private int borderStyle= Border.STYLE_FILLED; public ToolBarManager(){ super(USE_ALL_WIDTH); } public ToolBarManager(int bgColor) { super(USE_ALL_WIDTH); this.bgColor = bgColor; } public ToolBarManager(int bgColor, int borderStyle) { super(USE_ALL_WIDTH); this.bgColor = bgColor; this.borderStyle = borderStyle; } public int getBgColor() { return bgColor; } public void setBgColor(int bgColor) { this.bgColor = bgColor; } public int getBorderColor() { return borderColor; } public void setBorderColor(int borderColor) { this.borderColor = borderColor; } public int getBorderStyle() { return borderStyle; } public void setBorderStyle(int borderStyle) { this.borderStyle = borderStyle; } protected void paint(Graphics graphics) { super.paint(graphics); XYEdges padding = new XYEdges(5, 5, 5, 5); Border roundedBorder = BorderFactory.createRoundedBorder(padding, borderColor, borderStyle); this.setBorder(roundedBorder); Background bg = BackgroundFactory.createSolidBackground(bgColor); this.setBackground(bg); } }

    Read the article

  • Programatically add a wifi network on the BlackBerry

    - by Ridz
    Hi, As opposed to manually setting up a Wifi network(scanningaddingset encryption settings, etc) I'm trying to create an app that once the user enters his login credentials will automatically add the wifi network complete with the necessary network settings. Maybe i've been searching using the wrong keywords but I havent stumbled upon anything about this. I'm wondering which class(es) I should be looking at. Is this even allowed by the API?

    Read the article

  • BlackBerry Field class extension will not paint.

    - by jlindenbaum
    Using JRE 5.0.0, simulator device is an 8520. On a screen I am using a FlowFieldManager(Manager.VERTICAL_SCROLL) and adding Fields to it to show data. When I do this.flowManager = new FlowFieldManager(Manager.VERTICAL_SCROLL); Field field = new Field() { protected void paint(Graphics graphics) { graphics.drawTest("Test", 0, 0); } protected void layout(int width, int height) { this.setExtend(300, 300); // just testing } } this.flowManager.add(field); The screen renders correctly and 'Test' appears on the screen. If, on the other hand, I try and abstract this into a class called CustomField with the same properties and add it to the flow manager the render will not happen. Debugging shows that the device enters into the Object, into the layout function, but not the paint function. I can't figure out why the paint function is not called when I extend Field. The 4.5 API says that layout and paint are the only functions that I really need to extend. (getPreferredWidth and getPreferredHeight will be used to calculate screen sizes etc.) Thanks in advance.

    Read the article

  • BlackBerry:Built-in Date Picker API?

    - by user187532
    Hi All, In my application screen, i am having a field, where user can to choose his DateOfBirth. I want to popup any built-in "Date" calendar or some built-in Date picker to user, so that it will look professional. As i'm new to this development, i wanted to know there is any code sample available to popoup the built-in Date Picker? Note: I also want to store the selectable Date by user after selecting it in my existing persistent storage. Thank you for your suggestions.

    Read the article

  • Stepping outside Visual Studio IDE [Part 1 of 2] with Eclipse

    - by mbcrump
    “If you're walking down the right path and you're willing to keep walking, eventually you'll make progress." – Barack Obama In my quest to become a better programmer, I’ve decided to start the process of learning Java. I will be primary using the Eclipse Language IDE. I will not bore you with the history just what is needed for a .NET developer to get up and running. I will provide links, screenshots and a few brief code tutorials. Links to documentation. The Official Eclipse FAQ’s Links to binaries. Eclipse IDE for Java EE Developers the Galileo Package (based on Eclipse 3.5 SR2)  Sun Developer Network – Java Eclipse officially recommends Java version 5 (also known as 1.5), although many Eclipse users use the newer version 6 (1.6). That's it, nothing more is required except to compile and run java. Installation Unzip the Eclipse IDE for Java EE Developers and double click the file named Eclipse.exe. You will probably want to create a link for it on your desktop. Once, it’s installed and launched you will have to select a workspace. Just accept the defaults and you will see the following: Lets go ahead and write a simple program. To write a "Hello World" program follow these steps: Start Eclipse. Create a new Java Project: File->New->Project. Select "Java" in the category list. Select "Java Project" in the project list. Click "Next". Enter a project name into the Project name field, for example, "HW Project". Click "Finish" Allow it to open the Java perspective Create a new Java class: Click the "Create a Java Class" button in the toolbar. (This is the icon below "Run" and "Window" with a tooltip that says "New Java Class.") Enter "HW" into the Name field. Click the checkbox indicating that you would like Eclipse to create a "public static void main(String[] args)" method. Click "Finish". A Java editor for HW.java will open. In the main method enter the following line.      System.out.println("This is my first java program and btw Hello World"); Save using ctrl-s. This automatically compiles HW.java. Click the "Run" button in the toolbar (looks like a VCR play button). You will be prompted to create a Launch configuration. Select "Java Application" and click "New". Click "Run" to run the Hello World program. The console will open and display "This is my first java program and btw Hello World". You now have your first java program, lets go ahead and make an applet. Since you already have the HW.java open, click inside the window and remove all code. Now copy/paste the following code snippet. Java Code Snippet for an applet. 1: import java.applet.Applet; 2: import java.awt.Graphics; 3: import java.awt.Color; 4:  5: @SuppressWarnings("serial") 6: public class HelloWorld extends Applet{ 7:  8: String text = "I'm a simple applet"; 9:  10: public void init() { 11: text = "I'm a simple applet"; 12: setBackground(Color.GREEN); 13: } 14:  15: public void start() { 16: System.out.println("starting..."); 17: } 18:  19: public void stop() { 20: System.out.println("stopping..."); 21: } 22:  23: public void destroy() { 24: System.out.println("preparing to unload..."); 25: } 26:  27: public void paint(Graphics g){ 28: System.out.println("Paint"); 29: g.setColor(Color.blue); 30: g.drawRect(0, 0, 31: getSize().width -1, 32: getSize().height -1); 33: g.setColor(Color.black); 34: g.drawString(text, 15, 25); 35: } 36: } The Eclipse IDE should look like Click "Run" to run the Hello World applet. Now, lets test our new java applet. So, navigate over to your workspace for example: “C:\Users\mbcrump\workspace\HW Project\bin” and you should see 2 files. HW.class java.policy.applet Create a HTML page with the following code: 1: <HTML> 2: <BODY> 3: <APPLET CODE=HW.class WIDTH=200 HEIGHT=100> 4: </APPLET> 5: </BODY> 6: </HTML> Open, the HTML page in Firefox or IE and you will see your applet running.  I hope this brief look at the Eclipse IDE helps someone get acquainted with Java Development. Even if your full time gig is with .NET, it will not hurt to have another language in your tool belt. As always, I welcome any suggestions or comments.

    Read the article

  • Problems debugging using Cygwin gdb in Eclipse CDT(Helios)

    - by Rohan
    I am trying to debug an application using Eclipse CDT and cygwin gdb and I am facing a problem if my code calls Sleep(), it looks like whenever a sleep is encountered in the code the debugger seems to go in an infinite loop(I meant it never terminates or hit a breakpoint after sleep). On pressing pause the code is stuck on one of the thread on sigint::interrupt. Even my debugger console windows throw these error in the console output: [New thread 5968.0x1f98] Error: dll starting at 0x774a0000 not found. Error: dll starting at 0x775c0000 not found. [New thread 5968.0x19e8] Any idea what are these errors about? It would be helpful if someone can help me out here as I am new to eclipse and I am used to using VS so it has made be lazy to be honest and expect things to work out of box. Here are more details if required Windows 7 x64 bit. Eclipse 3.6 Helios with CDT plug-in compiled from the CVS head. Cygwin latest from website, I think it is 1.71

    Read the article

  • Setup Google Test (gtest) with Eclipse on OS X

    - by ejel
    What is the procedure to setup Google Test to work under Eclipse on Mac OS X? I followed the instruction in README to compile and install gtest as framework from XCode. Now I want to use gtest with Eclipse. Currently, it compiles fine but fails during build. I suppose Eclipse does not use framework concept as XCode does and need a different linking approach, but I'm not sure which files should I link to during build. g++ -L/usr/local/lib -L/usr/local/lib/libgtest.a -L/Library/Frameworks/gtest.framework -arch i386 -o "Raytracer" ./test/sample_test.o ./src/Raytracer.o Undefined symbols: "testing::Test::~Test()", referenced from: DemoTest_SANITY_Test::~DemoTest_SANITY_Test()in sample_test.o DemoTest_SANITY_Test::~DemoTest_SANITY_Test()in sample_test.o "testing::internal::AssertHelper::~AssertHelper()", referenced from: DemoTest_SANITY_Test::TestBody() in sample_test.o DemoTest_SANITY_Test::TestBody() in sample_test.o

    Read the article

  • Problem in Eclipse 3.5 and ubuntu 9.10

    - by ki0
    Someone knows why eclipse close when i click any button. This is because when i try to do something, update eclipse or whatever, eclipse close and it gives me this log... # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fc329864f7a, pid=9392, tid=140476827293968 # # JRE version: 6.0_16-b01 # Java VM: Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode linux-amd64 ) # Problematic frame: # C [libpango-1.0.so.0+0x24f7a] pango_layout_new+0x2a # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # I think it is something about java, anyone has any solution?¿ Thanks

    Read the article

  • Eclipse/adb error message in Vista "Failed to parse the output of adb version"

    - by watchman317
    I am trying to learn Android development, so I downloaded Eclipse Galileo and the Android SDK. However, whenever I start Eclipse, I get the error message "Failed to parse the output of adb version." In the Console/DDMS pane, the debug output reads: [2010-06-07 20:15:13 - ddms]Failed to reopen debug port for Selected Client to: 8700 [2010-06-07 20:15:13 - ddms]Address family not supported by protocol family: bind java.net.SocketException: Address family not supported by protocol family: bind at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at com.android.ddmlib.MonitorThread.reopenDebugSelectedPort(Unknown Source) at com.android.ddmlib.MonitorThread.run(Unknown Source) [2010-06-07 20:15:17 - adb]Failed to parse the output of 'adb version' I am running Eclipse Galileo, have the most recent Android SDK downloaded, and am running Windows Vista 32-bit SP2. I am sure that the Android SDK path is correct and that all the files are there. I would appreciate any assistance anyone could provide. P.S.--If anyone could direct me to any useful Android development resources, I would appreciate it

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >