Problem with Control and Hashtable on Device

Discussion in 'Questions (Windows Mobile)' started by CryoGenID, Jun 22, 2009.

  1. CryoGenID

    CryoGenID Active Member Licensed User

    Hello everybody :)

    I have just implemented a hashtable in my application, which runs perfectly
    fine on the desktop.
    But I cannot compile it for the device, as I get an error stating I should use the "Control (Name, Type)"-Version...

    This is the version, working only on the desktop:
    Code:
    Control(arrayIn).AddOrUpdate(i, SubString (tempArray(i).Text,02))
    arrayIn is a string with the name of the hashtable, tempArray is an array where I take out values and insert them into the hashtable (using "i" as the key).

    As stated before, this works perfectly well on the desktop, but does not compile for the device. :sign0085:

    Any help is greatly appreciated :):)

    Thanks and best regards,

    Chris
     
  2. agraham

    agraham Expert Licensed User

    Do what the error message says.

    Control(arrayIn, Hashtable).AddOrUpdate(i, SubString (tempArray(i).Text,0, 2))

    It is not a device specific error. Optimise compiling for the desktop would show the same error. See Help -> Main Help -> Keywords -> Runtime control management -> Control
     
  3. CryoGenID

    CryoGenID Active Member Licensed User

    Agraham,

    thanks for your reply.

    Well I tried that already but now I get this error (when I try to compile for the device, on the desktop it works perfectly):
    But when I count the brackets I don't find any one missing or too much :-(

    Code:
    Control(arrayIn, Hashtable).AddOrUpdate(i, SubString (tempArray(i).Text,02))
    Thanks a lot for any help :sign0085: :)

    Best regards,

    Chris
     
    Last edited: Jun 22, 2009
  4. agraham

    agraham Expert Licensed User

    I guess this is where the error is.

    "tempArray(i).Text"

    Arrays don't have properties but the IDE is a bit too forgiving in cases like this but the optimising compiler isn't, it is a lot stricter. Again the issue is not desktop versus device but legacy/IDE compiler versus optimising compiler
     
  5. CryoGenID

    CryoGenID Active Member Licensed User

    Agraham,

    thanks a lot, you (once again *g*) saved my day :sign0060::sign0060:

    That was exactly the problem!
    Now it working perfectly ok :)

    Thanks again!

    Best regards,

    Chris
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice