+1
Отвечен

Twitter character counting algorithm in a WIRE app

sstava 11 лет назад обновлен icahill (Administrator) 11 лет назад 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.


<wire>

<datasources>

</datasources>

<main>

<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">
</textfield>

<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">
</text>

</main>

<actions>

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

</actions>

</wire>

Сервис поддержки клиентов работает на платформе UserEcho