Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Apr 2007

    How to check for Type ?

    I am using the LayerManager to draw several custom classes extending the J2ME Sprite class...
    A couple of tiems per second I want to move several of these objects, leaving my background (which is also a Sprite) untouched...
    I can simply pick out the background because the object is called backgroundSprite, but the difficult part is picking out the several custom class objects because they all have the same name (i make like 15 objects so thats in a loop with no possibility to give all objects different names, if you know some way tho achieve this I would gladly hear it, creating an object name utilizing some variable's name for example)...
    So I would like to know if there is some way to recognize the type of object in a LayerManager's layer ?
    For example my custom Fruit class extends the Sprite class, while my background is a plain SPrite class object... Is there a way to check if I got an object of the one or the other ?

    Thanks in advance, and a good Monday to everyone

  2. #2
    Super Contributor
    Join Date
    Apr 2007

    Re: How to check for Type ?


    Surely somebody knwos how to check the type of an object ???

  3. #3
    Nokia Developer Expert
    Join Date
    Aug 2007

    Re: How to check for Type ?

    Hello Tiger79,

    when looping, how about checking the type with getClass?
    Usage: objectName.getClass.getName();

    More about:



Similar Threads

  1. S60 2nd to 3rd/ PlatformSecurity / Capabilities
    By jarkoos in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2007-04-14, 14:08
  2. PIM API : how to check supported fields
    By arsllan in forum Mobile Java General
    Replies: 1
    Last Post: 2007-03-26, 11:58
  3. Showing check box on menu
    By Utk in forum Symbian
    Replies: 0
    Last Post: 2004-12-20, 07:52
  4. GSM/GPRS Drivers check FAILED
    By hblume in forum Multimodecards
    Replies: 3
    Last Post: 2004-01-28, 21:37
  5. SMS Msg using VB Application
    By gurup83 in forum General Messaging
    Replies: 2
    Last Post: 2002-07-11, 04:48

Posting Permissions

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