Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Methods usable as filters #934

Conversation

mvuksano
Copy link
Contributor

No description provided.

@@ -28,7 +29,7 @@ class DynamicFieldGetterFactory implements FieldGetterFactory {
instanceMirror.invoke(symbol, args, namedArgs).reflectee;
}

FieldGetter getter(Object object, String name) {
Function getter(Object object, String name) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mvuksano mvuksano added cla: yes and removed cla: no labels Apr 20, 2014
_isInNameList(String s) {
return _namesList.any((element) => element == s);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bool, =>
I prefer to have public then private properties and then public and private methods. Most of the time you are interested in the public api. Might not be that relevant here but I would like to propose this as a convention across the code base

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not relevant here, I'll revert changes to this file anyway.

expect(getterFactory.isMethod(user, 'isUnderAge')).toEqual(true);
});

it('should return false is field is a function', () {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhevery Should this actually return true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it shouldn't :)

@mvuksano mvuksano changed the title [WIP] Feature/methods usable as filters Methods usable as filters Apr 22, 2014
@mhevery
Copy link
Contributor

mhevery commented Apr 22, 2014

  1. I have not thought this through, but I think you should be able to revert most of the changes to change detection and just use _MODE_IDENTITY_ for your needs since it should already do what you want.

  2. The size increase is not right. This needs to be investigated.

"toString": (o) => o.toString
"toString": (o) => o.toString,
"isUnderAge": (o) => o.isUnderAge,
"isUnderAgeAsVariable": (o) => o.isUnderAgeAsVariable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

append a "," to avoid diff noise ?

mvuksano added a commit that referenced this pull request Apr 22, 2014
@mvuksano
Copy link
Contributor Author

@mhevery i think I can get way with METHOD_GETTER, but not really METHOD_IDENTITY.

mvuksano added a commit that referenced this pull request Apr 22, 2014
@mvuksano mvuksano closed this in 3bc5ec9 Apr 22, 2014
jbdeboer pushed a commit to jbdeboer/angular.dart that referenced this pull request May 5, 2014
jbdeboer pushed a commit to jbdeboer/angular.dart that referenced this pull request May 5, 2014
… show up as changes

Closes dart-archive#934

fix(DCCD): when watching variables, always fire on first digest
jbdeboer pushed a commit to jbdeboer/angular.dart that referenced this pull request May 5, 2014
… show up as changes

Closes dart-archive#934

fix(DCCD): when watching variables, always fire on first digest
@jbdeboer jbdeboer reopened this May 6, 2014
@jbdeboer jbdeboer assigned chirayuk and unassigned jbdeboer May 16, 2014
@jbdeboer
Copy link
Contributor

@chirayuk Your changes to method getters is in; could you review this PR and help @markovuksanovic get it in?

@mhevery
Copy link
Contributor

mhevery commented Aug 12, 2014

@vicb Can you incorporate this change to your WatchGroup refactoring.

@mhevery mhevery assigned vicb and unassigned chirayuk Aug 12, 2014
@mhevery mhevery added api: new and removed api: new labels Aug 12, 2014
@jbdeboer
Copy link
Contributor

@vicb, you are assigned to the PR -- are you reviewing?

@vicb
Copy link
Contributor

vicb commented Aug 25, 2014

I'll integrate this in the watch group refactoring

@mhevery
Copy link
Contributor

mhevery commented Aug 26, 2014

Closing, and letting @vicb take care of it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

5 participants