Monthly Archives: April 2010

Telnet Client Script for RunRev

Open a socket to the device, send a command and read from the same socket with a message, probably using lf, cr or crlf as line ending. Never close the socket, unless you want to log out.

Below follows a very simple example, which may work only in theory but which shows the basics of a telnet client.

// button script
on mouseUp
 put “” into myDevSock
 set the cSock of fld “Command” to myDevSock
 open socket myDevSock
 write “hello” to socket myDevSock // whatever command is appropriate
 read from socket myDevSock until cr with msg “gotReply”
end mouseUp

// card script
on preOpenCard
  set the cSock of fld “Command” to empty
end preOpenCard

// card script
on gotReply theSock,theMsg
 put theMsg into fld “Terminal”
 select text of fld “Command”
end gotReply

// card script
on closeStackRequest
  put the cSock of fld “Command” into myDevSock
  answer “Do you want to close the connection?” with “Yes” or “No”
  if it is “Yes” and myDevSock is not empty then
    close socket myDevSock
    pass closeStackRequest
  end if
end closeStackRequest

// field “Command”
on returnInField
 put the cSock of me into myDevSock
 write the text of me to socket myDevSock
 read from socket myDevSock until cr with msg “gotReply”
end returnInField

I haven’t tested this, but it should work.  You need a stack with a field “Terminal”, a field “Command” and a button. Put the scripts into their respective places and change the IP and port numbers. If necessary, change cr into crlf for example. You might need to escape some characters before sending them to the telnet server; check the documentation of the server.


Soon to be released: CC File Converter

We’ll soon be releasing CC File Converter. This is a utility to convert image files from a format with a particular colour profile into another format with a different colour profile.


CC File Converter is a utility to change the colour profile or colour encoding of an image file. Some graphics editors call this the colour mode. For example, convert an image file in PNG format in RGB mode to TIFF format in CMYK mode. Because CC File Converter uses ICC profiles, which are also used by e.g. ColorSync™, you can even convert an image file to custom modes, such as one that matches the colour profile of your computer screen or printer.

The Story about RunRev and the Apple iPhone SDK

Apple’s new iPhone 4 license terms, particularly section 3.3.1, have caused many software development communities to shake on their foundations and make many small and medium business owners worry about their invesments.

“3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).”

