TweetFollow Us on Twitter

Delayed Messaging

Volume Number: 14 (1998)
Issue Number: 12
Column Tag: Yellow Box

Delayed Messaging

by Mike Morton

Benefits of Procrastination: Delayed Messaging using the Foundation Kit

Introduction

When you send an Objective-C message to an object, you expect that object to receive the message and process it immediately. Right? Maybe not...

The Foundation Kit provides a way to post messages and have them delivered later, through the method performSelector:withObject:afterDelay:. This method is part of the NSObject class, from which most other classes descend. In this article, we'll discuss not only how you use this method, but give some examples of how delayed messaging solves some difficult problems.

If you've just begun working with Foundation Kit and AppKit, don't worry - we'll explain things step-by-step. In each of the four examples below, we'll describe the problem, show the solution working in the application, and then review the relevant parts of the code. But first, let's look at the method itself.

How to Send a Delayed Message

The method which lets you send delayed messages to any NSObject is declared like this:

- (void) performSelector
	:(SEL) aSelector
	withObject :(id) anArgument
	afterDelay :(NSTimeInterval) delay;

This method takes three arguments:

aSelector specifies the message to send. A selector is sort of the "name" of a method, a very distant cousin of C's function pointers. (In some implementations, a selector is just a "char *" pointer to a unique string value, and this can be useful in debugging, but you should never depend on it being so.) Unlike function pointers, selectors have their own data type, SEL, and you can refer to them in Objective-C code using the @selector(...) construct. For example, if you'd like to send the message setFoo:, you can specify the selector for that message with @selector(setFoo:).

anArgument is an optional object to send with the message. If you don't want to pass anything, you can pass nil. But keep in mind that if you do want to pass something, it must be an object - not an integer or other C type. (In theory, the method specified by aSelector should take a single argument, but no-argument methods seem to work fine. Of course, two-argument methods don't work, because there's no way to pass a second argument with this API.) delay is the number of seconds to delay before sending the message. [If you used the method like this one in earlier releases of Foundation, note that the delay is no longer expressed in milliseconds.] If the program is busy, the message may take longer before being delivered, but it will never get delivered early.

Using this method, you can send any one-argument message with a delay. For example, if you have an object printer which implements the method printString:, you can have it receive a printString: message after a delay of ten seconds with this code:

[printer performSelector :@selector(printString:)
	withObject :@"Hello, world!"
	afterDelay :10.0];

This is almost the same as messaging the object directly with [printer printString :@"Hello, world!"], except that the message gets delivered later, not "while you wait". Also, of course, if printString: returns a value, you can't get that value when using delayed messaging, because you want to continue before the message even gets received. (Modern CPUs are fast, but still don't support time-travel.)

If you change your mind about a delayed message you sent earlier, you can cancel it, using an NSObject class method:

+ (void) cancelPreviousPerformRequestsWithTarget
	:(id) aTarget
	selector :(SEL) aSelector
	object :(id) anArgument;

That's the "how" of delayed messaging. But why would you want to use it. Each of the four examples shows one reason why - let's take a look in more detail. The source code for each of these demos is available online at ftp://ftp.mactech.com.

Example #1: Are They Going to Click Again?

Suppose you're implementing a web browser (just to give Netscape and Microsoft some competition). If the user clicks on a link, the browser displays the new page in the same window. But if they double-click the link, you want to open a new window.

What should your program do on that first click? You can't display the new page (because if a second click shows up, that means the user didn't want to change this window's display). But you also can't ignore the first click (because if no second click arrives, you want to display the new page).

Try it: The demo doesn't browse the web, but it does show an example of not acting on every click. Quickly click on the red rectangle one or more times; it changes color with every click. Now check "Wait for clicks to stop before redisplaying", and it will change color only after you finish clicking.

Figure 1. Acting on multiple clicks

This part of the demo uses a custom view named ColorView, a subclass of the AppKit's important NSView class. The two instance variables for the class remember (1) what color it currently draws, and (2) how quickly it redraws. The class interface, from ColorView.h, begins like this:

Listing 1: Start of ColorView class interface

@interface ColorView : NSView
{
    NSColor *color;             // color we fill with
    BOOL    delaysDisplay;      // YES => wait to redraw
}

The header file also lists access methods, methods which get and set the instance variables, but these aren't shown in Listing 1.

The implementation, in ColorView.m, overrides some methods from NSView - initWithFrame:, which all views use to initialize; drawRect:, which displays the view's contents; and mouseDown:, which handles mouse clicks. The latter two are more important.

The drawRect: method (Listing 2) is simple. It sends a set message to the view's current color, so that subsequent PostScript drawing will use that color, and calls a PostScript function to fill in the rectangle.

Listing 2: ColorView's drawRect: method

