×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    6

    DATEFIELD on 7650 notCompatible?

    hallo,

    i have written ah java app. it works on:

    nokia 3410
    nokia 6310i
    siemens sl45i
    sun j2me emulator

    only on my 7650 it dosen't work :-(

    here is the code

    public class NLCalc extends MIDlet implements CommandListener{

    ....

    DateField einberufung = new DateField("Einberufung:", DateField.DATE);
    ...

    }

    public void commandAction(Command c, Displayable s) {
    if (c == calcCommand) {
    ..

    einZeitpunkt = einberufung.getDate().getTime(); <- this command dosen't work!!!


    ...
    }

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    1
    I just came across the same problem, both on the 7650 and the Series 60 emulator. However, it seems to work OK if you call setDate() on the DateField object after creation.

    Using your example:
    ...
    DateField einberufung = new DateField("Einberufung:", DateField.DATE);
    einberufung.setDate(new Date()); // ***Add this line***
    ...

    This will initialise the datefield to the current date, and your call to einberufung.getDate() should no longer return null.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×