. .

fnvdiary

That Podcast 13: All Good Things Come to an End

December 8, 2010 0:18:36.757

That Podcast: FNV Diary

Welcome to episode 12 of "That Podcast: An FNV Diary" - a podcast where Michael Lucas-Smith and I document our trials and tribulations in Fallout: New Vegas.

On today's podcast, Michael, James and Maki talk about the final battle when you side with Caesar, and take a look ahead at what they hope to see in terms of mods and dlc. Michael and Maki also express their displeasure at the XBox exclusive first DLC coming later this month, while James lords it over them :) This may be the last of these podcasts for a bit - we think we've covered the game. We will be back when DLC and cool mods appear though, so stay subscribed.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. You can get to the podcast directly in iTunes via this link. You can also go to the iTunes store and leave a comment, or join the Facebook Group and discuss the podcast.

If you want to download the podcast directly, I've provided it in three formats:

Got feedback? Send it to James. We'd really appreciate it if you head on over to iTunes and leave a comment - enjoy the podcast, and we'll see you in the wastelands!

Technorati Tags: , ,

Enclosures:
[fnvdiary13.mp3 ( Size: 12,788,333 )]

 Share Tweet This

fnvdiaryAAC

That Podcast 13: All Good Things Come to an End (AAC)

December 8, 2010 0:18:41.167

That Podcast: FNV Diary

Welcome to episode 12 of "That Podcast: An FNV Diary" - a podcast where Michael Lucas-Smith and I document our trials and tribulations in Fallout: New Vegas.

On today's podcast, Michael, James and Maki talk about the final battle when you side with Caesar, and take a look ahead at what they hope to see in terms of mods and dlc. Michael and Maki also express their displeasure at the XBox exclusive first DLC coming later this month, while James lords it over them :) This may be the last of these podcasts for a bit - we think we've covered the game. We will be back when DLC and cool mods appear though, so stay subscribed.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. You can get to the podcast directly in iTunes via this link. You can also go to the iTunes store and leave a comment, or join the Facebook Group and discuss the podcast.

If you want to download the podcast directly, I've provided it in three formats:

Got feedback? Send it to James. We'd really appreciate it if you head on over to iTunes and leave a comment - enjoy the podcast, and we'll see you in the wastelands!

Technorati Tags: , ,

Enclosures:
[fnvdiary13.m4a ( Size: 17,543,904 )]

 Share Tweet This

js4u

JS 4 U 14: Looping in Javascript

December 8, 2010 7:39:40.466

Javascript 4 U

Today's Javascript 4 You. Today we look at looping in Javascript. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

Looping

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[js4u14-iPhone.m4v ( Size: 5210638 )]

 Share Tweet This

smalltalk

Silverlight Smalltalk

December 8, 2010 9:34:56.000

Vista Smalltalk has been dusted off, polished, and updated - and it's back in development as Silverlight Smalltalk:

Think of each Silverlight-enabled browser as a 2010 version of the Xerox Alto and imagine the Internet (with Comet-style instant messaging) as a scaled-up version of PARC’s Ethernet network.

Technorati Tags: ,

 Share Tweet This

BottomFeeder

BottomFeeder News

December 8, 2010 21:14:45.180

BottomFeeder

Since I'm no longer at Cincom, the location I've been using to host BottomFeeder is no longer accessible to me. So... I'll be relocating the files to this server. That will have to wait until the weekend (or possibly the Christmas break) - the bandwidth I have in the hotel here in Dallas is just barely usable, and I have nice, reliably fast connectivity at home.

The bad news is, I can't do anything about the update requests for existing downloads (unless I can get someone at Cincom to redirect those Http requests - I'll look into that).

In any event, look for an announcement on that within the next couple of weeks.

Technorati Tags: , ,

 Share Tweet This

st4u

Smalltalk 4 U 23: Cascaded Messages

December 9, 2010 6:48:45.365

Today's Smalltalk 4 You continues with "ProfStef", which is part of the "one click" Pharo download. Today we we take a look at cascaded message sends - i.e., how the semi-colon works in Smalltalk syntax. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Cascaded Messages

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , , , ,

Enclosures:
[st4u23-iPhone.m4v ( Size: 3087079 )]

 Share Tweet This

js4u

JS 4 U 15: Breaking a Loop

December 10, 2010 1:56:52.414

Javascript 4 U

Today's Javascript 4 You. Today we look at how to break out of loops prematurely in Javascript. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

Prompters

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[js4u15-iPhone.m4v ( Size: 3087610 )]

 Share Tweet This

BottomFeeder

BottomFeeder Releasing

December 10, 2010 11:45:54.000

As you've probably noticed, I haven't managed a release of BottomFeeder for awhile. At first, it was because I was going to ship out a 7.7 based release, then 7.7.1 came out, and then I got laid off from Cincom - so through a long chain of events, it just never happened. So...

Today I was showing my build script for Bf to some folks here at my new job - they have been using RTP manually, and I thought that a script might make things easier. In doing that, I polished my script up a bit (catching some parcel dialogs I had been ignoring), and then I was just poking around the new runtime. One of the other things that had held up a release was what I thought was a new bug, but it turns out it was simply a mistake I made when porting up to 7.7.1.

If you look in class FontPolicy, there's a method: bestFont:allowance: - it will take a font request and hand you back the best match. At the very bottom of that method is this:


	best == nil ifFalse: [^best].
	^noFontBlock 
		ifNil: [self class noMatchingFontSignal raiseRequestWith: requestedFont]
		ifNotNil: [noFontBlock value: requestedFont]

At some point, I removed my override fix for that - doh. So, when I get back to my home office I'll get that dealt with, do a new build, and then look at the whole rehosting problem I mentioned yesterday. The good news is, I think I'm ready to roll it out :)

Technorati Tags: , ,

 Share Tweet This

books

The End of the Ottomans

December 10, 2010 15:51:26.000

I just finished A Brief History of the Late Ottoman Empire - which is, as the title asserts, a survey of the last century and a half of Ottoman rule. The Ottomans fascinate me because of how long the empire survived - it was founded at the end of the 13th century, and survived into the 20th - which is a huge span of time. In that period they wiped out the last vestiges of the Romans (Byzantium), and then collapsed themselves in the wreckage of WWI.

The book covers the long period of decline, and - more importantly - how the Ottomans tried to deal with that decline. It's a sympathetic read - if you're looking for information on the Armenian Genocide, for instance, this isn't the place to look. If, on the other hand, you're interested in how they adapted to the steady rise of Europe and the industrial age, this is exactly what you want. I learned a lot about the "Young Turks", and how they were much more continuous with previous Ottoman politics than I had thought.

Why does any of that matter? Well, pull out a map of the near east, and look at all of the troubles the world has there. Never mind current politics - just realize that the map of that region was drawn by the victors of WWI, and then modified by the various successor regimes across the region as they consolidated their rule. Some of that consolidation is incomplete to this day (at least in the minds of the regimes dwelling there).

That's why the end of the Ottomans interests me so much. The empire spanned the time from the late medieval era into the 20th century, and the fallout from its collapse is still with us - just one more reminder that the past is still with us, whether we understand that or not.

 Share Tweet This

smalltalk

Squeak Connectors are Back

December 10, 2010 16:44:29.654

Spotted in Planet Squeak

Chris Muller has recently updated Connectors to work with Squeak 4.2 images. Connectors gives you the ability to turn Morphic into a drawing environment for making connected diagrams. This tool was developed by Ned Konz many years ago and hasn’t been able to load in an up-to-date image for some time.

The open source Smalltalks have a ton of activity around them - which makes me wonder why some of the commercial vendors keep making it harder to find their products. Free is very compelling, espcially with things like Seaside and Eliot's JIT.

Technorati Tags: ,

 Share Tweet This

smalltalk

A GLASS Shell

December 10, 2010 19:50:09.000

A shell for GLASS - and a video to see how it works. Cool stuff.

Technorati Tags: ,

 Share Tweet This

esug2010

JIT Research at ESUG 2010

December 10, 2010 22:15:12.807

Here's another video from ESUG 2010, which was held in Barcelona, Spain, the week of September 13, 2010. In this presentation, G. Richarte talks about his VM work, concentrating on JIT research. You can watch using the embedded player below, or follow this link to Vimeo.

