Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under signals...

Oz says...

http://www.centauri-dreams.org/?page_id=2118

Filed under: signals

Heavy says...

4 Ways to Stop Overeating

Trying to map out a new health plan can be difficult, especially when you are used to overeating on a regular basis. Many of us don't even realize just how much we eat and how this can affect our bodies. The key to weight loss is the simple formula of...


eat-> food-> trigger-> weight-> calories-> having


  • What to Eat to Lose Weight Are you having a hard time wondering what to eat to lose weight? Maybe you have heard how Daisy stayed slim by nibbling on foods and no you can't do that yourself. Don't worry, that's fine. Such weight loss regimen does not work for most people anyway! You can...
  • Food: The Good And The Bad I'm totally on a roll when it comes to food these days. During previous attempts to lose weight, I always felt hungry--starving even. No matter what I did, I never felt full and I always felt deprived. That's no way to live a life, and that's why all my other...
  • Insights - Tips To Lose Weight Easily Slower eating can assist weight loss. Because it's currently been shown that how fast we eat affects how much we eat. Under test conditions, individuals who ate quickly were found to eat more than those who ate slowly. This was proved when diners were asked to eat until they...
  • How To Eat To Lose Weight – Enjoy These 5 Essential Foods To lose weight and accomplish the greatest fat loss, what foods should you eat? You should consider nutrition and amount as the 2 key things. Weight loss and wellness rely on the sorts of foods we eat and their nutritional value. To satiate your hunger and supply you with the...
  • Eating to Lose Weight That's right. You heard me say it: eating to lose weight. I'll say it one more time to let it sink in: eating to lose weight. Now why in the world would someone eat to lose weight? Well, here's the secret: It's not the amount of food really, but the...
  • Weight Loss - 3 Reasons You Should Be Counting Calories To Lose Weight Counting calories is not as hard as it might seem. Let me explain. You see when you actually begin on a weight loss journey you naturally think that to lose weight you should be watching all the fat content and carb content in your foods right? Because if you want...
  • Ward Off Winter Weight Gain Spring's almost here, and bathing suit season is just around the corner.  If you're like many of us, Winter means big frumpy sweaters, loose fitting pants, and enough extra calories to make you want to keep your shirt on at the beach in June.  But hold on, it's not too...
  • celery Random Science Fact - Celery is the Only Food with Negative Calories Celery is the only food that takes more calories to digest than it contains averaging about 6 calories a stalk, but burning almost twice that in the digestion process since the celluloid fibers are so tough to break down. This does not mean you will lose weight eating celery, but...
  • food diary Will a Food Diary Help Double Your Weight Loss One of the most looked over things when you're trying to lose some weight, is knowing exactly what and how much food you are eating, you can to a certain extent roughly guess how much food you are eating in a day, by simply writing down the calories on the...
  • 162892029_c5539030a7_m[1] Eat Throughout The Day and Keep Weight Off Having frequent meals throughout the day instead of the traditional three times a day model, which we are all so used to perhaps now might not necessarily be the best way to keep your weight in check. You are far better off by eating five to six small meals throughout...
