The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Growl For Windows Interface

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Growl For Windows Interface Posted: Oct 2, 2009 12:08 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Growl For Windows Interface
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

I finally got back to looking at a Growl interface for Windows today; there was an existing Mac interface in the public store already. What I did was create a factory class called GrowlInterface; it will hand back the Mac interface on OS X, and the network interface otherwise. You can always just use GrowlNetworkInterface directly.

I had some connectivity issues where the socket calls were just hanging, and this was confusing - I was looking at Carlos Crosetti's Squeak code, and I was sending the same format he was. After a brief chat with one of our engineers and some digging, it hit me: the GNTP protocol uses CRLF as a separator within message transmissions. So.... I had a line end convention issue. To fix that up, I merely changed my low level interface to this:


sendMessage: message to: sysName
	"send the message to Growl"

	| socket stream |
	socket := (SocketAccessor newTCPclientToHost: sysName port: self port).
	stream := socket asExternalConnection readAppendStream.
	stream lineEndTransparent.
	stream nextPutAll: message.
	stream flush.
	socket shutdown: 1.
	stream close.

The thing I had to add was #lineEndTransparent. Once I did that, it all worked fine. I tried it out in both VW 7.7 and ObjectStudio 8.2 - so if you have an application that you would like to have communicate with Growl, have at it!

Technorati Tags: , ,

Read: Growl For Windows Interface

Topic: Smalltalk Daily 9/30/09: Customizing Key Bindings Previous Topic   Next Topic Topic: Primeval Back from the Dead

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use