Complex Data Filed Example missing?

Former Member
Former Member
It seems like the complex data field example hasn't been included in the sample showcase since SDK 0.2.4. Is there a reason for it?

I tried to create a new ConnectIQ project using Eclipse and the only Data Field type that was available was "Simple" using the ConnectIQ project template.

I also noticed that the documentation on the Toybox::WatchUI:: DataFiled is rather sparse and missing several key elements, such as the initialize() method. Have these been deprecated?

It also says it inherits from Object when it seems to inherit from View.

It's kind of hard to develop anything when the documentation is out of date...
  • Former Member
    Former Member over 10 years ago
    +1 Would like to see this example also..
  • The example from 0.2.4 still works - so you can just download the old SDK and use the code.

    /Tonny
  • Former Member
    Former Member over 10 years ago
    The old example still (sort of) works as Tonny says. It was removed from the samples because there were some SDK changes that caused it to draw incorrectly, and correcting the code hasn't made it back onto the schedule. (Most notably, an early change to how text is aligned cause all the text in the old sample to draw in the wrong locations.)
  • Former Member
    Former Member over 10 years ago
    Any reason why the complex data field is not in the template wizard (my second question)?
  • Former Member
    Former Member over 10 years ago
    Sorry, I meant to respond to that.

    I don't know why there is not a template for complex data fields. I've reported its absence.

    You can create a data field app type and have your main view extend Ui.DataField. In that view, you should only need to implement the compute() function and onUpdate() function.
  • Former Member
    Former Member over 10 years ago
    Thanks Brian, you're a great asset!
  • Does anyone have a sample project to upload or maybe a link to one on GitHub to reference that implements this?

    Specifically I am looking for a sample that implements 2 or 3 data members as text within a single data field. (ie. Lap# / Pace or Cadence / Heart Rate).

    The 0.2.4 sample looks to be drawing graphs and other cool stuff. I'm just looking for a sample with multiple text fields.