So the channel maybe different each time, I need to call a hash var to hold my 
created name for the setInterval.  Is this right?

From: Pablo Tejada 
Sent: Monday, October 07, 2013 8:35 PM
To: [email protected] 
Subject: Re: [APE Project] APE Check Tool Problems...

Why are you using window? Is that event defined? To make a global variable just 
define it outside the the callback function or assign it without var.

On Oct 7, 2013 9:30 PM, "Joe Kochinski" <[email protected]> wrote:

    So I have another question...  First let me tell you what I want to do.  I 
want to be able to have the web users be able to join a certain channel, if the 
channel don't exist I assume a mkchannel even will be fired and I want to start 
a set interval that will push out data to my client... However this don't 
work...

  Server:

  Ape.addEvent('mkChan', function(channel) {
  //clearInterval(window["bidcutter_channel_" + auction_id]);
  var window["bidcutter_channel_" + channel.getProperty('name')] = 
Ape.setInterval(function(a,b) {
    channel.pipe.sendRaw('FOORAW', {'John':'Doe'});
  }, 1000);
  });

  Ape.addEvent('rmChan', function(channel) {
  Ape.clearInterval(window["bidcutter_channel_" + channel.getProperty('name')]);
  });

  client:
  <script type="text/javaScript">
          var client = new APE.Client();
   
          //Load APE client
          client.load();
   
          client.addEvent('load', function() {
              client.core.start({'name': '' + Date.now() + ''});//Start with a 
random name
          });
   
          client.addEvent('ready', function() {
     client.core.join('testChannel1');
          });
    client.onRaw('FOORAW', function(raw, pipe) {
     console.log('Receving: ' + raw.data.msg);
    }); 

  </script>
    

  I get no data - can you help or show me at least a little guidance?  And 
thanks so much!!!!

  -- 
  -- 
  You received this message because you are subscribed to the Google
  Groups "APE Project" group.
  To post to this group, send email to [email protected]
  To unsubscribe from this group, send email to
  mailto:ape-project%[email protected]
  For more options, visit this group at
  http://groups.google.com/group/ape-project?hl=en
  ---
  APE Project (Ajax Push Engine)
  Official website : http://www.ape-project.org/
  Git Hub : http://github.com/APE-Project/
   
  --- 
  You received this message because you are subscribed to the Google Groups 
"APE Project" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to mailto:ape-project%[email protected].
  For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/
 
--- 
You received this message because you are subscribed to a topic in the Google 
Groups "APE Project" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/ape-project/ZRrIRqOzWpg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--- 
You received this message because you are subscribed to the Google Groups "APE 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to