Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8430385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:35:04+00:00 2026-06-10T05:35:04+00:00

I am attempting to render a UI using Sproutcore where I have a list

  • 0

I am attempting to render a UI using Sproutcore where I have a list of lists. There is a vertical list of data where each associated item has a list of items of its own. I’ve setup the models as I believe is appropriate based on what I know of Sproutcore.

Model:

App.VerticalData = SC.Record.extend({
  someField: SC.Record.attr(Boolean),
  associatedListOfData: SC.Record.toMany("App.HorizontalData", {
    inverse: "vertical",
    isMaster: YES
  })
});

App.HorizontalData = SC.Record.extend({
  someForeignKeyField: SC.Record.attr(Number),
  vertical: SC.Record.toOne("App.VerticalData", {
    inverse: "associatedListOfData",
    isMaster: NO
  }),
});

I’ve added a subView to the ListItemView of the vertical list and modified the subclass so that it will layout the items in the horizontal list…well…horizontally. The issue I have is that the only way I seem to be able to get the data from the toMany() relationship to bind to this horizontal list is to do the following for each item in the vertical list.

horizontalListView.set('content', App.store.find(SC.Query.local(App.HorizontalData, {
  conditions: 'someForeignKeyField = ' + keyValueOfVerticalItem)
})));

This is painfully, woefully slow. I don’t understand why I can’t seem to just use the results of the calculated property for the toMany() field for the current vertical list item. Can someone provide some guidance here? Perhaps I’m missing something silly.

If I try to access the property directly, this is the result I get back:

Object
SproutCore18001994610927067697: "sc1271"
__sc_super__: Object
_bindings: Array[0]
_kvo_cacheable: true
_kvo_changeLevel: 0
_kvo_changes: null
_kvo_cloned: Object
_kvo_content_observed_keys: Object
_kvo_dependents: Object
_kvo_revision: 2
_object_toString: "SC.ManyArray:sc1271"
_observableInited: true
_observers: Array[0]
_prevStoreIds: Array[167]
_properties: Array[15]
_records: null
bindings: Array[0]
manyAttribute: Object
outlets: Array[0]
propertyName: "associatedListOfData"
propertyRevision: 2
record: Object
recordType: App.HorizontalData
__proto__: Object

I don’t know if this looks correct or not. So it is possible that I’ve got something still not defined properly in the FIXTURES I’ve used for my test data. The information I put in the associcatedListOfData field is an array of numbers that align to the GUIDs for the elements in the HorizontalData table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:35:05+00:00Added an answer on June 10, 2026 at 5:35 am

    After some more testing and experimentation I think the issue might be related to the App.store.dataHashes not containing the values for the associated records. This apparently must be manually populated for the association to reconcile the records and doesn’t populate the store automatically whenever a SC.ManyArray is constructed in an association. I don’t know if this is a bug in Sproutcore or if it is intended behaviour.

    I was able to resolve the issue by populating the this property using a query on the App.HorizontalData table that returned all the records I had generated for my FIXTURE. If the store has the hashed data available, using the SC.ManyArray returned as the content for a ListView worked as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone had success using a recent version of ZXing under C#? I'm attempting
I'm attempting to render a textured quad using the example located here . I
I'm attempting to render RTF documents using the WPF RichTextBox control. So far, the
I'm trying the render an HTML list that looks like the following, using the
I'm attempting to render the following text using the ExtTextOut function with the Courier
I've been attempting to render text onto an openGL window using SDL and the
While attempting to render a 3D object using OpenGL (and the GLFW library), the
Attempting to build a C# NPAPI plugin I have found a tutorial which describes
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
Attempting to use the data series from this example no longer passes the JSONLint

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.