Query search by BlogSearchQuery.com
5 Online Store Search Results
  1. Program Materials, Accessories Weight Management

  2. Exercise Fitness Programs Weight Management

  3. CDs Cassettes Weight Management

  4. Shakes Drinks Weight Management

  5. Discount Elliptical Weight Management


  • The Perfect Thirst Quencher" Editorial by Windy City Magazine "Quench thirst with water." That's what Time-Out Chicago Magazine reports in their July 23-29 issue. They report that "71% of us said water is your favorite summer time thirst drink." When it comes to the perfect thirst quencher, water is the absolutel best solution. To quench your thirst, there...
  • Bowflex SelectTech 552 Dumbbells-Worth the Money! The Bowflex SelectTech 552 Dumbbells allow you to get more from your fitness program. How you wonder? If you are using traditional dumbbells, do you have many sets with different weights? Do you need a lot of space devoted to your gear? The truth is, if you owned the...
  • 222-swine-flu the art of being ill sickness is something i've been getting used to. i seem to be getting flus with a kind of regularity this past few years. a recent doctor put it down to some wacky sinuses which may be getting infected and then going on to infect the rest of my body....
  • Calcutta 400 Baitcasting Reel - 210 Yards/17lb. Test Calcutta 400 Baitcasting Reel - 210 Yards/17lb. Test A whole new world of possibilities for saltwater fishing!You have a lot to think about when choosing a new reel. Weight, Drag, Durability, Line Capacity, even a reel's limitations. Shimano has spent countless hours designing a reel that extinguishes most of these...
  • Thirsty markets eye water By Sarah O’Connor Published: July 23 2008 16:17 | Last updated: July 23 2008 16:17 // 0){if (nl.getElementsByTagName("p").length>= paraNum){nl.insertBefore(tb,nl.getElementsByTagName("p")[paraNum]);}else {if (nl.getElementsByTagName("p").length == 3){nl.insertBefore(tb,nl.getElementsByTagName("p")[2]);}else {nl.insertBefore(tb,nl.getElementsByTagName("p")[0]);}}}} // ]]> Otto Spork has hired three glaciers. He is siphoning off the melting glacier water, and plans to put it in tankers and ship...
  • Stills from videotape of :en:Bill Gates' depos... Open Source Opens Minds Image via Wikipedia Open Source software has quietly entered the online world in a big way. For the casual computer user it would not be noticed. In a way open source software is the humble non-combatant in the war between the big computer and internet companies. As google, microsoft,...
  • 5 Ways to Cure Writer’s Block there is nothing more demoralizing than sitting there, staring at a blank page or a blinking cursor. Blinking, blinking, blinking…it’s mindless isn’t it?n
  • candh creepy and hatboy - red dwarf moments the coffee table incident it happened while hatboy was out getting snacks. i was sitting all comfy on the good side of the couch, when i heard hatboy’s voice mumbling from inside the coffee table. “i don’t want to alarm you, creepy, but i really need to tell you...
  • horror-of-dracula-bloody-grin horror of dracula The Horror of Dracula is the first Hammer Dracula film with Christopher Lee as the title role of the dreaded count of evil doom and blood-drinky, and is, in my humble opinion, the best of the lot. Firstly, Hammer films are an acquired taste. They take a bit to...
  • What's the best strategy to day trade starting today? I am conducting a business project, social experiment. I am playing CNBC's Million Dollar Portfolio Challenge. I am just looking for quality advice to invest million in the stock market & looking for clean & crisp advice. Please do not send spam, or links to pay-for-service sites. I just don't...
