Reply
Thread Tools
RevdKathy's Avatar
Posts: 2,173 | Thanked: 2,678 times | Joined on Oct 2009 @ Cornwall, UK
#11
Ahhh gotcha.
__________________
Hi! I'm Kathy and I'm a Maemo Greeter! Welcome.
Useful links for newcomers: New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 101, Frequently Asked Questions (FAQ)
Did you know Meego.com has forums too?
 
Posts: 287 | Thanked: 165 times | Joined on Oct 2009 @ The Netherlands
#12
Originally Posted by Texrat View Post
The idea is a utility that will break big posts into serialized twitter messages.
Wouldn't that defeat the 'purpose' of twitter?
 
Texrat's Avatar
Posts: 11,700 | Thanked: 10,045 times | Joined on Jun 2006 @ North Texas, USA
#13
Originally Posted by robbie View Post
Wouldn't that defeat the 'purpose' of twitter?
People are doing it anyway, manually. And I'm not talking about novels.
__________________
Nokia Developer Champion
Different <> Wrong | Listen - Judgment = Progress | People + Trust = Success
My personal site: http://texrat.net
 
Texrat's Avatar
Posts: 11,700 | Thanked: 10,045 times | Joined on Jun 2006 @ North Texas, USA
#14
Heh... just got the VB.Net version of this code working. Bracing for backlash...
__________________
Nokia Developer Champion
Different <> Wrong | Listen - Judgment = Progress | People + Trust = Success
My personal site: http://texrat.net
 
Texrat's Avatar
Posts: 11,700 | Thanked: 10,045 times | Joined on Jun 2006 @ North Texas, USA
#15
In case anyone is interested, here's the VB.Net version of the multi-tweet code:

Code:
        If Tweet_TextBox.Text.Length > 140 Then
            Do While tempTweet.Length >= 132
                chunkCut = 132
                While tempTweet.Substring(chunkCut, 1) <> " "
                    'test for punctuation too (?!,;)
                    chunkCut = chunkCut - 1
                End While
                tweetChunk(chunkCount) = tempTweet.Substring(0, chunkCut).Trim
                tempTweet = tempTweet.Remove(0, chunkCut)
                chunkCount = chunkCount + 1
            Loop
            tweetChunk(chunkCount) = tempTweet.Trim
            For tweets = 0 To chunkCount
                tweetUpdate = (tweets + 1).ToString & "/" & (chunkCount + 1).ToString & " " & tweetChunk(tweets)
                If tweets < chunkCount Then tweetUpdate = tweetUpdate & " +"
                tw.Update(tweetUpdate)
            Next
        Else
            tw.Update(Tweet_TextBox.Text)
        End If
        Tweet_TextBox.Clear()
Basically it looks to see if the tweet has more than 140 characters, and if so, breaks it down into serialized chunks. Because it can't predict the number of chunks accurately, I allow for prefixed serial part to be xx/yy so if it's x/y then the tweet "misses" 3 characters for total length (I add a space too). In addition, I add a space and + character at the end so that's 2 more. In other words, most tweets will be 135 characters or less.
__________________
Nokia Developer Champion
Different <> Wrong | Listen - Judgment = Progress | People + Trust = Success
My personal site: http://texrat.net
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:07.