A JIT Built in Smalltalk from James Robertson on Vimeo.

Technorati Tags: , , , ,

 Share Tweet This

fnvdiary

That Podcast 14: As Luck Would Have It

December 11, 2010 9:06:37.960

That Podcast: FNV Diary

Welcome to episode 14 of "That Podcast: An FNV Diary" - a podcast where Michael Lucas-Smith and I document our trials and tribulations in Fallout: New Vegas.

On today's podcast, Michael and James talk about luck, and a pacifist approach to playong the game. Michael just did a playthrough without killing anything - and it turns out that such a playthrough is a lot more practical than it sounds. He also did that playthrough with a luck of ten (casino ejection time!), while on hardcore mode.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. You can get to the podcast directly in iTunes via this link. You can also go to the iTunes store and leave a comment, or join the Facebook Group and discuss the podcast.

If you want to download the podcast directly, I've provided it in three formats:

Got feedback? Send it to James. We'd really appreciate it if you head on over to iTunes and leave a comment - enjoy the podcast, and we'll see you in the wastelands!

Technorati Tags: , , , ,

Enclosures:
[fnvdiary14.mp3 ( Size: 8135060 )]

 Share Tweet This

fnvdiaryAAC

That Podcast 14: As Luck Would Have It (AAC)

December 11, 2010 9:06:50.140

That Podcast: FNV Diary

Welcome to episode 14 of "That Podcast: An FNV Diary" - a podcast where Michael Lucas-Smith and I document our trials and tribulations in Fallout: New Vegas.

On today's podcast, Michael and James talk about luck, and a pacifist approach to playong the game. Michael just did a playthrough without killing anything - and it turns out that such a playthrough is a lot more practical than it sounds. He also did that playthrough with a luck of ten (casino ejection time!), while on hardcore mode.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. You can get to the podcast directly in iTunes via this link. You can also go to the iTunes store and leave a comment, or join the Facebook Group and discuss the podcast.

If you want to download the podcast directly, I've provided it in three formats:

Got feedback? Send it to James. We'd really appreciate it if you head on over to iTunes and leave a comment - enjoy the podcast, and we'll see you in the wastelands!

Technorati Tags: , , , ,

Enclosures:
[fnvdiary14.m4a ( Size: 11189370 )]

 Share Tweet This

itNews

ChromeOS and Tiered Data

December 11, 2010 10:46:49.297

While I have a fair amount of sympathy for the "don't trust the users or the apps" approach to computing that Google is taking with ChromeOS, there's one rather huge flaw in the approach - tiered data plans:

The matte black Cr-48 won't be sold to the public, but thousands are being sent to consumers and businesses who have volunteered to test it. It introduces a new kind of operating system, called Chrome OS, that turns to the Web for almost everything.

Once you leave the comfort of your own WiFi zone, you're confronted with two things:

  • Generally slow public WiFi options - some free, some not
  • 3G, which is not only not free, but tends to get really expensive if you blow the cap on your data plan

Take the plan that's available for my iPad, for instance - for $30/month (if I turn it on), I get 3G, but only 2 GB. That's not a lot of data, especially if you try to stream a couple of movies or tv shows in your hotel room.

IMHO, Google's ChromeOS isn't a bad idea, but it's going to run smack into the carrier data models, which are not at all in line with the way people want to use such devices....

Technorati Tags: , ,

 Share Tweet This

BottomFeeder

BottomFeeder 4.7

December 11, 2010 13:56:34.331

BottomFeeder

I've just pushed out a new release of BottomFeeder, now hosted here on this server. There's not a ton of changes since the last release; it's mostly a few cleanups, changes to the urls for doc, and the addition of a menu item that gets you to the license for the app.

Questions? Drop me an email

Technorati Tags: , ,

 Share Tweet This

stupidity

Dumbest Idea Ever

December 11, 2010 19:32:27.157

Yes, doing a stunt like this for charity is interesting, but seriously - taking a trans-pacific flight with no bags?