Search engine for blogs by BlogSearchQuery.com
5 Online Store Search Results
  1. CDs Cassettes Weight Management

  2. Atkins Diet Weight Management

  3. Low Carb Diet Weight Management

  4. Scales Weight Management

  5. Discount Elliptical Weight Management


  • Comparing IP Network Camera And Analog Camera There are are number of reasons why you should choose an IP network camera for your surveillance system. Sure, analog cameras have been around longer, but the IP camera has proven its worth in performance. The IP tetwork camera has existed since 1996. During its release, network cameras lagged a...
  • Follow These Steps To Improve Traffic Any website owner who starts down the path of internet marketing will soon discover how many "guru's" are out there all claiming some secret trick to boost your search engine rankings. The reality is there are a few things to really pay attention to, but most of it really comes...
  • Playing Financial Adviser You hear it everywhere that the thing couples fight about the most is money. Well, in the case of M and I, we don't really fight about money decisions, although it is hard when you want to do things or buy things that don't fit into the larger financial plan....
  • palin Palin, the brand A week or so ago, CNBC had a discussion with Donny Deutsch who hosts The Big Idea. He offers Palin, the brand and sees her as: which just struck me as a bit surrealistic. Palin as a breakfast cereal. This post does not reflect any opinion regarding either set of...
  • Understand more about Dotcom Secret Reviews DotcomSecret reviews are the most worthy and most well-liked reviews in the field of internet marketing. It is very widespread because it an competent documents or course material. This is very fashionable course material to learn about internet advertising then it is very notable to have this basic idea. Therefore,...
  • cooptakomabibelot.jpg Planning a Bulk-Buying Grocery Staples Excursion I'm definitely an underbuyer. I don't like to spend more than I have to, even if it'll save money in the future. Parting with that money now just scares me. But I'm biting the bullet and becoming more efficient and a better planner. I recently discovered that there is a...
  • Google Apps - Part 4 Docs One of the benefits of looking at online document solutions, like Google Docs, is the shifting of responsibility of backup and archival to a third party. In my corporate life, I have yet to embrace the concept outsourced backup…call it ultimate paranoia. This, however, is off topic so back to...
  • Online Business Blogging SEO – Marketing Bisnis Pulsa Eranet When you begin your online MLM business, there are a few "must have" things you should incorporate into your business, and a network marketing blog has quickly become one of them. But, there is a lot of confusion on the internet about what their precise purpose is...
  • crackedconcrete Repairing Cracked Concrete 101 There are a number of different factors that can cause your concrete driveway or garage floor to crack. This may include shifting of the ground underneath, an extreme fluctuation in the temperature between hot and cold, too much weight having been applied, and numerous other things as well. Not only...
  • Your dating personality profile:Outgoing - You can liven up any party. You've got a way with people and have little difficulty charming your dates.Athletic - Physical fitness is one of your priorities. You find the time to work athletic pursuits into your schedule. You enjoy being active.Liberal - Politics matters...
Search engine for blog by BlogSearchQuery.com

Blog Search Query Tags:

disaster trigger food nutrition healthy eating alternative ideas health pla n falling off the wagon Meals signals weight loss new health how many calories

Filed under: signals

I was running in the park, my usual route, iPod on, when I saw a ball rolling towards the path. When I caught up to it, I kicked it to the nearest kid and kept going. The kid started running along with me and kicked the ball in my direction again. I immediately responded by kicking it back to him, this time with more flair (Maradonna?) then kept running. Next, the ball flew right by my face and into the horizon, completely out of my reach. I immediately stopped, I looked back at the kid wondering what the hell he did that for, when he said, "I just want to talk."

Filed under: signals

Heavy says...

4 Ways to Stop Overeating

Trying to map out a new health plan can be difficult, especially when you are used to overeating on a regular basis. Many of us don't even realize just how much we eat and how this can affect our bodies. The key to weight loss is the simple formula of...


