Nick
Nick
> Is there an example of where the `AppContext` being the actual application context instead of the activity is important? Would it make sense to have `ActivityContext` extend from `AppContext`?...
What if it’s a `Service` (see above)?
I think we should use something like this instead of the current contexts: ``` scala case class ContextWrapper(originalContext: Option[WeakReference[Context]], appContext: Context) { def get = originalContext.flatMap(_.get) getOrElse appContext } object...
@dant3 That’s a fair point. What about this? ``` scala class ContextWrapper(originalContextRef: Option[WeakReference[Context]], appContext: Context) { def original: Option[Context] = ... def app: Context = appContext def bestAvailable: Context =...
Now that I think of it, `originalContextRef` does not have to be an `Option`. We can always supply it, even if it’s the same as `appContext`. And it can be...
> But getOriginal returns a `Context` now, not `WeakReference[Context]`, not `Option[Context]`? Feels like NPE point, given that you store a `WeakReference[Context]`. Right, but that’s the same for `Option#get`, `Try#get`, etc....
Hey @sgrif, I believe my recent commit addressed your points 1 through 3, so we have one left: - [x] Things require `ActivityContext` when they don’t appear to need it....
The ground for this has been prepared with https://github.com/stanch/macroid/commit/228c30592e05a8168c9bb6d3ba5328f65f78fb00#L1R34
The suggested syntax for widgets is `myButton.sourceOf.clicks`, where `sourceOf` or `srcOf` returns a `Dynamic` object and `clicks` triggers a search for `setOnClickListener`. Gotta be careful with `dismisses` though!
Maintaining the same `EventStream` handler for a given widget proved to be non-trivial. Besides, the implementation will depend on a particular frp library. Therefore closing it here in hope for...