BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-03-2008, 01:00 AM   #1
pshiwakoti
New Member
 
Join Date: Oct 2008
Model: 8100
PIN: N/A
Carrier: dont know
Posts: 2
Default how do i compile a package using ant

Please Login to Remove!

I am new to RIM and black berry code development. I am trying to compile a
package using ant. Somehow I am getting an error messages that says
"com.rim.samples.docs.resources" doesn't exist.

Someone posted the answer in the forum for previous user but it didn't clearly say how to do it. It says create the whole structure like com\rim\docs\resources etc.
First of all, I put build.properties and build.xml file under src. I also created the folder tree and put my java source file under resources. But it still doesn't compile. I get bunch of errors saying the "com.rim..." doesnt exist. Will someone explain me how to compile please?

thanks
prakash
Offline  
Old 10-03-2008, 01:02 AM   #2
TroyDBrown
No longer Registered.
 
Join Date: Jun 2007
Model: 9530
OS: 4.7.0.XXX
PIN: G Pong Champ
Carrier: T-Mobile U.S.
Posts: 5,515
Default

*** Moved To Developer Forum ***
Offline  
Old 10-03-2008, 01:24 AM   #3
pshiwakoti
New Member
 
Join Date: Oct 2008
Model: 8100
PIN: N/A
Carrier: dont know
Posts: 2
Default

//Code sample: Creating a custom context menu
//Example: ContextMenuSample.java
/**
* ContextMenuSample.java
* Copyright (C) 2001-2005 Research In Motion Limited. All rights reserved.
*/

package com.rim.samples.docs.contextmenus;

//1: Creating user interfaces
import net.rim.device.api.i18n.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;
import com.rim.samples.docs.resource.*;

public class ContextMenuSample extends UiApplication implements ContextMenuSampleResource
{

private MyContextField myContextField;
private static ResourceBundle _resources = ResourceBundle.getBundle(
ContextMenuSampleResource.BUNDLE_ID,
ContextMenuSampleResource.BUNDLE_NAME);


public static void main(String[] args) {
ContextMenuSample app = new ContextMenuSample();
app.enterEventDispatcher();
}
// Inner class to define a new field.
private static class MyContextField extends RichTextField {
private MenuItem myContextMenuItemA = new MenuItem(
_resources, MENUITEM_ONE, 200000, 10) {
public void run() {
onMyMenuItemA();
}
};
private MenuItem myContextMenuItemB = new MenuItem(
_resources, MENUITEM_TWO, 200000, 10) {
public void run() {
onMyMenuItemB();
}
};
private void onMyMenuItemA() {
// Perform an action when user selects menu item.
}
private void onMyMenuItemB() {
// Perform an action when user selects menu item.
}
protected void makeContextMenu(ContextMenu contextMenu) {
contextMenu.addItem(myContextMenuItemA);
contextMenu.addItem(myContextMenuItemB);
}
MyContextField(String text) {
super(text);
}
}
public ContextMenuSample() {
MainScreen mainScreen = new MainScreen();
MyContextField myContextField = new MyContextField("Field label:"); //added double code
mainScreen.add(myContextField);

pushScreen(mainScreen);
}
}
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Jelenko Commodore LS VPF with Pump  picture

Jelenko Commodore LS VPF with Pump

$875.00



Windsor Commodore Duo 20

Windsor Commodore Duo 20" Carpet extractor w/Lester Charger 25900/Battery/99hour

$2519.95



Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc picture

Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc

$22.00



6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS picture

6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS

$5.89



Vintage Holt Commodore Commercial Floor Scrubber Polisher Buffer Burnisher 20

Vintage Holt Commodore Commercial Floor Scrubber Polisher Buffer Burnisher 20"

$399.99



Vintage Printer Switch box Commodore 64/Sanyo Mountable Computer PC picture

Vintage Printer Switch box Commodore 64/Sanyo Mountable Computer PC

$49.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.