everything-> smaller-> food-> yourself-> avoid-> process


  • Saving money by avoiding processed food Processed food is all around us, making the temptation to take advantage of it great -- especially considering the busy lifestyle that so many of us lead. You may feel frazzled or short on time, and the thought of cooking dinner after a long day seems overwhelming, so you pick...
  • Foods To Avoid To Lower Cholesterol Foods to Avoid to Lower Cholesterol One past time that people love to do is eating. This can happen at anytime aside from the three basic meals of the day whenever the person is craving for something. Whenever the individual buys the snack or meal to suit that craving, little...
  • Food Scale 4 Ways to Stop Overeating Trying to map out a new health plan can be difficult, especially when you are used to overeating on a regular basis. Many of us don't even realize just how much we eat and how this can affect our bodies. The key to weight loss is the simple formula of...
  • Flat Belly Diet: Top 10 Foods to Avoid What's in Store The 4-day Jumpstart is a great way to reduce belly bloat and start flattening your stomach instantly. You can lose up to 7 pounds! You'll drink Sassy Water (a signature Flat Belly drink) while eating healthy foods prepared in delicious, simple ways. The jumpstart was created for the specific purpose of reducing water retention, eliminating heavy solids, and relieving gas so you will quickly look and feel lighter. Avoid these 10 foods and you'll be on your way to a trimmer tummy today!
  • Common First Time Home Buying Mistakes (And How to Avoid Them) Buying a home for the very first time can be an exciting and exhilarating process. You’re pursuing the American dream, providing a home for your family, and hopefully making yourself more financially secure. Unfortunately many first time homebuyers dive in head first and often make a number of mistakes in...
  • Change your attitude, believe in yourself first !! How To Believe In Yourself There is a phase in everybody's life when everything around you looks gloomy and sad, you feel that you are not able to achieve your goals, when everything seems to be a hindrance in your path towards success, you may wonder about the key to...
  • Senior Exercise Keeps You Motivated Keep Walking Seniors! There is one thing that makes people stop their Senior exercise program. That is hitting a plateau. You work hard for a few weeks, lose some weight and feel better for it. Then next time you weigh yourself you are the same or even - shock, horror...
  • fast-food-logos The High Cost of Fast Food Convenience When fast food first came on the scene, it offered consumers an easy, convenient and affordable dining alternative. This billion dollar industry has grown and evolved over the years offering much more than the traditional hamburger and french fries. Americans have long had a love affair with fast food, however...
  • big-meal Is Saving Up For Dinner Ruining Your Diet? It is a common practice, and many of us are guilty of it. We forgo eating all day long, because we know we’ll be eating out that night, or that there is a special event coming later in the day and we want to be able to eat whatever we...
  • Bike 101 ways to reduce your spending and keep more of your money Here are 101 areas where it's easy to make cuts that will allow you to keep more of your money. Since this article is long, it's broken it down into sections. Browse through the whole thing, or use the links below to jump to the sections that interest you most....
