Need help on mobile gaming development basic

my game canvas is like this
public a1Canvas(Display display){
super(true);
this.display = display;
frameDelay = 33;
gameOverState = false;
public void start(){
display.setCurrent(this);
try {
//get the images up
} catch (IOException ex) {
System.err.println("Failed to load images");
Thread t = new Thread(this);
t.start();
public void run() {
while (!gameOverState){
update();
draw(getGraphics());
try{
Thread.sleep(frameDelay);
}catch(InterruptedException ie){}
gotoMainMenu(getGraphics());
private void draw(Graphics graphics) {
//clear background to black
//draw the background
private void update() {
// Process user input
// Check for game over condition
if ( collision detection )
gameOverState = true;
}//if
}//for
private void gotoMainMenu(Graphics graphics) {
//clear screen to black colour
//draw the main menu
flushGraphics();
//if i press the fire button the game will start again
int keyState = getKeyStates();
if ( (keyState & FIRE_PRESSED) != 0 ){
System.out.println("game start");
gameOverState = false;
The problem i am facing is :
the FIRE button is not functioning, i put a system.out.println and it didnt print.
i am unsure whether i put the key input listener at the correct function
this button is supposed to start the game again.
What i want to do :
i want to display the main menu when i launched the game
when game is over, it will display back to the main menu again
when i press the fire button it will play the game again.
i hope someone can help me on this :)

kdoom wrote:
my game canvas is like thisWhen posting code, use the CODE tag. Just highlight all your code (pasted in from your editor to preserve formatting) and press the CODE button. Otherwise nobody will read it.
i hope someone can help me on this :)I can, if you use the CODE tag.

Similar Messages

  • Need help on mobile gaming development basic  {working the game main menu}

    package Assignment1;
    import java.io.IOException;
    import java.util.Random;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.lcdui.game.Sprite;
    public class a1Canvas extends GameCanvas implements Runnable{
        private Display display;
        private Sprite ufoSprite;
        private Image backgroundImage;
        private long frameDelay;
        private int ufoX;
        private int ufoY;
        private int ufoXDir;
        private int ufoXSpeed;
        private int ufoYSpeed;
        private Random rand;
        private Sprite[] roidSprite = new Sprite[3];
        private boolean gameOverState;
        //constructor
        public a1Canvas(Display display){
            super(true);
            this.display = display;
            frameDelay = 33;
            gameOverState = false;
        public void start(){
            display.setCurrent(this);
            //start the animation thread
             rand = new Random();     // Initialize the random number generator
             ufoXSpeed = ufoYSpeed = 0; // Initialize the UFO and roids sprites
            try {
                backgroundImage = Image.createImage("/background.jpg");
                ufoSprite = new Sprite(Image.createImage("/ufo.png"));
                //initialise sprite at middle of screen
                ufoSprite.setRefPixelPosition(25,25);
                ufoX = (int)(0.5 * (getWidth()- ufoSprite.getWidth()));
                ufoY = (int)(0.5 * (getHeight()- ufoSprite.getHeight()));
                ufoSprite.setPosition(ufoX, ufoY);
                Image img = Image.createImage("/Roid.png");
                roidSprite[0] = new Sprite(img, 42, 35);   //create 1st frame-animated asteroid sprite
                roidSprite[1] = new Sprite(img, 42, 35);
                roidSprite[2] = new Sprite(img, 42, 35);
            } catch (IOException ex) {
                System.err.println("Failed to load images");
            Thread t = new Thread(this);
            t.start();
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        private void draw(Graphics graphics) {
            //clear background to black
            graphics.setColor(0, 0, 0);
            graphics.fillRect(0, 0, getWidth(), getHeight());
            //draw the background
            graphics.drawImage(backgroundImage, getWidth()/2, getHeight()/2, Graphics.HCENTER | Graphics.VCENTER);
            ufoSprite.paint(graphics);
            for(int i=0;i<3;i++){
                roidSprite.paint(graphics);
    flushGraphics(); //flush graphics from offscreen to on screen
    private void update() {
    // Process user input to control the UFO speed
    int keyState = getKeyStates();
    if ( (keyState & LEFT_PRESSED) != 0 )
    ufoXSpeed--;
    else if ( (keyState & RIGHT_PRESSED) != 0 )
    ufoXSpeed++;
    if ( (keyState & UP_PRESSED) != 0 )
    ufoYSpeed--;
    else if ( (keyState & DOWN_PRESSED) != 0 )
    ufoYSpeed++;
    ufoXSpeed = Math.min(Math.max(ufoXSpeed, -8), 8);
    ufoYSpeed = Math.min(Math.max(ufoYSpeed, -8), 8);
    ufoSprite.move(ufoXSpeed, ufoYSpeed); // Move the UFO sprite
    checkBounds(ufoSprite); // Wrap UFO sprite around the screen
    // Update the roid sprites
    for (int i = 0; i < 3; i++) {
    roidSprite[i].move(i + 1, 1 - i); // Move the roid sprites
    checkBounds(roidSprite[i]); // Wrap asteroid sprite around the screen
    // Increment the frames of the roid sprites; 1st and 3rd asteroids spin in opposite direction as 2nd
    if (i == 1)
              roidSprite[i].prevFrame();
    else
              roidSprite[i].nextFrame();
    // Check for a collision between the UFO and roids
    if ( ufoSprite.collidesWith(roidSprite[i], true) ) {
    System.out.println("Game Over !");
    gameOverState = true;
    }//if
    }//for
    public void stop(){
    gameOverState = true;
    private void checkBounds(Sprite sprite) {
    // Wrap the sprite around the screen if necessary
    if (sprite.getX() < -sprite.getWidth())
         sprite.setPosition(getWidth(), sprite.getY());
    else if (sprite.getX() > getWidth())
         sprite.setPosition(-sprite.getWidth(), sprite.getY());
    if (sprite.getY() < -sprite.getHeight())
         sprite.setPosition(sprite.getX(), getHeight());
    else if (sprite.getY() > getHeight())
         sprite.setPosition(sprite.getX(), -sprite.getHeight());
    private void gotoMainMenu(Graphics graphics) {
    graphics.setColor(0, 0, 0);
    graphics.fillRect(0, 0, getWidth(), getHeight());
    graphics.setColor(255, 0, 0);
    graphics.drawRect(0, 0, getWidth()-1, getHeight()-1);
    graphics.setColor(255, 255, 255);
    graphics.drawString("GAME NAME", getWidth()/2 -50, 30, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(255, 0, 0);
    graphics.drawString("Main Menu", getWidth()/2 -50, 50, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(0, 255, 0);
    graphics.drawString("Start Game", getWidth()/2 , 80, Graphics.LEFT | Graphics.TOP);
    graphics.drawString("Instructions", getWidth()/2 , 110, Graphics.LEFT | Graphics.TOP);
    flushGraphics();
    int keyState = getKeyStates();
    if ( (keyState & FIRE_PRESSED) != 0 ){
    System.out.println("game start");
    gameOverState = false;
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    kdoom wrote:
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)You didn't have to create a whole new post just for the formatted code, silly. You could have just replied in the old thread. Anyway:
    Step through the program and think about what each line is doing. Most importantly:
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        }This says that while the game is being played, update( ), then draw( ). When the game is over, call gotoMainMenu( ).
       private void gotoMainMenu(Graphics graphics) {
            //do a bunch of graphics stuff
            int keyState = getKeyStates();
            if ( (keyState & FIRE_PRESSED) != 0 ){
                System.out.println("game start");
                gameOverState = false;
        }This says to do a bunch of graphics stuff, and then to check the key states. If fire is being pressed, print something out and set gameOverState to false. This check only happens once. When the state is being checked, most likely the user will not be pressing any keys, so the code is done.
    Also, simply setting the gameOverState variable to false outside of the loop you use it in won't do anything. For example:
    boolean doLoop = true;
    int count = 0;
    while(doLoop){
       count++;
       if(count > 10){
          doLoop = false;
    doLoop = true;Would you expect that second doLoop = true to start the while loop over?

  • Need help on mobile crm development

    Dear all,
    I am new to Mobile CRM.Where can I get some tutorials or cookbook  for  developing Mobile applications for CRM .Please dont give the sap help link as I already  have it.
    It would be great if somebody explains me the arichetecture of mobile app development for CRM.
    Your support is highly appreciated.
    Thanks and regards,
    Rajesh

    Hi,
    Pls chk this links;might be useful.
    "Getting Started with Mobile Client Applications":
    http://help.sap.com/saphelp_crm50/helpdata/en/50/45c33a1dfe105ae10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_crm50/helpdata/en/0e/c90d3888a6b510e10000009b38f8cf/frameset.htm
    Regards,
    CSM Reddy

  • Need Help on Mobile Portal Development

    Hello everyone!
    I am trying to develop a portal (client) for web services on mobile devices that supports CLDC and MIDP, like the Yahoo! Go.
    I was just wondering what technologies I need to learn and tools I have to use to develop the portal application. I have been developing game applications using J2ME for quite sometime now, and this portal application is new to me that is why I am asking for 'guidance' in what steps I have to take.
    Any help is greatly appreciated. :)

    Hi,
    Pls chk this links;might be useful.
    "Getting Started with Mobile Client Applications":
    http://help.sap.com/saphelp_crm50/helpdata/en/50/45c33a1dfe105ae10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_crm50/helpdata/en/0e/c90d3888a6b510e10000009b38f8cf/frameset.htm
    Regards,
    CSM Reddy

  • Need HELP to learn OAF development

    Hi,
    I am an experienced oracle financials developer. Most of my experience has been on using Developer 6i tools to develop front end and reports. Now I am planning to learn OAF framework to develop or to make customizations to the modules like iprocurement,iStore etc.
    I would like to know what is the best way to start the learning process?
    Is it possible to learn/practice the OAF framework(from oracle applications perspective) on my personal machine( it has oracle 10g personal edition installed), with out having access to oracle applications instance?
    I would like to know if there are any good books/tutorials on OAF usage in Oracle applications?
    Please let me know.
    -Thanks in Advance,
    Satya

    I would like to know what level of oracle application access do we need to practice the OAF development ?
    You need full access, including sysadmin responsibility.Do we need to have access to instance in terms of unix servers or just access to the applications is good enough?
    It would be good to have Unix access , for deploying pages , classes etc.Do we need to create any new responisbilities to practice OAF concepts?
    Not required, but a better option.What resposibilities or what level of access do we need to have on oracle application instance to practice OAF concepts?
    It is better to have a unrestricted access.Thanks
    Tapash

  • I need help on a main page. basic for u but not for me

    Hello,
    I need help on a main page.
    I have this page called themainpage.cfm which someone here
    asked me to make it the main page of my cf pages.
    I have 2 pages right now in testing server.
    Bloicpage.cfm
    And
    Index.cfm
    When you go to
    Server.myappfolders/repfolder
    It let you go to
    Server.myappfolders/rep/folder/ Bloicpage.cfm
    Page.
    I need for the themainpage.cfm to be the default when typing
    Server.myappfolders/repfolder
    Then have a link to the Bloicpage.cfm and a back button to go
    back to the mainpage.cfm
    Many thanks

    here is the Bloicpage.cfm
    which is currently the main page when you type
    Server.myappfolders/repfolder
    i need it to go to another main page which will have a link
    to this and a back button from here and a back button from the
    report html page and the excel csv page
    ps .
    i excluded the queries and some logics.
    sorry
    thanks
    <cfparam name="form.ctcde" default="ALL">
    <cfparam name="form.SDT" default="#now()#">
    <cfparam name="form.EDT" default="#now()#">
    <cfparam name="Form.outputFormat" default="CSV">
    <cfsetting showdebugoutput="no"/>
    <cfif not isdate(form.SDT)><cfset form.SDT =
    now()></cfif>
    <cfif not isdate(form.EDT)><cfset form.EDT =
    now()></cfif>
    <!---
    01/01/2003
    --->
    <cfquery name="theQuery" datasource="cts9i">
    SELECT
    </cfswitch>
    group by
    Order by </cfquery>
    <cfset a = a + 1>
    </cfoutput>
    <cfswitch expression="#Form.outputFormat#">
    <cfc value="HTML">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <style type="text/css">
    table{
    font-family:Arial, Helvetica, sans-serif;
    font-size:85%;
    td{
    font-family:Arial, Helvetica, sans-serif;
    font-size:85%;
    th{
    font-family:Arial, Helvetica, sans-serif;
    font-size:85%;
    h2{
    font-family:Arial, Helvetica, sans-serif;
    font-size:120%;
    h3{
    font-family:Arial, Helvetica, sans-serif;
    font-size:100%;
    </style>
    <body>
    <cfoutput>
    <div align="center">
    <h2>Bkc#dateformat(form.SDT,"mm/dd/yyyy")# to
    #dateformat(form.EDT,"mm/dd/yyyy")# Wudd</h2>
    </div>
    <div align="center">
    <h3>#form.ctcde# CCwoph</h3>
    </div>
    <table border="1" cellpadding="0" cellspacing="0">
    <tr>
    <th>ccc##</th>
    <th>aaa</th>
    <th>cccc</th>
    <th>iii</th>
    <th>Eee</th>
    <th>h11</th>
    <th>h112</th>
    <th>h22</th>
    <th>h222</th>
    <th>h33</th>
    <th>h333</th>
    <th>ehh</th>
    </tr>
    <cfset variables.nphc = 0>
    <cfloop index="x" from="1" to="#arraylen(anArray)#"
    step="1">
    <cfif NOT anArray[x][1]>
    <tr>
    <td>
    #anArray[x][2].c_nbr#
    </td>
    <td>
    #anArray[x][2].c_dcdt#
    </td>
    <td>
    #anArray[x][2].PAPD#
    </td>
    <td>
    #anArray[x][2].Iii#
    </td>
    <td>
    #anArray[x][2].Eee#
    </td>
    <cfset thirdArray = anArray[x][3]>
    <cfif NOT arraylen(thirdArray)>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <cfelse>
    <cfloop index="z" from="1" to="3">
    <cfif z GT arraylen(thirdArray)>
    <td> </td>
    <td> </td>
    <cfelse>
    <td>
    #thirdArray[z][2]# 
    </td>
    <td>
    #thirdArray[z][3]# 
    </td>
    </cfif>
    </cfloop>
    <cfif arrayLen(thirdArray) gt 3>
    <td nowrap="nowrap">
    <cfloop index="z" from="4"
    to="#arraylen(thirdArray)#">
    #thirdArray[z][2]# - #thirdArray[z][3]#<BR />
    </cfloop>
    </td>
    </cfif>
    </cfif>
    </tr>
    <cfset variables.nphct = variables.nphct + 1>
    </cfif>
    </cfloop>
    </table>
    Total Ccwoph: #variables.nphct#
    <BR />
    <BR />
    <HR />
    <BR />
    <div align="center">
    <h3>#form.ctcde# CWph</h3>
    </div>
    <table border="1" cellpadding="0" cellspacing="0">
    <tr>
    <th>ccc##</th>
    <th>aaa</th>
    <th>cccc</th>
    <th>iii</th>
    <th>Eee</th>
    <th>h11</th>
    <th>h112</th>
    <th>h22</th>
    <th>h222</th>
    <th>h33</th>
    <th>h333</th>
    <th>ehh</th>
    </tr>
    <cfset variables.phc = 0>
    <cfloop index="x" from="1" to="#arraylen(anArray)#"
    step="1">
    <cfif anArray[x][1]>
    <tr>
    <td>
    #anArray[x][2].c_nbr#
    </td>
    <td>
    #anArray[x][2].c_dcdt#
    </td>
    <td>
    #anArray[x][2].PAPD#
    </td>
    <td>
    #anArray[x][2].Iii#
    </td>
    <td>
    #anArray[x][2].Eee#
    </td>
    <cfset thirdArray = anArray[x][3]>
    <cfif NOT arraylen(thirdArray)>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <cfelse>
    <cfloop index="z" from="1" to="3">
    <cfif z GT arraylen(thirdArray)>
    <td> </td>
    <td> </td>
    <cfelse>
    <td>
    #thirdArray[z][2]# 
    </td>
    <td>
    #thirdArray[z][3]# 
    </td>
    </cfif>
    </cfloop>
    <cfif arrayLen(thirdArray) gt 3>
    <td nowrap="nowrap">
    <cfloop index="z" from="4"
    to="#arraylen(thirdArray)#">
    #thirdArray[z][2]# - #thirdArray[z][3]#<BR />
    </cfloop>
    </td>
    </cfif>
    </cfif>
    </tr>
    <cfset variables.phc = variables.phc + 1>
    </cfif>
    </cfloop>
    </table>
    Total Cwph: #variables.phc#
    <!---
    <cfloop index="x" from="1" to="#arraylen(anArray)#"
    step="1">
    #anArray[x][1]#
    #anArray[x][2].c_id#
    #anArray[x][2].c_nbr#
    #anArray[x][2].c_dcdt#
    #anArray[x][2].PAPD#
    #anArray[x][2].Iii#
    #anArray[x][2].Eee#
    #anArray[x][2].NumberOfHolds#
    <cfset thirdArray = anArray[x][3]>
    <cfloop index="z" from="1" to="#arraylen(anArray[x][3])#"
    step="1">
    #thirdArray[z][1]#
    #thirdArray[z][2]#
    #thirdArray[z][3]#
    </cfloop>
    <HR />
    </cfloop>
    --->
    </cfoutput>
    </body>
    </html>
    </cfc>
    <cfc value="CSV">
    <cfoutput>
    <cfset variables.theOutput =
    "Bkc#dateformat(form.SDT,"mm/dd/yyyy")# to
    #dateformat(form.EDT,"mm/dd/yyyy")# Wudd">
    <cfset variables.theOutput = variables.theOutput &
    chr(10)>
    <cfset variables.theOutput = variables.theOutput &
    "#form.ctcde# CCwoph">
    <cfset variables.theOutput = variables.theOutput &
    chr(10)>
    <cfset variables.theOutput = variables.theOutput & "C
    ##,Ad,Ccc,Iii,Eee,h11,h12,h22 ,h222,h33,H333,ehh">
    <cfset variables.theOutput = variables.theOutput &
    chr(10)>
    <cfset variables.nphct = 0>
    <cfloop index="x" from="1" to="#arraylen(anArray)#"
    step="1">
    <cfif NOT anArray[x][1]>
    <cfset variables.theOutput = variables.theOutput &
    "#anArray[x][2].c_nbr#, #anArray[x][2].c_dcdt#,
    #anArray[x][2].PAPD#,#anArray[x][2].Iii#,#anArray[x][2].Eee#">
    <cfset thirdArray = anArray[x][3]>
    <cfif NOT arraylen(thirdArray)>
    <cfset variables.theOutput = variables.theOutput &
    ",,,,,,">
    <cfelse>
    <cfloop index="z" from="1" to="3">
    <cfif z GT arraylen(thirdArray)>
    <cfset variables.theOutput = variables.theOutput &
    ",,">
    <cfelse>
    <cfset variables.theOutput = variables.theOutput &
    ",#thirdArray[z][2]#,#thirdArray[z][3]#">
    </cfif>
    </cfloop>
    <cfif arrayLen(thirdArray) gt 3>
    <cfloop index="z" from="4"
    to="#arraylen(thirdArray)#">
    <cfset variables.theOutput = variables.theOutput &
    "#thirdArray[z][2]# - #thirdArray[z][3]# | ">
    </cfloop>
    </cfif>
    </cfif>
    <cfset variables.nphct = variables.nphct + 1>
    <cfset variables.theOutput = variables.theOutput &
    chr(10)>
    </cfif>
    </cfloop>
    <cfset>
    <cfset>
    <cfset >
    <cfset >
    <cfset >
    < & chr(10)>
    </cfif>
    </cfloop>
    </cfoutput>
    <cfcontent
    type="application/msexcel"><cfoutput>#variables.theOutput#</cfoutput></cfc></cfswitch>

  • Need help on how forms developer is used

    to everyone:
    im actually new at forms developer 2000,at really wondering how to use it though i have a background in SQL.If you have any data that you can share to me explaining the whole environment of Developer 200 please send it to me. Any help is greatly appreciated.
    Thank you...
    Cyrus

    This link will help: http://technet.oracle.com/docs/products/forms/doc_index.htm
    You need to register with technet to get access.

  • Need help making Mobile Site

    Hey guys, I am completely new to this whole mobile web idea
    and I'm not sure where to start. I have a normal html site that has
    pages with all the restaurants in our city. I want to make a simple
    site for mobile phones. Is there a way to put an index file with a
    different extension that the phones would pick up. For example:
    when searching on a computer browser, it would go to say index.html
    and when searching on a phone it would go to say index.xhtml or
    whatever the ending needs to be. Thanks for any help!
    Jeremy

    "dayencom" <[email protected]> wrote in
    message
    news:et4lud$1ij$[email protected]..
    > Hey guys, I am completely new to this whole mobile web
    idea and I'm not
    > sure
    > where to start. I have a normal html site that has pages
    with all the
    > restaurants in our city. I want to make a simple site
    for mobile phones.
    > Is
    > there a way to put an index file with a different
    extension that the
    > phones
    > would pick up. For example: when searching on a computer
    browser, it would
    > go
    > to say index.html and when searching on a phone it would
    go to say
    > index.xhtml
    > or whatever the ending needs to be. Thanks for any help!
    you could restyle the site with a CSS file for Mobiles in
    addition to your
    regular CSS file. The key issue there is whether or not the
    Mobile actually
    identifies itself as a Mobile device. Some devices will ID
    themselves as,
    say, a Cingular 8525, but depending on the web browser the
    person is running
    on the device, it may just ID itself as a regular web surfer.
    If your content is database driven, you could always setup a
    subdomain of
    your site (like mobile.domain.com) and duplicate the files of
    the main site
    and just have the regular CSS file for that subdomain just do
    the styling
    you want for Mobiles. You could also just give a limited set
    of content
    here, too, if you don't have to duplicate the whole site.

  • I need help signing up for developer

    I'm making a iOS developer account. I am currently on the page where it says "Tell us about yourself" If all im going to do is make apps from my own iMac from my house. Which boxes do i need to tick out of the ones displayed in the picture. I don't have a company. Just making apps at home, some free some paid, and uploading them to the app store. Can someone please help as i am leaving out of town tomorrow and i really need to sign up before i leave.

    Well actually, if im going to Pakistan (slow **** internet) from a 11 hour flight, i prefer not to get there and worry about making this account. I prefer to make it before i leave. Attend the 5 stage wedding i have to go to, and then come back and start using it. In pakistan you have to worry more about not getting shot then making a dev account.

  • [SOLVED]Need help with Xmonad config(just basic stuff)

    Hello Guys,
    I thought I'd give Xmonad a try even if I don't know haskell. So I just tried to use some examples from the net, however even for just mapping some special keys it fails.
    I used this example http://www.haskell.org/haskellwiki/Xmon … _%280.9%29
    and this is my config file:
    import XMonad
    import Graphics.X11.ExtraTypes.XF86
    import XMonad.Util.EZConfig
    import Data.Monoid
    import System.Exit
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    MyKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
    [((0, XF86MonBrightnessUp), spawn "xbacklight +20")
    ,((0, XF86MonBrightnessDown), spawn "xbacklight -20")
    ,((0, XF86AudioRaiseVolume), spawn "amixer set Master 1+ unmute")
    ,((0, XF86AudioLowerVolume), spawn "amixer set Master 1- unmute")
    main=xmonad defaults
    -- use the defaults exepct for super instead of alt mod and the special keys
    defaults=defaultConfig{
    modMask =mod4Mask
    ,keys =MyKeys
    So as could could guess, I just want to my the keys so that I can adjust volume and backlight. The keys I got with xev so these should be correct.
    So when I try xmonad --recompile this error shows up.
    Error detected while loading xmonad configuration file: ~/.xmonad/xmonad.hs
    xmonad.hs:12:1: Not in scope: data constructor `MyKeys'
    xmonad.hs:13:15:
    Not in scope: data constructor `XF86MonBrightnessUp'
    xmonad.hs:14:15:
    Not in scope: data constructor `XF86MonBrightnessDown'
    xmonad.hs:15:15:
    Not in scope: data constructor `XF86AudioRaiseVolume'
    xmonad.hs:16:15:
    Not in scope: data constructor `XF86AudioLowerVolume'
    xmonad.hs:22:26: Not in scope: data constructor `MyKeys'
    Please check the file for errors.
    I'd really appreciate _any_ help since I can't see any significant difference to the linked page(except for cutting-out a lot and filling in my special keys     )
    Greetings
    Edit: Here's the output of xev for the keys, perhaps it help any way:
    audio lower
    KeyRelease event, serial 40, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 388994, (516,521), root:(1024,549),
    state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    raise audio
    KeyRelease event, serial 40, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 381193, (517,259), root:(1025,287),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    mute audio x2
    KeyRelease event, serial 46, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x6600002, time 776961, (17,46), root:(525,74),
    state 0x0, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    FocusOut event, serial 46, synthetic NO, window 0x6600001,
    mode NotifyGrab, detail NotifyAncestor
    FocusIn event, serial 46, synthetic NO, window 0x6600001,
    mode NotifyUngrab, detail NotifyAncestor
    KeymapNotify event, serial 46, synthetic NO, window 0x0,
    keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    KeyRelease event, serial 46, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x6600002, time 780104, (17,46), root:(525,74),
    state 0x0, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    mute mikro
    KeyRelease event, serial 45, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 754481, (122,123), root:(630,151),
    state 0x0, keycode 198 (keysym 0x1008ffb2, XF86AudioMicMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    fn
    KeyRelease event, serial 46, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 828065, (121,141), root:(629,169),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    f9
    KeyRelease event, serial 46, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 881813, (155,121), root:(663,149),
    state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    fn+f9
    KeyRelease event, serial 49, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 942023, (163,85), root:(671,113),
    state 0x0, keycode 233 (keysym 0x1008ff02, XF86MonBrightnessUp), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    fn+f8
    KeyRelease event, serial 51, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 976374, (138,125), root:(646,153),
    state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    black button(specified like this in manuel <.< )
    KeyRelease event, serial 55, synthetic NO, window 0x6600001,
    root 0x9d, subw 0x0, time 1048947, (67,99), root:(575,127),
    state 0x0, keycode 156 (keysym 0x1008ff41, XF86Launch1), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    Last edited by blubbb (2013-12-29 11:07:15)

    Raynman wrote:
    The first difference is that you wrote 'MyKeys' with an uppercase M. Variable/function names cannot start with an uppercase letter; that's reserved for type and data constructors.
    The second problem is the key bindings themselves. Your list is completely different from that example. You probably imported XMonad.Util.EZConfig to use the "emacs style" key descriptions, but you're mixing the two styles. You can only generate a Map (of the right type) with fromList if you use the same format as that example. Look at the documentation for the EZConfig module to see how the shorter string descriptions should be used. The part
    keys = \c ->
    in that example is basically the same as your
    myKeys conf@(XConfig {XMonad.modMask = modm}) =
    . The difference is that you're unpacking the conf/c value to extract the modMask (binding it to the name modm) but you're not using modm anywhere in your list of keybindings, so you dont need the @(..) part. And you don't need it anyway, because you can use a string starting with "M-" (in emacs-style key descriptions) to define a binding that uses the mod key (see examples).
    Hey, thanks a lot for your fast and extensive answer, however I still couldn't get it working. Stupid me.
    So, tried using the style of this example:
    keys = \c -> mkKeymap c $
    [ ("M-S-<Return>", spawn $ terminal c)
    , ("M-x w", spawn "xmessage 'woohoo!'") -- type mod+x then w to pop up 'woohoo!'
    , ("M-x y", spawn "xmessage 'yay!'") -- type mod+x then y to pop up 'yay!'
    , ("M-S-c", kill)
    and since I don't want to pres the mod key, just the mediakeys themselfes I thought I could directly write
    ..."<Mediakey>", spawn ...
    But my code still won't work, but I get a new fancy error log:
    Error detected while loading xmonad configuration file: ~/.xmonad/xmonad.hs
    xmonad.hs:24:26:
    Couldn't match type `[Char]' with `(ButtonMask, KeySym)'
    Expected type: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
    Actual type: XConfig Layout -> M.Map [Char] (X ())
    In the `keys' field of a record
    In the expression:
    defaultConfig {modMask = mod4Mask, keys = myKeys}
    In an equation for `defaults':
    defaults = defaultConfig {modMask = mod4Mask, keys = myKeys}
    Please check the file for errors.
    So apparently I don't use the right type since I was using the type char. However if I compare my code to the example I don't find a significan't difference(for the keymapping himself) except for not using the modkey. Is this perhaps the mistake? Doesen't this work without the modkey?
    import XMonad
    import Graphics.X11.ExtraTypes.XF86
    import XMonad.Util.EZConfig
    import Data.Monoid
    import System.Exit
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    myKeys = \c -> M.fromList $
    [("<XF86MonBrightnessUp>", spawn "xbacklight +20")
    ,("<XF86MonBrightnessDown>", spawn "xbacklight -20")
    ,("<XF86AudioRaiseVolume>", spawn "amixer set Master 1+ unmute")
    ,("<XF86AudioLowerVolume>", spawn "amixer set Master 1- unmute")
    main=xmonad defaults
    -- use the defaults exepct for super instead of alt mod and the special keys
    defaults=defaultConfig{
    modMask =mod4Mask
    ,keys =myKeys
    Last edited by blubbb (2013-12-19 12:55:56)

  • Need help or advise for developing consolidated Wokflows

    I have developed a SharePoint custom list and I need to write a consolidated SharePoint designer workflow for the same.
    The workflow parameters are, if any item are modified and/or new item created there should be an email
    triggered. The tricky part is it should be the consolidated email (like a report to say how many list of items have been modified/added what kinds of information have been updated on the EOD).
    All the changes that have been done to the existing custom list of items need to be updated in one email and send the consolidation information to the stake holders.
    Is it possible? If yes may I know how it works if anybody would have developed the similar kind of workflow could you please provide me some ideas & suggestions or may
    I know what are the alternatives for this requirement.

    Yes Alert email will fit I agree on that
    Kind Regards,
    John Naguib
    Senior Consultant
    John Naguib Blog
    John Naguib Twitter
    Please remember to mark this as answered if it helped you

  • Need help regarding Mobile Direct Store Delivery

    Hi all,
    What is the next step to be proceeded for the MDSD solutions
    as we have gone through the following steps:
    1) Configured DSD backend, DSD connector and MI server settings.
    2) Established the connection between DSD backend and Connector
    & DSD connector and MI server.
    3) Uploaded Master Data in the backend and also to connector.
    4) Tested the scenarios in DSD without MI components.
    5) Replicated the data to the MI server.
    I would be grateful to u for ur replies...
    Thanks in advance...

    Hello Everyone,
                            I am  working with Shori on the DSD Project. Can anyone tell us what are the steps for doing we need to do for downloading the Tour data to the Mobile client ???
    Do we need to do aything in the DSD Admin concole???? We have replicated all the "Sync BO ID"  in MEREP_PD transaction in the middleware.
    Thanks for your help in advance.
    Thanks,
    Greetson

  • I need help with iAD/App development!

    So I released an app, and it went on sale yesterday on the App Store (free app: if you want it, the developer name is Abdulrahman Ahmad, and the game name is Space Defense), but I'm having some problems. When I was testing the app (on an iPhone, and on the xCode Simulator), the ads were working, and I was getting "You're iAD is configured correctly (or whatever the test ads say)" but now that the app has finally released, no ads are appearing (but iTunes Connect says that the ads are live?). Also, I released 2 different versions of the app (2 downloads, 1 was optimized for 5 inch screen, one for 3.5 in (just figured out how to make it one app, that'll be coming out in the update), and when I was looking at my iTunes Connect iAD portal, only 1 app was showing up to have adds (the 3.5 inch one doesn't have ads for some reason?):
    SO! Summery if I confused you:
    iAD was working in the testing phase of the app, but not showing up now(even though iTunes Connect says ads are live)?
    And 1 of my apps is not showing up in my iTunes Connect iAD terminal...
    Any and all help appreciated!
    Thanks in advance!

    RE: Nevermind, i guess it takes a day or so for ads to finally start showing, and i guess i forgot to check off iad compatibility with the second app!

  • Need help with online gaming

    When I play a online game my ping go very high and its started few days ago.
    I dont now what i can do.
    My internet is good.
    Can anyone help me?
    Also mi cant geth my memory higher.
    It says: 3,00 GB (2,60 GB avallible) how can i get it higher?

    > It says: 3,00 GB (2,60 GB available) how can i get it higher?
    Windows 32bit system can handle only 3.2GB RAM. This is 32bit limitation.
    I assume the system uses 2.6GB because the other part is used by graphic card.

  • Need Help For Java Card Development

    I am a beginner in java card technology , I am working on a project in which i need to send some instructions to smartcard store in smartcard, i have created GUI in java swings, but don't how to start communication between java swings application and smart card . Please Guide me to Possible way. Thanks in Advance .

    Hi,
    what do you exactly wanna know?
    The syntax of APDU sending to smart card and response or the way to communicate with card reader?
    Also make clear if you wanna know about GP instruction (load, install, select,...) or calling methods of your applet on smart card
    Regards,
    Hana

Maybe you are looking for

  • How can i connect to remote database from netbeans

    Hi, I have got MySQL database server installed and running on a different machine. Is there any way to connect and browse database remotely using netbeans 5.5? I have added connector/driver for that database. i can connect and browse the database wit

  • Is it possible RecordSetsPerMessage with MessageTransformBean

    Hi Experts, I need to pick up large zip files from source directory and send it to CRM, I am using message transform bean for FCC in sender file adapter because source is zip file, I know normal FCC got record sets per message parameter, is it possib

  • How to insert a image file in oracle8i db

    hi.. i want to add some new logo's in my oracle 8i database...i created the column and datatype for that but i don't know the proper command for insert the logo. so i need u r help..and i want to use that logo in my reports6i too. regards kannan

  • Record assigned entry different for service requests and incidents

    Hi I've noticed something recently when using/implementing service manager that the record assignment formats are different depending on if you are assigning an incident or service request. For example when assigning an incident the record assignment

  • Widget triggers jumps around, drives me crazy!!

    http://delta.tinahammar.se/delta/get-better-effect.html#bad-triggers Again ... why does the triggers jump around. Why can't they just stay the way they are in design mode. When slideshows go nuts, I usually have to start all over again, and somehow t