- (void)drawRect                // redraw contents of...
    :(NSRect) aRect;            // INPUT: ...this rect
{
    [[self color] set];         // paint with this color
    PSrectfill (aRect.origin.x, aRect.origin.y,
                aRect.size.width, aRect.size.height);
}

The mouseDown: method (Listing 3) is also short, but does a lot more. It updates the view's color, based on the event's click count - the NSEvent method clickCount returns 1 for a click, 2 for a double-click, etc.

Listing 3: ColorView's mouseDown: method

- (void) mouseDown
    :(NSEvent *) theEvent;
{
    //  Update our color: red for a single-click,
    //  orange for a double-click, etc.
    [self _setColorAtIndex :[theEvent clickCount]-1];
}

When mouseDown: sends _setColorAtIndex:, that method winds up calling setColor:, which is where things start to get interesting. When you give the ColorView a new color, it will redraw itself, but it may not do so immediately. After it remembers the new color, it checks "if ([self delaysDisplay])". If it doesn't delay displaying, it sends "[self setNeedsDisplay :YES]" - that's how you ask any NSView to redraw.

But if you click the checkbox "Wait for clicks to stop before redisplaying", the checkbox sends takeDelaysDisplayFrom: to the ColorView, which will take a new value of delaysDisplay from the checkbox.

