infinitered / cdq

Core Data Query for RubyMotion
MIT License
172 stars 35 forks source link

Including CDQ in a motion-game template? #128

Open hugoerg56 opened 8 years ago

hugoerg56 commented 8 years ago

there is a way to include CDQ in a motion-game template?

I try:

class Application < MG::Application
  include CDQ  

  def start
    cdq.setup
    MG::Director.shared.run(MenuScene.new)
  end
end

and

class Score < CDQManagedObject
end  

but i get:

*** Starting simulator
(main)> 2016-02-29 15:58:49.832 Hubble[38952:1824353] score.rb:1:in `<main>': uninitialized constant CDQManagedObject (NameError)
2016-02-29 15:58:49.835 Hubble[38952:1824353] *** Terminating app due to uncaught exception 'NameError', reason: 'score.rb:1:in `<main>': uninitialized constant CDQManagedObject (NameError)

Any idea?

kemiller commented 8 years ago

There should be nothing special about it AFAIK but I have no experience with motion-game. Seems like a more general compilation order issue.