Twitter character counting algorithm in a WIRE app

sstava 7 years ago updated by icahill (Administrator) 7 years ago 1
I am interested in building a screen that allows me to submit a tweet to twitter. The ability to submit a tweet to twitter, on the surface, is easy and well documented in the tutorials :)

The real issue I am trying to resolve is implementing the twitter character counting algorithm into WIRE or javascript attached to WIRE.

Any thoughts on how this can be done as the characters are typed into a text field?

Thanks for your thoughts!
We have made this easier in the upcoming version of fusebox (we will submit it next week.)

Here is an example of how it will work. The new elements on "onchange" and a "count" object property.





<textfield name="entryfield" placeholder="counter" onchange="woot" alias="ENTRY" width="60%" height="20%" background="#ffffff" font="helvetica" size="35" rightinset="15" alignment="left"
align="center" valign="top">

<text name="chars" onchange="woot" alias="CHARS" width="10%" height="10%" background="#ffffff" font="helvetica" size="35" rightinset="15" alignment="right" clip="yes" text="0" bottomof="ENTRY">



<anim name="woot">
<assign property="object:CHARS.text" value="[object:ENTRY.count]"/>