One thing I really, really like about the No Baggage Challenge Life is simple. I have two shirts, two pairs of pants, one pair of shoes, socks, and underwear. I’m going out at night? A shirt and pair of pants. I’m going to a meeting? A shirt and a pair of pants.

If your goals are to:

  • Get no exercise during your trip
  • Either smell bad, or do laundry every single night

then this might work out for you. Otherwise? Not so much. I travel light - one bag for clothes, one for the electronics. Unless I'm bringing golf clubs, I don't check anything, and trust me - it's way, way simpler than the method this guy is using.

Technorati Tags:

 Share Tweet This

podcast

Independent Misinterpretations 9: Coding WIth Wolves

December 12, 2010 11:20:07.404

Welcome to episode 9 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson, Michael Lucas-Smith, and David Buck. This week Michael and I spoke about the "Wolfpack Programming" sessions he was part of in Europe, at a couple of different events.

During the podcast, we mentioned a podcast we did with Kent Back awhile ago - you can listen to that podcast in the Industry Misinterpretations archives.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Technorati Tags: , ,

Enclosures:
[im9.mp3 ( Size: 14038227 )]

 Share Tweet This

podcastAAC

Independent Misinterpretations 9: Coding WIth Wolves (AAC)

December 12, 2010 11:20:22.874

Welcome to episode 9 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson, Michael Lucas-Smith, and David Buck. This week Michael and I spoke about the "Wolfpack Programming" sessions he was part of in Europe, at a couple of different events.

During the podcast, we mentioned a podcast we did with Kent Back awhile ago - you can listen to that podcast in the Industry Misinterpretations archives.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Technorati Tags: , ,

Enclosures:
[im9.m4a ( Size: 19587055 )]

 Share Tweet This

travel

The Joys of Travel

December 12, 2010 14:52:48.809

I just went to flightstats.com to check out the state if my flight. It's supposedly on time, but here's what the site says about the airport (DCA):

Yay?

 Share Tweet This

travel

The Joys of Travel, Continued

December 12, 2010 19:17:19.798

Well, there are delays here at dca. I'm supposed to depart at 9:37 now, and get into dfw after midnight. Since I'm trying to save money, it also means a late dinner - I got an upgrade, so I may as well wait for the free meal up in 1st.

So... Looks like a late night and something of a tiring day at work tomorrow. Maybe I'll get the work laptop :)

 Share Tweet This

travel

From the Air

December 12, 2010 22:12:17.071

It's been one of those travel days. I arrived at DCA in good shape - taking the metro down instead of driving the full way was pleasant enough - but that's when the fun ended. I was immediately confronted with a 3 hour delay, and we came very close to the DCA curfew for the size plane I'm on - had things gone just a bit more wrong, I would have been headed home, and then back to DCA for a very early flight.

Ironically, I have better connectivity here than I do at my hotel :)

 Share Tweet This

st4u

ST 4 U 24: Blocks

December 13, 2010 8:15:31.085

Today's Smalltalk 4 You continues with "ProfStef", which is part of the "one click" Pharo download. Today we we take a look at how blocks work - this is part 1 of 2 on that. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Blocks

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , , ,

Enclosures:
[st4u24-iPhone.m4v ( Size: 3295991 )]

 Share Tweet This

general

Watch and Wait

December 13, 2010 21:42:52.348

I'm back in Dallas, and I'm still waiting for network access and the work laptop to arrive. That's the bad news; the good news is, I do have an image with the entire system on it, and I'm having a look at the overrides and extensions (we are currently on VW 7.6), looking for potential issues in an upgrade to VW 7.7.1.

I was a bit worried about the Dataset mods they've made, but having looked at them a bit more, I'm less worried. What I really need to do is get network access so that I can build a 7.7.1 image and start really looking at things with the Comparison tool - but that's on hold. With luck, things will fall into place before the end of the week :)

 Share Tweet This

copyright

Build it Elsewhere, Then License It

December 13, 2010 23:43:27.860

The absurdity of copyright law knows no bounds. After the Supreme Court hung 4-4, with one justice recused, the lower court ruling held:

Omega, of Switzerland, sued Costco for copyright infringement, because Costco was obtaining the watches from unauthorized European dealers that sold them far cheaper than U.S.-based Omega distributors. Omega copyrighted the watch design in the United States by imprinting the company’s emblem on the underside of the timepiece.

