Giter Club home page Giter Club logo

bind's People

Contributors

adrian-gierakowski avatar benvium avatar ducker avatar markohlebar avatar zeveisenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bind's Issues

BINDINGS and subclassing

BINDINGS don't work well with subclasses. Need to inspect how to add the bindings from a superclass in the subclass.

Log all bindings

  • create a log all bindings class method for debugging purposes
  • better log messages

Two way binding of View-Model with a UITextField.

Could you please point out how a two way binding can be done with a ViewModel and UITextField. From the example given it is quite easy to figure out the left to right assignments, but how can the right to left assignment be done.

I tried something like this, but this didn't make any change in the view model.
BINDViewModel(point,<>, pointField.text)

Thanks.

Deprecate -> in favor of ~>

-> is reserved syntax, and triggers code completion when writing bindings like
BIND(self, leftKeypath, ->
which is quite annoying.

2.0 Roadmap

  • protocols and categories instead of concrete BNDView / BNDViewController subclasses for MVVM
  • dropping XIB support because of the first point
  • dropping data controllers
  • adding abstractions BNDTableViewController and BNDCollectionViewController to support rapid development
  • splitting BNDBinding and MVVM related implementation into separate projects

NSNegateBooleanTransformerName

BINDT(self.viewModel, booleanProperty , ~>, self, other.booleanProperty, NSNegateBooleanTransformerName)

causes:
-[__NSCFConstantString transformedValue:]: unrecognized selector sent to instance 0x7fd34b395700

Binding a view model to a Core Data managed model object

Great job on this library. I've only used it for a week but I could see it being a library I can reuse over and over on different projects.

I've got a question regarding model to view model bindings where the model is a Core Data managed object. The issue I'm seeing happens when the managed objects gets faulted, causing the binding to output a null value. I don't want the view model to change a property to null when its model object gets faulted.

This isn't a defect in the library but I'm wondering if you have an answer for how to correctly handle object faulting with view to view model binding.

Remove features that are not commonly used

It seems that the usage really boils down to BINDViewModel and BIND.
In terms of simplifying the interface we should trim unnecessary features like
shorthands BINDSL, BINDSR, BINDOS and BINDS which clutter the DSL and
autocompletion.

UITextField value while typing (UIControlEventEditingChanged)

Is there a way to get the bindings to work on a UITextField while the user types?
With a simple example I've been unable to get the binding to fire when typing into the UITextField. It works find if I actually set the .text value manually.

UILabel *title = [UILabel new];
title.text = @"empty title";

UITextField field = [[UITextField alloc] init];
field.text = @"empty field";
//..
BIND(item, value, <>, field, text);

[BINDO(field, text) observe:^(id observable, id value) {
            NSLog(@"value=%@", value); // any way to have this called as I type?
}];

//.. 
field.text = @"this works though";

Previously to experimenting with BIND I'd use addTarget:forControlEvents:UIControlEventEditingChanged to trigger a selector as the user types.

A more 'BINDy' way to do this would be great. Any ideas?

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.