Search on blogs by BlogSearchQuery.com
5 Online Store Search Results

    • How to Quit Smoking and not Gain Weight? Ask a hundred people, 'Will you gain weight when you stop smoking?', and virtually all will say, 'Yes'. And yet.....virtually all ARE wrong. If I asked you the question now, what would you say? But before you answer, please read this article.......AND find out the real truth about smoking and weight...
    • Fitness and Its Importance In the world we are living in, there is a craze going on; everyone wants to get fit. This is as a result of a sudden realization that society is lacking in this regard. This is the most overweight generation and, people are looking for quick fixes to achieve fitness....
    • Weight Gain After Quit Smoking For many smokers the desire to quit smoking is strong. Yet it seems no matter what they do, they just can’t seem to break this devastating habit. One of the difficulties in trying to quit smoking is that smokers become physically dependant on nicotine. When trying to quit smoking you...
    • Creating Motivation To Stop Smoking There are two mental states that must be contented before a smoker will voluntarily quit smoking. These essentials are called "Desire," and "Decision." DESIRE: A want, crave or a wish for DECISION: Making up of one's mind / a verdict or judgment In order to quit smoking, you have to...
    • How to Protect Yourself from Swine Flu or the A(H1N1) Virus So how do you protect yourself from swine flu? If you live in the Philippines, who do you contact and where do you go when you experience symptoms of this contagious flu? Well, I received another email that is worth taking a look and that will help all of us...
    • Quitting Smoking With Laser Therapy is Easy Do you know that quit smoking laser has been around for more than 30 years in Europe and over 17 years in Canada? The quit smoking laser is a low level laser which helps you to quit smoking. There are many people who have got rid of their smoking habit...
    • Fitness Center - 5 Useful Tips On Picking The Best Fitness Center If you were in a fix determining which fitness center is best suited to your fitness needs here are a few tips on deciding which one fits your requirements. Contrary to popular belief you do not have to spend all your hard earned bucks on fancy health clubs or fitness...
    • 4 Powerful Twitter Marketing Secrets Twitter is that quirky website where it asks "what are you doing now?", and then gives you 140 characters to respond. It takes only a few seconds to register, and another few seconds to post your latest activities. Lately, marketers have been discovering how powerful Twitter is for marketing things...
    • Quit Smoking Aids – Help yourself Quit Painlessly and Successfully "Quitting smoking is easy. I've done it a thousand times.” This quote by Mark Twain, aptly describes how tough it is for the addicts to stop smoking once and for all. Quitting cold turkey does help many smokers but many succumb to the temptation of having a puff again which...
    • How I Quit Smoking using NLP HOW I QUIT SMOKING USING NLP By  VIKRAM KARVE Whenever I undergo any training or course, I try and apply the concepts and skills I learn during the program upon myself in order to ascertain efficacy of the training for I firmly believe in the time-tested adage that "The Proof of...
    Search query by BlogSearchQuery.com
    5 Online Store Search Results

      • Peek'n Peak Resort and Spa, Findley Lake, NY Peek'n Peak Resort and Spa is located in Findley Lake, NY US Phone - (716) 355 4141 View Larger Map About the Resort - The Peek'n Peak Resort and Spa is nestled in Southwestern New York, offering a stunning 105 acres worth of terrain that can be skied and snowboarded...
      • havoc-marketing1 The 9 Most Helpful Blogger You Can Look Up For ! Dear Friend, My link love exercise was truly amazing! So far, I got a 10% increase in traffic and if there were more, the traffic percentage may be more then... 15 to 20 % ! God bless all the 9 blogger that participate in this small exercise. You know, one...
      • Real Estate in India Losing the Momentum If you are a home loan borrower, be prepared to shell out more money due to the recent 50 to 75 basis point climb, as most of the bank and other financial institutes are going to follow the footsteps of HDFC Bank, the leading player in the housing finance sector,...
      • A Lifetime of Lessons: More Than 50 Years of Expert Instruction to Help You Play Your Best Golf Now By Marshall Smith with David Denunzio Marshall Smith is one of the most recognizable names in golf instruction, and if you’ve ever wished you could get a lesson with him, this book has the whole experience down to a tee. You’ll feel just like you’re right with Smith, learning and growing as a golfer. If you...
      • Top tips to get backlinks to your site without spamming Every owner of a web site wants his site at the top of search engine results but getting there is no easy task. A search engine like Google uses an algorithm (mathemetical language) that factors in huge range of variables to rank pages. Many would consider backlinks to site by...
      • _cnnpt1obamaoath Will Obama have to be better because he's black? Just days before he was sworn in, President Obama was giving his daughters a tour of the Lincoln Memorial when one of them pointed to a copy of Abraham Lincoln's second inaugural address carved into the wall. Obama's 7-year-old daughter, Sasha, told her father that Lincoln's speech was really...
      • BankServ powers innovative Lending Club person-to-person lending and borrowing platform BankServ powers innovative Lending Club person-to-person lending and borrowing platform   SAN FRANCISCO, 7 August, 2007 — BankServ, worldwide experts in electronic payments, today announced its part in the successful launch of Lending Club's collaborative person-to-person (P2P) lending platform. Lending Club has implemented BankServ's Magex Payment Platform, ACH reporting and...
      • debt-elimination-1.png How To Eliminate Credit Card Debt On Your Own Being in debt is not fun. Unfortunately, many people do find themselves in debt and carry balances on multiple credit cards. This article will show you how to eliminate credit card debt on your own without using credit card debt consolidation services. Personally, I think these credit card debt consolidation...
      • roni Roni's Way to Professional Blogging This was a fun Webside Chat! I interviewed pro blogger Veronica Noone (Roni) from RonisWeigh.com, GreenLiteBites.com, and BlogtoLose.com yesterday.  This "mommy blogger" uses everything at her disposal to create really great blogs with different media and a less "formulaic" approach to blogging in general. The result is a high traffic...
      • Antique Wedding Dress Antiques -> Textiles, Linens -> Lace, Crochet, Doilies Wedding dresses are a big business today, but many people prefer the look of an antique wedding dress to the more modern gowns. Choosing a vintage dress is certainly one way to make your wedding unique, as it's highly unlikely that any...
      Blog search engine by BlogSearchQuery.com

      Blog Search Query Tags:

      disaster stomach weight loss healthy eating nutrition health plan trigger food brain alternative ideas new health food scale signals

      Filed under: signals

      Eightball says...

      Part five of my weeklong "Best Shows I've Seen" theme, culling from the 200 I've attended.

       

      MISSION OF BURMA
      Metro, Chicago, IL  22 November 2002

      The 2002 reunion of Mission Of Burma was something I thought I'd never see.  Their output was tiny;  One album, one EP, two singles, and a couple rarities comps.  Their name wasn't rolling off many tongues but those it was either started a band themselves or were hardcore music junkies.  They dissolved because of guitarist/vocalist Roger Miller's worsening tinnitus, a symptom in which a constant ringing is heard within the ears, which...  how do you get over that?  Miller and drummer/vocalist Peter Prescott stayed relatively active in other musical projects while bassist/vocalist Clint Conley and tape looper Martin Swope albut left music altogether.  There was little hope.


      Having heard raves about them for years through bands like R.E.M. who covered Academy Fight Song in their sets I had great difficulty tracking them down until Ryko's 1997 reissues.  From the moment I first picked up Signals, Calls, And Marches and heard it blaring from my stereo I was hooked.  In my heart of hearts I have always been drawn to the punk rock, or more specifically the post-punk movement.  It's rare I met a post-punk band I didn't like and at the top of that list was Mission Of Burma.  So when the rumor went around that they were reforming for a series of shows I was salivating at the mouth.

      They played a handful of shows in their native Massachusetts plus New York City to gear up for the Shellac curated All Tomorrow's Parties over in England in 2002.  All the members had returned except for Swope.  He was replaced by Bob Weston of Shellac who was also Prescott's former bandmate in the Volcano Suns.  I feared those few shows would be it but luckily they kept coming.  Finally they announced a date at the Chicago Metro.  I got my ticket immediately.

      The first thing I noticed when I arrived was the fans.  I would bet I was the youngest in the crowd, only 27 at the time, as I was surrounded by older, graying fans.  These were the guys that were around when Burma was first releasing music.  Everyone there was the true fans, it seemed, and had been waiting for this moment.

      As Burma took the stage to a glorious roar of the crowd you could see the surprise in their faces.  It seemed they couldn't believe that anyone actually loved their band, let alone showed up.  Miller exclaimed "Where were you all the first time around?"  (Uh... being seven years old in Iowa).

      What can I really say about the show?  It was just a great rock band playing their songs as if that twenty year gap never occurred.  Their original sound is a revelation unto itself on record and they just placed it up there on stage.  Miller played wearing gunshot headphones and further protected his ears with protective plastic barrier that separated Prescott's drums from him.  It affected nothing in his performance as he and the band hammered out each song at a breakneck pace.  There were new songs in the set but they played just as well as the classics.  And that was the good sign.  They played two sets, found below:

      SET 1
      Dirt, This is Not A Photograph, The Enthusiast, Trem Two, Mica, The Setup, Hunt Again, Max Ernst, Academy Fight Song, Learn How

      SET 2
      Fun World, Peking Spring, Playland, What We Really Were, Into the Fire, That's How I Escaped My Certain Fate, Einstein's Day, Fever Moon, That's When I Reach for My Revolver, The Ballad of Johnny Burma

      ENCORE
      Dumbells, Class War, Dead Pool

      ENCORE 2
      Fame and Fortune

      I left that show in daze but better things were to come.  Burma kept at it and started recording again, becoming one of the few bands that returned and created music on par with their earlier work.  That twenty year gap really didn't occur!  ONoffON came in 2004, The Obliterati in 2006, and there's word of a new album in October.  And more and more shows came, my most recent being at the Echoplex last September to see them perform Vs.  It's still all unbelievable to me.  Seven years later I'm still welcoming them back and hoping they never go away again.

      Red comes from Signals, Calls, And Marches.

      Red by Mission Of Burma  


      For more info:
      Mission Of Burma:  http://www.missionofburma.com/

      Filed under: Signals

      Alec says...

      This is a followup to my previous post.

      A fairly common pattern in GTK code seems to be updating a widget whenever a value changes in your controller. That is, something like this:

      class Counter(gobject.Gobject):
        __gsignals__ = {
          'counter-changed': (gobject.SIGNAL_RUN_FIRST,
                              gobject.TYPE_NONE, (int,)),
          }

        def __init__(self):
          self.counter = 0

        def inc(self):
          self.counter += 1
          self.emit('counter-changed', self.counter)

        def dec(self):
          self.counter -= 1
          self.emit('counter-changed', self.counter)


      Needless to say, this can get a bit tedious. With a bit of stack frame hackery we can reduce that boilerplate to the following:

      class Counter(gobject.GObject):
        counter = SignalProperty('counter-changed', 0)

        def inc(self):
          self.counter += 1

        def dec(self):
          self.counter -= 1


      Here's the code:

      class SignalProperty(object):
        def __init__(self, name, default=None):
          self.name =  name
          self.default = default
          frame = sys._getframe(1)
          locals_ = frame.f_locals
          signals = locals_.setdefault('__gsignals__', {})
          signals[name] = (gobject.SIGNAL_RUN_FIRST,
                           gobject.TYPE_NONE, (object,))

        def __get__(self, instance, owner):
          if instance is None:
            return self
          return getattr(instance, '_signal_' + self.name, self.default)

        def __set__(self, instance, value):
          setattr(instance, '_signal_' + self.name, value)
          instance.emit(self.name, value)



      Filed under: signals

      Alec says...

      Last week I set out to learn PyGTK by doing. Quickly. As can be imagined, the resulting code was less than stellar, but I did learn a lot.

      By far the most glaring design error I made was in not completely decoupling my UI objects from "business" logic, ala MVC. This failure was the result of not totally comprehending the role signals should play in GTK applications. I made the first step correctly, with distinct objects for the UI panel and logic, but sadly that was the last smart choice I made. My next was deciding how to update the UI when the state of the system changed. "Hmm", I thought. "If I just pass the appropriate UI control through to the logic layer, I can update the view as necessary! Brilliant!". BZzzzzzzzzzzzt! Wrong.

      The right approach in GTK is to use signals to notify the UI of changes to your objects. To do this, inherit from gobject.Gobject and add a __gsignals__ attribute. Here's a mocked up example of a simulation that emits a "simulation-step" signal every time the simulation is updated. To update a hypothetical counter widget we simply connect the signal to a callback that updates the widget.

      class Controller(gobject.GObject):
        __gsignals__ = {
          'simulation-step': (gobject.SIGNAL_RUN_FIRST,
                              gobject.TYPE_NONE, (int,)),
        }

        def step_simulation(self, step):
          self.emit('simulation-step', step)

      class View(object):
        def __init__(self, builder, controller):
          # "builder" is a Glade gtk.Builder object.
          builder.connect_signals(self)
          self.step_counter = builder.get_object('step_counter')
          controller.connect('simulation-step', self.on_simulation_step)

        def on_simulation_step(self, simulation, step):
          self.step_counter.set_value(step)

      controller = Controller()
      view = View(controller)


      The fundamental mistake I made was assuming that GTK signals were purely for notifying my application of UI changes. In reality, signals are equally important in notifying the UI of application state changes.

      Filed under: signals