So with that, the clear incentive is to produce your goods outside the US, apply copyright via the method used in this case, and then sue all used goods stores out of existence.

You know how software is licensed? If this idea lasts, hardware will go the same way.

Technorati Tags: ,

 Share Tweet This

js4u

JS 4 U 16: Iteration

December 14, 2010 8:24:55.864

Javascript 4 U

Today's Javascript 4 You. Today we look at one of the more useful looping consyructs in Javascript - it's a lot like the iterators in Smalltalk. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

Prompters

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[js4u16-iPhone.m4v ( Size: 1950301 )]

 Share Tweet This

smalltalk

Play an MP3 in Smalltalk

December 14, 2010 9:56:52.000

Sean Denegris has ported some code out of Sophie and into Squeak:


song := StreamingMP3Sound onFileNamed: '/path/to/yourFavorite.mp3'.
song play.
"song pause."

There are some caveats about the level of testing and such, but that's pretty cool.

Technorati Tags:

 Share Tweet This

smalltalk

Upgrading: Find All the Overridden Class Definitions

December 14, 2010 13:15:37.000

I've upgraded BottomFeeder from one rev of VW to another multiple times now, so I have a pretty good feel for looking at overrides - but on this new job, I wanted something bit more formal than "eyeball the bundle and look for red, bolded classes". So, I wrote a small reporter that starts out with this, in the older version of VW:


| overriddenClasses records |
	overriddenClasses := SmalltalkWorkbench sortedClasses select: [:each | Override isOverriddenClassOrNameSpace: each].

That collects all of the classes in the current image where the class definition is an override. Usually, that means that a developer has added one or more instance variables to the class for an application (or tool) specific reason - although in this app, there are two such overrides where the class definition hasn't changed. That likely means someone bailed on a modification at some point, but neglected to remove the override.

Anyway - with that information in hand, I just bossed out some basic data - the full name of the class (i.e., full namespace qualification) and the array of instance variable names. Then I loaded that information into a 7.7.1 image, got the class from the string name, and grabbed the array of instance variables for each of those. With the two sets of data sitting in an object, it's easy to do some basic comparisons. Useful, and not at all difficult.

Technorati Tags: ,

 Share Tweet This

smalltalk

The Joys of Selection Trackers

December 14, 2010 20:16:19.375

One of the small annoyances in VisualWorks is the way selection works with listboxes when you set them for:

  • Select on (mouse button) down (the normal way to do it)
  • Set up the listbox for multiple selections
  • Want the user to be able to select mutiple items, come back, and then drag the previously selected group

That last thing is what doesn't work out of the box - instead, when you first click the left button, the selected group is de-selected, and the one thing you were pointing at when you wanted to do a drag operation becomes the new selection.

As you might guess, given the way most end user tools now work, end users are not entirely pleased with this turn of events. So... It was off to controller land. A few minutes of investigation told me that multi-selection listboxes use the class EmulatedSequenceController, and I started trawling through the code.

Now, other than patching some of the more egregious flaws in the way Datasets work, I haven't done a lot of hacking on controllers. So it took me a bit of rathole diving before I realized that the problem was in EmulatedSequenceTracker, which works in conjunction with the controller. If you look at the #redButtonPressedEvent: method there (with a flashback to Xerox mice tossed in), you find that you end up calling down to #setUpDragDropFor:


setUpDragDropFor: aMouseButtonEvent 
	"If we are doing drag and drop, we don't have to do the preparation 
	work"

	self outside: false.
	(controller selectOnDownWithDrag and: [self view selectionIndex ~= self view targetIndex])
		ifTrue: 
			[self controller toggleTargetWithEvent: aMouseButtonEvent.
			selectionDone := true]

The problem resides in the first statement in the block - the controller is told to toggle the selection, and it dutifully does so. It's only later in the call chain that drag/drop is checked for, by which time the selection has been reset. So... I hacked up three methods in EmulatedSequenceController to make that happen on red button up instead of on red button down - note the extra checks for whether we want to drag or not; without that, you get some truly weird behavior:


setUpDragDropFor: aMouseButtonEvent 
	"If we are doing drag and drop, we don't have to do the preparation 
	work"

	"JR 12/13/10: For multi-select, don't toggle target on red down.  Instead, that should happen on red up"
	self outside: false.
	(controller selectOnDownWithDrag and: [self view selectionIndex ~= self view targetIndex])
		ifTrue: 
			["self controller toggleTargetWithEvent: aMouseButtonEvent."
			selectionDone := true]



redButtonReleasedEvent: aMouseButtonEvent
	self sensor ungrabMouseEventFor: self.
	self finishSelectionForEvent: aMouseButtonEvent.

	"JR 12/13/10 - moved out of the #redButtonPressedEvent: method.  
	For multi-select lists, if drag/drop is on, we want selections toggled on mouse up"

	self wantsToDrag
		ifTrue: [self controller toggleTargetWithEvent: aMouseButtonEvent.
				selectionDone := true]

This method below is mostly the same as the inherited version, with the extra ifFalse: clause at the end:


setUpFor: aMouseButtonEvent 
	"If we are doing drag and drop, we don't have to do the preparation 
	work"

	"JR 12/13/10 - When not dragging, actually make the selection"

	| index |
	selectionDone := false.
	startPoint := self cursorPointFor: aMouseButtonEvent.
	self outside: false.
	(index := self view numberOfElements) = 0 ifTrue: [^self].
	index := self controller findElementFor: (self cursorPointFor: aMouseButtonEvent).
	self view targetIndex: index.
	self wantsToDrag 
		ifTrue: [self setUpDragDropFor: aMouseButtonEvent]"This API is obsolete. Use cursorPointFor: instead."
		ifFalse: [self controller toggleTargetWithEvent: aMouseButtonEvent.
				selectionDone := true]

In the button release method, I copied over both lines from the block in #setUpDragDropFor:. After that, things worked the way I wanted them to - with multiple selections only deselecting on mouse button up. Kind of amusing that such a small fix took me most of the day to track down, but there you go :)

Technorati Tags: ,

 Share Tweet This

st4u

ST 4 U 25: Blocks Continued

December 15, 2010 8:11:48.963

Today's Smalltalk 4 You continues with "ProfStef", which is part of the "one click" Pharo download. Today we we continue with Blocks - this is part 2 of 2 on that. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Blocks

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , , ,

Enclosures:
[st4u25-iPhone.m4v ( Size: 2392181 )]

 Share Tweet This

smalltalk

Smalltalk Sort Functions

December 15, 2010 10:43:33.000

Travis has been thinking about sort functions in Smalltalk, and how to follow the same patterns shown in SymbolValue and Block culling:

Since the introduction of SymbolValue and Block culling, one of the things I've chased is how to do this same style of programming with sorting. For most sorting cases, you have a series of objects that you want to sort on some particular attribute. Maybe a sequence of customers you'd like to sort by name.

Travis goes into the approach he picked - go read the whole thing for the details. I do like this summation:

I sat down last night, and with tests, put together a TAG-SortFunctions package, published in the Cincom Public Repository. The basic idea was to use an object. Time and time and time again over the years, I rediscover the principle "there's an object waiting to be birthed here!"

A lot of sins in Smalltalk code can be solved by remembering to create a new object when it's useful to do so. It's not like they cost money :)

Technorati Tags: ,

 Share Tweet This

smalltalk

AidaWeb 6.2 Released:

December 15, 2010 14:21:23.000

Spotted in comp.lang.smalltalk:

Christmas edition of Aida/Web is on the way and here is first beta, for Squeak/Pharo and VisualWorks. Instruction how to install it are here

Looks like the biggest new thing is direct support for mobile platforms, but there's a lot going on here - follow the link for details.

Technorati Tags: ,

 Share Tweet This

smalltalk

The Joys of Selection Trackers, Part Two

December 15, 2010 21:28:11.052

Yesterday, I pushed up a post detailing a hack I did to make drag/drop in VisualWorks listboxes work more like they are expected to work. One problem though; my "fix" pretty much breaks select on down, which isn't really what you want.