Read more about it at . As a result, many investments in iPhone development platforms and many man hours as well as finished products are now foregone. In response, Greg Slepa wrote on his blog (excerpt from

“[…] I no longer think Apple can continue to honestly claim that they have the best phone around. Steve Jobs and Apple’s legal department have taken a figurative dump on their hard work with these insane restrictions, and that creates an foul odor that stains the product as a whole. […] The new rules, interpreted as written, ban all kinds of applications written by great folks who have put in countless hours of work developing for this platform.”

Greg wrote a message (read it at to Steve Jobs, who is said to have responded:

“We think John Gruber’s post is very insightful and not negative: http:// 2010/04/why_apple_changed_section_331


(In case you want to copy Steve’s link you can also use

This has caused quite a stirr in the RunRev community. RunRev is currently working on a version of their development environment for the iPhone, but this new condition in the iPhone license has made it very unclear whether RunRev for iPhone will ever be able to be used to release products to the iTunes store. Naturally, RunRev programmers are eager to know whether they will be able to use RunRev for iPhone (particularly those who have already paid for their license).

A RunRev user writes at the RunRev forums (firstly posted publicly at

“I received the following email from runrev this morning. I take it to mean that this announcement caught runrev by surprise, too, and that they will be seeking clarification from Apple ASAP. It would be a significant blow to the company if Apple included runrev in their ban.”

Surely, he’s right. The RunRev support department replied, quoting a message from the CEO. Above quoted user has included the reply:

“Thank you for your comments and questions with regard to the new licensing  provisions in Apple’s iPhone agreement. We value all our customers greatly and we know how important it is to you all that revMobile is launched as an outstanding platform to deliver iPhone apps in full compliance with Apple policies. We know many of you have already invested considerable energy in getting your applications ready for the iPhone and iPad.

As part of Apple’s announcement yesterday, Apple have posted updated iPhone Terms of Service. The specifics of these changes are under NDA so we cannot discuss them at this point. We have an excellent relationship with Apple and we will be working with them to address any specific issues that may need clarification in relation to their proposed changes.

Rest assured that we will be doing everything possible to ensure a speedy and positive resolution that allows you to deliver outstanding apps on the revMobile platform in full compliance with Apple policies.

I will be posting further information as I get it over the coming days.

Please feel free to get in touch with us if you have any questions or would like to discuss this further. Thanks to everyone who has offered their support.

Kind regards,


Apparently, RunRev is still looking for options to create a development environment which will eventually create applications that are approved by Apple. It seems that this will be a tough job, given the fact that Adobe has given up their attempts to do the same. Quoting from Mike Chambers’ post at leaves no doubt:

“We will still be shipping the ability to target the iPhone and iPad in Flash CS5. However, we are not currently planning any additional investments in that feature.”

We also know that (almost?) the third-party JavaScript-based framework PhoneGap is said to be eligible for the iTunes store. This appears from an announcement on the PhoneGap website at

“Through email discussions with Apple, I specifically asked what, if any, impact did this have on present/future applications submitted to the App store that were built using PhoneGap. In no uncertain terms, my contacts at Apple have assured me that ‘PhoneGap is not in violation of the 3.3.1 clause of the license agreement.'”

Unfortunately, I haven’t been able to find any clear statements with regard to other frameworks, such as Appcelerator, Nimblekit and Titanium. As you can read at It seems that Unity3D is in pretty much the same situation as RunRev.

The verdict? The situation is currently highly uncertain. Unless RunRev invents a way to convert stacks to a native ObjectiveC or Javascript application, which compiles natively in XCode without the need for any RunRev-specific libraries and APIs, there is no reason the believe that RunRev applications will be approved by Apple anytime soon. Moreoever, Apple is free to change the licenses again however and whenever they want. If you want to develop for iPhone while avoiding the risk of having to re-create your work anytime soon, you probably will want to do this with a tool provided by apple.

(I believe I should make explicit that no rights can be obtained from the text above in any way).

Because of the problems described above, Economy-x-Talk won’t be realeasing any commercial applications for iPhone that have been created with RunRev. We are, however, still using other tools to develop software for iPhone. If you are interested in having us doing a project for you, feel free to send an e-mail or contact us directly through Skype. You can find our contact information at

A Telnet Server in RunRev

This is a very primitive yet complete example of a telnet server written in RunRev. You can access it from the unix terminal with the command

telnet localhost 2222

It might work from the Windows command line as well, although you may have to replace “cr” with “numToChar(13) in the script below –just give it a try. After connecting, type something in the terminal and see what happens. Type “close” to close the connection.

In RunRev, all you need is to create a button with the script below. Set the label of the button to “Start” or click the button twice when you run the server for the very first time.

on mouseUp
     if the label of me is not “Start” then
          set the label of me to “Start”
          accept connections on port 2222 with message “welcome”
          put the result into rslt
          if rslt is not empty then
               answer error rslt
               set the label of me to “Stop”
          end if
     end if
end mouseUp

on welcome theSock,thePort
     write “Welcome. You are connected.” & cr & “rev> ” to socket theSock
     read from socket theSock until cr with message “telnet”
end welcome

on telnet theSock,theMsg
     // uncomment next line if you want to see the message in a field
     // put theMsg into fld 1
     if theMsg begins with “close” then
          write “byebye” & cr to socket theSock
          close socket theSock
          if theMsg begins with “beep” then beep
          write “You wrote:” && theMsg & “rev> ” to socket theSock
          read from socket theSock until cr with message “telnet”
     end if
end telnet

on closeAllSockets
     put the openSockets into mySocks
     repeat for each line mySock in mySocks
          close socket mySock
     end repeat
end closeAllSockets