The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Weblication

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
Weblication Posted: Oct 27, 2004 1:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Weblication
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement
The other night, I mentioned this idea to Michaell Lucas-Smith. The guy's a genious or super quick or something. In no time at all, he had whipped up his Discuss Methods.

Tonite, I pulled a blatent rip off/repackage of the implementation. I wanted a twist, I wanted to be able to highlight ANY text anywhere and generate styled html from it. So I stole the chunk of code that turns Text into styled html (but I'm repeatedly giving credit here), and applied a single override in ParagraphEditor so that when you hold ctrl-alt-shift during a copy operation, it "weblicates" the copied selection.

This was not actually the original way I wanted to do it. My first cut added a "weblicate" menu option right below the "copy" menu option in the basic editGroupMenu template. Then I just implemented a variant of the copySelection method for this menu item. The problem with this approach is that apparently many applications set some other object than the controller as the menu message receiver. So they'd all have to implement the variant copySelection method.

Ironically, most of those application implementations of copySelection, simply call the same method in the controller, the place I had put my variant in the first place. Imagine how much trampoline code could be removed if ControllerWithMenu checked first with its menu message receiver and sent the message if found there, but if not, defaulted back to itself?

Read: Weblication

Topic: Boston panics Previous Topic   Next Topic Topic: Tru out

Sponsored Links



Google
  Web Artima.com   

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