As is usually the case with such things, if the fix seems overly complex, you're probably doing something wrong - and I certainly was here. The problem comes up in EmulatedSequenceTracker>>setUpDragDropFor:


setUpDragDropFor: aMouseButtonEvent 
	"If we are doing drag and drop, we don't have to do the preparation 
	work"

	self outside: false.
	(controller selectOnDownWithDrag and: [self view selectionIndex ~= self view targetIndex])
		ifTrue: 
			[(self isTryingToGrabPreviouslySelectedAreaWith: aMouseButtonEvent)
				ifFalse: [self controller toggleTargetWithEvent: aMouseButtonEvent].
			selectionDone := true]

Notice the change from what I posted yesterday. Instead of outright ignoring the selection, I added a test - and the test method looks like this:


isTryingToGrabPreviouslySelectedAreaWith: anEvent
	"if the user is trying to grab a previously selected area, and drag/drop is on, answer true.  Otherwise answer false"

	| index indices |
	controller wantsToDrag
		ifFalse: [^false].
	index := self view targetIndex.
	indices := self view selectionChannel value.
	(self eventHasKeyboardOptionsDown: anEvent)
		ifTrue: [^false].
	^(indices includes: index)

Basically, you ask three questions:

  • Is drag/drop on? If not, just proceed normally
  • Is the user trying to select a previously selected thing (individually or a group)? If so, ignore that selection so that drag/drop can proceed.
  • With respect to the previous test, let the event proceed if a keyboard modifier is down

That test on keyboard modifier looks like this:


eventHasKeyboardOptionsDown: anEvent
	"we want keyboard modifiers to still affect the selection - the #respondsTo: test makes this
	work in both VW 7.6 (and older) and VW 7.7.1"

	^(anEvent respondsTo: #ctrlOrCommandDown)
		ifTrue: [anEvent ctrlOrCommandDown | anEvent shiftDown]
		ifFalse: [anEvent ctrlDown | anEvent altDown | anEvent shiftDown]

With that, it looks like things respond the way you would expect, and select on down works (unlike the hack I posted yesterday). I also think this is closer to a supportable fix - although I suspect a full rewrite of the controller and tracker are still a decent idea. You can find the code in the public repository as MultiSelectPatch. Kind of outside my scope though :)

 Share Tweet This

fnvdiary

That Podcast 15: The Mod Squad

December 15, 2010 22:51:20.319

That Podcast: FNV Diary

Welcome to episode 15 of "That Podcast: An FNV Diary" - a podcast where Michael Lucas-Smith and I document our trials and tribulations in Fallout: New Vegas.

On today's podcast, Michael and James talk about mods for the PC edition of the game. There's a lot of stuff there, even though it's still eary days in terms of mods.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. You can get to the podcast directly in iTunes via this link. You can also go to the iTunes store and leave a comment, or join the Facebook Group and discuss the podcast.

If you want to download the podcast directly, I've provided it in three formats:

Got feedback? Send it to James. We'd really appreciate it if you head on over to iTunes and leave a comment - enjoy the podcast, and we'll see you in the wastelands!

Technorati Tags: , , ,

Enclosures:
[fnvdiary15.mp3 ( Size: 8501410 )]

 Share Tweet This

fnvdiaryAAC

That Podcast 15: The Mod Squad (AAC)

December 15, 2010 22:51:36.159

That Podcast: FNV Diary

Welcome to episode 15 of "That Podcast: An FNV Diary" - a podcast where Michael Lucas-Smith and I document our trials and tribulations in Fallout: New Vegas.

On today's podcast, Michael and James talk about mods for the PC edition of the game. There's a lot of stuff there, even though it's still eary days in terms of mods.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. You can get to the podcast directly in iTunes via this link. You can also go to the iTunes store and leave a comment, or join the Facebook Group and discuss the podcast.

If you want to download the podcast directly, I've provided it in three formats:

Got feedback? Send it to James. We'd really appreciate it if you head on over to iTunes and leave a comment - enjoy the podcast, and we'll see you in the wastelands!

Technorati Tags: , , ,

Enclosures:
[fnvdiary15.m4a ( Size: 11694449 )]

 Share Tweet This