Giter VIP home page Giter VIP logo

Comments (4)

kevinsawicki avatar kevinsawicki commented on June 4, 2024

Can you see what arguments are being sent to the @content method of your TextView class?

Just throw a console.log(arguments) in there.

from space-pen.

fictorial avatar fictorial commented on June 4, 2024

Yes I am getting the model and mutable passed to content but it seemed, I don't know, a bit awkward. This isn't a big deal at all. I'm mostly curious what's going on. I was just trying to make a convenience in ModelView so that I could avoid any boilerplate in subclasses thereof. The simple answer is to remove ModelView and just do this:

class UserView extends View
  @content: (@user, @mutable) ->
    @propertyView 'firstName', TextView
  @propertyView: (property, klass, label) ->
    @subview property, new klass { model:@user, property, label, @mutable }

But then I'd have to include propertyView in each such model view class. And there you see why I tried to refactor it up a level.

from space-pen.

mythmon avatar mythmon commented on June 4, 2024

I've run into something like this my self. I think that the content function is called before the constructor. So when you try and access the @model property, it hasn't been defined yet. This seems very confusing to me, so I have filed #30 about that.

from space-pen.

lee-dohm avatar lee-dohm commented on June 4, 2024

As stated in the README, this package is no longer maintained and is deprecated. We recommend that people use the etch package instead. Because of this, we are archiving this repository and closing all issues and pull requests. Thanks very much for your support and contributions!

from space-pen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.