Closed Mortaro closed 8 years ago
Hi @Mortaro here's what's really going on:
This feature is called "Promise method forwarding". In your case, it does not work because ==
is already implemented on the Promise
class. Conversly, it DOES work on the first example because Promise
does not implement a method _title
.
See this blog / video for more info. Look at the subheading Forwarding 'gotchas'
.
@RickCarlino Thanks for the quick reply!
wow that blog and this framework are awesome, makes me like coding again :)
still on the promises subject, i noticed that opal only allows to call "then" on a promise once without triggering an error. Googling around i saw a post saying that i should call "then" over the previous callback, but that sounds a bit limiting, does volt provide a undocumented alternative for that, or should i change my mindset about promises?
Thanks again
@Mortaro were working on changing opals promise library or maybe replacing it so you can call them multiple times.
@ryanstout thanks for the info!
not sure if its the expected behavior but when i compare a column with a string it fails since its actually a promise.
this is returning false
while this is returning true
if i'm not doing something wrong, patching this would be really handy for my views!