And when [self delaysDisplay] returns YES, the ColorView knows that it shouldn't redraw, but it also that it shouldn't forget about the color change, since it needs to redraw at some point. So it does the code in Listing 4: first, it removes any pending redraw requests, then it sends a _setNeedsDisplayYes message, but delaying the delivery. (Why doesn't it send a delayed setNeedsDisplay:, with an argument of YES? Because the argument of a delayed message must be an object.)

Listing 4: ColorView's delaying of redraw

{
        //  Cancel any pending message...
        [NSObject cancelPreviousPerformRequestsWithTarget
                        :self
               selector :@selector(_setNeedsDisplayYes)
                 object :nil];
        
        //  ...and queue a new one
        [self performSelector
                        :@selector(_setNeedsDisplayYes)
             withObject :nil
             afterDelay :REDRAW_DELAY];
}

How on earth does this work? Every time you click the ColorView, it remembers a new color, and posts a delayed message to redisplay itself soon. If you click again, soon enough, it cancels that delayed message and posts another, and so on. When you stop clicking, the last message you posted will get delivered, and the view redraws just once.

It's sort of like being a painter in a hotel with a finicky owner. Every few minutes, the owner changes their mind about what color they want. So you call the front desk, and say "Wake me in an hour". If the owner wakes you up early to change the color again, you phone the front desk and say "Cancel that wake-up call, and wake me an hour from now". Only after the owner goes a full hour without changing their mind will you get a wake-up call (a delayed message) - and then it's time to paint.

Without delayed messaging, it would be very hard to "predict" whether a mouse click will be followed by another. With the ability to post a message for future delivery, it takes just a few lines of code.

Example #2: Are They Done Typing?

The world is full of query user interfaces in which you type what you want to find, then press Return (or click "OK" or "Find" or "Search" or...). But if doing a search doesn't take a lot of time, why make the user press return? Why not just search when the users pauses in typing?

Try it: Type one or two letters in the box labeled "Find:". A moment after you finish typing, the "Items found" scrolling list will change to list only entries containing what you typed. Type some more to refine the search, or delete characters to expand it again. Adjust the "Wait for pause of..." field to find a delay which works well for you.

Figure 2. Automatic querying.

This solution works much like the previous one, but instead of waiting for a pause after one or more mouse clicks, you're waiting for a pause after one or more keystrokes (or other changes).

We can't just override keyDown: like we did for mouseDown: in the last example, because the field can change for things other than keystrokes (such as by pasting or cutting text). But it's easy to monitor an NSTextField for changes: we make the application controller be the delegate of the field. (You can see this relationship by inspecting the field's connections in the nib file.)

Each time the user changes the field, the controller receives a controlTextDidChange: message. [NSTextField documentation in the DR2 release promises a textDidChange:, but this seems not to get sent, and NSControl documentation says it's controlTextDidChange:.] The application controller's implementation is in Listing 5. It wipes out the results of any previous search, cancels any previous, delayed reload messages, and sends a delayed reload message to the table.

Listing 5: Handling a change in a query field

- (void) controlTextDidChange
    :(NSNotification *) notification; // IGNORED
{
    //  Wipe out any cached list of filtered objects.
    [self setFilteredStrings : nil];

    //  Cancel any pending message.
    [NSObject cancelPreviousPerformRequestsWithTarget
                :findResults
       selector :@selector(reloadData)
         object :nil];

    //  Now tell the table to reload after the a delay.
    //  (When it reloads, it'll get a new list of strings.)
    [findResults performSelector :@selector(reloadData)
               withObject :nil
               afterDelay :[findThreshhold floatValue]
                            /1000.0];
}

Let's skip the details of how reload redisplays the table to show only items matching your search string, but - in brief - it goes like this:

  • the table gets the delayed reloadData
  • the table sends numberOfRowsInTableView: to the controller
  • the controller computes [self filteredStrings]
  • filteredStrings finds and saves matching strings
  • the table sends tableView:objectValueForTableColumn: to the controller
  • the controller uses the filtered strings to find the object value

One other thing to note: the method awakeFromNib also sends reloadData to the table, which makes the table display its contents when the application starts, before you type anything.

Example #3: Did They Let Go of that Slider Yet?

All controls give you a choice of when you'd like them to send you their action message. For a button, you can ask to get the message continuously, as long they hold the mouse down in the button (useful for a scroller's arrow) or only when they release the button (useful for an "OK" button). You can set which way a control behaves with the setContinuous: method.

Suppose your 3-D drawing application has a slider used to set the viewing angle. While they're dragging the slider, you want to quickly draw a wire-frame image to give them an idea of what it'll look like. When they release the mouse, you want to redraw a full image.

But the slider sends only one type of action message, during dragging or when you release. How can you act on both"

If you want to do it the hard way, you could subclass NSSlider to support two types of action messages or to tell you if it's currently tracking. If you want to do it the elegant way, you could ask the shared NSApplication instance for currentEvent, which is the last event processed, and ask what kind of event provoked the action message. But this is an article about delayed messaging, so we'll do it the fun way.

Try it: The demo doesn't do wire-frame drawing, but as you drag the slider it does show you the "Sliding" value, then when you release the mouse, it'll show you the "Final" value.

Figure 3. Distinguishing dragging from mouse-up

This solution is a little tricky, and illustrates something about when delayed messages are actually delivered. As we've said before, a delayed message will never get delivered early, but it may get delivered late. This is because the application processes delayed messages only when it's idle. During the time you're dragging the mouse, the application is busy tracking the drag, and doesn't check if it needs to deliver delayed messages. So you can post a delayed message which says "the mouse went up", trusting that it won't get released until the user releases the mouse, and the control finishes tracking. (Nothing in the documentation promises this will work, so don't use this idea in a production application. But for demo purposes, it's fine.)

Listing 6 shows the implementation is simple: The slider sends mouseUpSliderAction: when you move it, and this method will:

  1. update the "Sliding" value in the UI
  2. wipe out any left-over "Final" value in the UI
  3. post a delayed _sliderFinished if it hasn't done so already

Listing 6: The action method for the slider

- (IBAction) mouseUpSliderAction :sender;
{
    //  Display "sliding" value, and clear "final" value
    [mouseUpSlidingValue setIntValue
        :[mouseUpSlider intValue]];
    [mouseUpFinalValue setStringValue :@"--"];

    //  If this is our first time getting this message
    //  since they began dragging, we want to remember
    //  to do something when they release the mouse, too.
    //  If we haven't queued that reminder yet, do it now.
    if (! mouseUpMessagePending)
    {
        [self performSelector :@selector(_sliderFinished)
                   withObject :nil
                   afterDelay :0];
        mouseUpMessagePending = YES;
    }
}

As you might guess, the _sliderFinished method clears the "Sliding" value, sets the "Final" value, and clears the flag. That's all there is to it.

Example #4: Simple Animation

You're almost done with that prototype which you want to sell to Microsoft, and it's got everything a Microsoft product should have: a complex UI, incompatible functionality, too many features, bugs galore... what else could Microsoft want?

Then you remember: They want a little assistant in the corner of the screen, animated to scratch or lick itself when you're not doing much. How can you animate when you don't have a real-time system - and how can you make sure the animation doesn't slow things down when the user is working?

If you've read this far, I hope you've guess the answer by now: you can do animation with delayed messaging.

Try it: Click "Run" to start the selection running around the matrix. Try typing different animation rates into the "Animate ... frames/second" field - you can type a new value while the animation is running.

(Now try dragging the slider (from example 3). The animation doesn't run while you're dragging. Again, delayed messages don't get delivered at all during certain operations.)

Figure 4. Simple animation

The code to implement this depends on one state variable, animationDirection, which keeps track of which way the selection is moving in the matrix. Clicking "Run" sends the animationRun: message, which just makes sure the direction is initialized, then sends _doAnimation to do the first "frame".

The _doAnimation method (shown in Listing 7) draws one "frame" by finding out what cell is selected and selecting the next one, reversing direction if it's reached the last cell. Then it calculates the current inter-frame delay from the text field, and queues a message to do itself again after that delay.

Listing 7: Drawing one "frame" of animation

- (void) _doAnimation;
{
   int		tag;
   float	delayInSeconds;

   //  Get current position; bump it in current direction
   tag = [animationMatrix selectedTag];
   tag += animationDirection;

   //  Cheap hack: If the tag runs off the end,
   //  there's no cell with that tag.
   if ([animationMatrix cellWithTag :tag] == nil)
   {
       //  Whoops! Switch direction and head the other way.
       animationDirection = -animationDirection;
       tag += (2*animationDirection);
   }

   //  "Animate" to the new position. Because it's a set
   //  of radio buttons, we needn't deselect the old cell.
   [animationMatrix selectCellWithTag :tag];

   //  Figure the delay, which may have changed if they
   //  typed a new number, and queue a message to
   //  do all this again.
   delayInSeconds = [animationDelay floatValue]/1000.0;
   [self performSelector :_cmd
              withObject :nil
              afterDelay :delayInSeconds];
}

Instead of using @selector(_doAnimation) as the selector, I chose to pass just _cmd. This obscure variable is automatically declared in every Objective-C method; it refers to the method currently being executed. Using it instead of the @selector(...) construct is largely a stylistic choice - I wanted to make it clear that the method is invoking itself.

But... wait a minute! If a method invokes itself unconditionally, doesn't that cause infinite recursion? Usually, yes. But in this case, the invocation doing the calling returns before it gets called again. So each invocation of the method happens independently of the previous ones - and without the previous ones on the stack.

So it's not recursive, but just like in a correct recursive algorithm, there is an end to the succession of invocations. If you click the "Stop" button, the animationStop: method will use cancelPreviousPerformRequestWithTarget:selector:object: to cancel the currently-pending invocation, breaking the chain and stopping the animation.

The Foundation Kit's NSTimer class provides another convenient way to do animation by repeatedly sending a message for you at fixed intervals. I chose delayed messaging here because it makes it easy to change the animation rate: note how _doAnimation immediately reacts to a new rate in the field, while it would be a little more complicated with a timer.

Again, keep in mind that delayed messages get performed only when the application is idle. You can have multiple animations running, but they'll take up no time during intensive computations. This can be useful if your UI needs to flash to show the user important conditions, but doesn't want to slow things down.

Other Applications

  • If updating an inspector or ruler slows your application, send it a delayed message. If the user changes the selection again soon, the inspector or ruler can avoid an unnecessary update.
  • You can minimize propagation in a two-level network. If multiple objects can trigger some reaction (such as recalculating) in a single target object, they can all send delayed messages with a zero delay, cancelling previous messages, and the target will receive just one message.
  • You can make an app terminate after a given period of inactivity by sending a delayed terminate: message to the application, then cancelling and re-posting the message each time there's some activity.
  • ...watch this space! I'd like to hear of uses you find for delayed messaging.

Conclusion

Delayed messaging is a simple Foundation Kit feature which can help solve some challenging problems. Keep the technique in mind, and you'll find interesting applications for these and other techniques.

Acknowledgements

Thanks to Art Isbell and Byron Han for their comments and suggestions. Thanks also to Lee Worden, for his help and ideas on an earlier version of this article, written for the first release of the Foundation Kit.

Further Reading

In addition to the NSObject class description, and its brief description of delayed messaging, you might find the following interesting:

NSObject class documentation
In addition to providing the authoritative word on the methods describes above, this also explains performSelector:withObject:afterDelay:inModes:, which gives you finer control over how idle the application has to be before the message gets sent.

NSTimer and NSInvocation class documentation
Delayed messaging uses concepts from timers and invocations. While you need not understand either of these classes to use it, you might find the details enlightening.

Apple's documentation for Enterprise Objects Framework (EOF)
EOF uses delayed messaging internally in a variety of ways to improve efficiency. For example, certain notifications are delayed so redundant notifications can be coalesced into one.

Ben Shneiderman, Dynamic Queries for Visual Information Seeking, originally published in IEEE Software 11, 6 (November 1994), 70-77, available at ftp://ftp.cs.umd.edu/pub/hcil/Reports-Abstracts-Bibliography/93-01html/3022.html. This article argues out that hardware has become so fast that you can evaluate queries instantly (without waiting for the user to press Return or click "OK" or...), and - unlike so many articles on GUIs - has a number of figures illustrating specific GUI ideas.


Mike Morton, mike@mikemorton.com, spent seven years developing software for Macintosh, then seven years developing for NextStep and OpenStep. (You may draw your own parallels to biblical dreams of seven lean years and seven fat years.) He currently works for Apple Enterprise Technical Support, which old-timers know as "NeXT Tech Support".

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.