The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Small tip of the day

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
Small tip of the day Posted: Jul 3, 2006 12:52 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Small tip of the day
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

An interesting question came up on the Smalltalk IRC channel. Say I create a class that I want to use as a model for something in a database. Say the database columns start with capital letters, and I want my accessors and mutators to match those names. If you define the class using the class creation tool, it will force the first letter of each of those methods to lower case - not what you want. You don't want to create all those methods by hand, so what do you do?

Well, out of the mists of old muscle memory I recalled class CodingAssistant. Before the RB was integrated, it was a tool that I had added into the browser's menu, so that I could easily generate those methods. It comes in with the UIPainter parcel, so just load that, and then open the tool this way:

Tools.CodingAssistant open

Then enter your class name, select the variables to generate code for, and you're done.

Technorati Tags:

Read: Small tip of the day

Topic: The net as it is wins - for now Previous Topic   Next Topic Topic: Audio, Video, Text - Location Matters

Sponsored Links



Google
  Web Artima.com   

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