kickingvegas / YmsCoreBluetooth

A block-based framework for building Bluetooth 4.0 Low Energy (aka Smart or LE) iOS and OS X applications using the CoreBluetooth API. Includes Deanna and DeannaMac, applications to communicate with a TI SensorTag for iOS and OS X respectively.
Other
524 stars 128 forks source link

Various changes to enable better observation of SensorTag values. #89

Closed tuscland closed 10 years ago

tuscland commented 10 years ago

I did these changes because I wanted to add the ability to send OSC messages without having to change the existing Deanna code.

kickingvegas commented 10 years ago

Thank you very much for the pull request. However, upon review I'm concerned that it will disrupt the YmsCoreBluetooth API too much that it will impact other projects using it. So, I respectfully decline the pull request.

That said, it may be worth revisiting how ymsPeripherals is mutated. I'm not clear on how you claim that it is not key value observable.

tuscland commented 10 years ago

Thank you Charles for reviewing the pull request!

I am willing to make it compatible with the current API. Another solution would be to define a virtual accessor whose key value changes happens "around" the temporally coherent properties. I don't know yet what would be a good name for such virtual properties yet, if you have a suggestion please let me know.

For the ymsPeripherals property observation, I guess I must have been confused. Is the property to observe just "peripherals" or "ymsPeripherals"? When I tried to observe "peripherals" I got an exception saying that it is not observable, and it seems that key value observation methods were not implemented for the "ymsPeripherals" property. What do you think?

tuscland commented 10 years ago

So, I have make change to avoid any breaking in the API, please let me know if you prefer this design.

The ymsPeripherals vs peripherals key value observation is still something we have to discuss. I can confirm that observing peripherals does not work. The changes I have made do not break the YMSCoreBluetooth API, only add the required KVO accessors for the ymsPeripherals property.

kickingvegas commented 10 years ago

Just a quick note; I've been swamped with outside tasks but will try to get to reviewing the code to allow for KVO of ymsPeripherals this week. Also, on what class are you looking for peripherals?

tuscland commented 10 years ago

Thank you very much.

On 11 nov. 2013, at 08:12, Charles Choi notifications@github.com wrote:

Just a quick note; I've been swamped with outside tasks but will try to get to reviewing the code to allow for KVO of ymsPeripherals this week.

— Reply to this email directly or view it on GitHub.