This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate rotor; | |
use std::str; | |
use rotor::{EventSet, PollOpt, Loop, Config, Void}; | |
use rotor::mio::udp::UdpSocket; | |
use rotor::{Machine, Response, EarlyScope, Scope}; | |
struct Context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-behaviour(gen_server). | |
init(_) -> | |
{ok, #state{member = undefined}}. | |
handle_call(_, _, #state{member = undefined} = State) -> {noreply, State}. | |
handle_cast({sync, Pids}, State) -> {noreply, #state{member = Pids}}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import WatchKit; | |
@interface CachingInterfaceController : WKInterfaceController | |
- (void)updateLabel:(WKInterfaceLabel *)label withString:(NSString *)string; | |
- (void)updateLabel:(WKInterfaceLabel *)label asHidden:(BOOL)hidden; | |
- (void)updateImage:(WKInterfaceImage *)image withImageNamed:(NSString *)imageName; | |
- (void)updateImage:(WKInterfaceImage *)image withBaseNameForAnimation:(NSString *)baseName withRange:(NSRange)range duration:(NSTimeInterval)duration repeatCount:(NSInteger)repeatCount; | |
- (NSString *)currentImageNameForImage:(WKInterfaceImage *)image; |