anchor.diff:           _ -> wf:redirect("/static/spa/spa.htm") end;
   
   event(login) -> login:event(login);
  -event(continue) -> wf:info("OK Pressed");
  -event({binary,Data}) -> 
  -    Depickled = wf:depickle(Data),
  -    wf:info(?MODULE,"Binary: ~p",[Depickled]),
  -    <<"111">>;
  -event(Event) -> wf:info("Event: ~p", [Event]).
  +event(continue) -> wf:info(?MODULE,"OK Pressed");
  +event({send_text, Text}) -> 
  +    wf:info(?MODULE,"Send text: ~p",[binary_from_browser]),
  +    wf:wire("ws.send(enc(tuple(atom('binary'),'" ++ Text ++ "')));");
  +event({binary, {raw,Data}}) ->
  +    wf:info(?MODULE,"Binary: ~p",[Data]),
  +    <<"just raw binary">>;
  +event({binary, {headered,Data}}) ->
  +    wf:info(?MODULE,"Binary with header: ~p",[Data]),
  +    #binary{ id = 4294967295, type = 255, app = 255, version = 255, from = 4294967295, to = 4294967295,
  +        ?MIN_TEMP = -340277175.0000001, ?MAX_TEMP = 43857.40000004364,
  +        meta = <<"meta">>, data = <<"DAT">> };
  +event({binary, Data}) -> 
  +    wf:info(?MODULE,"Anybody binary: ~p",[Data]),
  +    Data;
  +event(Event) -> wf:info(?MODULE,"Event: ~p", [Event]).
   chat_loop() ->
       receive 
           {message, Username, Message} ->
  
positive.code: log_modules() -> [index].
  
  body() ->
      wf:info("RENDER!"),
      {ok,Pid} = wf:comet(fun() -> chat_loop() end), 
      [ #span{ body = wf:f("'/index?x=' is ~p",[wf:qs(<<"x">>)]) },
        #panel{ id=history },
        #textbox{ id=message },
        #button{ id=bin, body= <<"Binary">>, postback={binary,{raw,Pid}} },
        #button{ id=send, body= <<"Chat">>, postback={chat,Pid}, source=[message] } ].
  
  event(init) ->
      User = wf:user(),
  
negative.code:     wf:insert_top(history,"-1-");
  
  event({chat,Pid}) ->
      wf:info(?MODULE,"Chat Pid: ~p",[Pid]),
      Username = wf:user(),
      wf:info(?MODULE,"User: ~p",[Username]),
      Message = wf:q(message),
  