DataField label

Former Member
Former Member
Hello!

I am wondering if it is possible to add a label for a DateField that is viewed from menus? E.g. when you add a DateField to an activity in activity settings you go to the list called "Connect IQ" and there the label/heading of the DateField is empty. I have installed an app so I can select the row which is empty and that works ok to use with the activity.




In the pictures:
alternativ = swedish for options
datafält = swedish for Data Fields
  • I do not have this problem with the data fields I tested yesterday.

    Have you tried deploying the ComplexDataField example to your device? It requires one small tweak to the manifest to support the fr920xt, but it is a trivial change. Once it is on the device, you should see a name for it in the selection menu. If you see the name there, then it is likely to be a problem with your application or how you built it. Are you using the connectiq-0.2.4 SDK? Do you specify the name attribute of the application element in manifest.xml? Do you specify a resource string with the value of the id attribute equal to the name attribute value in the manifest? Is the value of that string non-empty? In other words...

    The application entry in manifest.xml has an attribute name that describes the id of a string resource to use for the data field name. In the case of the ComplexDataField example, the resource string id is AppName.
    <iq:application entry="ComplexDataField" id="92475EC2A0EE4888A1402241A892A5FF" launcherIcon="LauncherIcon" name="AppName" type="datafield">


    There will be a string resource entry that provides a value for the string described in the manifest. In the case of the ComplexDataField example, the AppName resource is defined to ComplexDataField. This is what I see in the data field selection screen.
    <!-- resources/strings.xml defines the application name -->
    <resources>
    <string id="AppName">ComplexDataField</string>
    </resources>


    Is your data field app configured like this? If so, is the resource value set to an empty string? If it is not an empty string, does the string contain any non-ascii characters? I've seen cases where rendering accented characters causes the entire string to disappear.

    Travis
  • Former Member
    Former Member over 10 years ago
    Hello!

    Thanks for the input - it is super appreciated by me as a beginner!

    Yes I was trying the ComplexDataField (with some modifications).
    I think the problem was that from the sample there are 3 files created:
    - resources/bitmaps.xml
    - resources/strings.xml
    - resources/resources.xml

    AppName was placed in /strings.xml.
    I moved it to resources.xml where it worked.

    I have made a new DateField with a barGraph and some information to make this
    http://www.runnersworld.com/race-training/tracking-fitness-with-the-heart-rate-running-speed-index
    I think it can be useful and I see many possibilities when it will be possible to make apps (not only DataFields).

    In the Programmers guide there is a reference to publishing. But I can not fund that "developers account".
    Do you know where it is?

    PUBLISHING THE FIRST VERSION
    The first step is to upload your IQ file to your developer account.
    <picture...>
  • I think this is something we will all learn about soon.