Comments (4)
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.
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.
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.
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)
- Bower package HOT 8
- Why the dependency on jquery-extensions HOT 5
- Current dependencies HOT 5
- How to <br> ? HOT 2
- @subview in top level of given view HOT 3
- Listener added via View.preempt() cannot be removed. HOT 7
- Simplify removing a listener HOT 1
- Subview appears above table HOT 5
- How apply event click to content add by append? HOT 3
- Getting Started HOT 4
- atom-text-editor in @tag HOT 1
- Can't have an outlet on the top level HOT 1
- Does not play well when multiple versions of spacepen HOT 1
- how to interact with external linked js and execute inline javascript on page HOT 3
- Github pages is out of date HOT 1
- Improper jQuery code HOT 3
- npm install/start failed on windows HOT 2
- attached isn't called HOT 2
- Built-in tags with @tag HOT 1
- "No longer maintained" - more description in Readme? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from space-pen.