Hai Yaron.

Very strange.

By using setProperty, you are setting these properties to 'public'. That means that when a client connects these are send to the client (unfortunately only once, updates/changes are not send) By using a normal javascript property on a object, these stay on the server as 'private'.

When I run your example code:
Creating a new channel: smj924
----[object channel]----
({
  pipe: {},
  userslist: {}
})
Without 'the properties' property.


Are you sure that you are not setting chan.properties somewhere your self (e.g. in the mkChan event chan.properties = {}; )?

When I run:
        myChan = Ape.mkChan('testChan');
        Ape.log(myChan.properties);
        myChan.setProperty('testKeyChan', null);
        myChan.setProperty('testKeyChanAgain', 'again');
        Ape.log("--" + myChan.getProperty('testKeyChan'));
        Ape.log("--" + myChan.getProperty('testKeyChanAgain'));
I get:
undefined
--
--again

There was a problem with setting values to null in the past, but I noticed that you are using the 'fancy logging' so you are probably up to date.

I am looking forward to your response.

Peter Reijnders

Yaron Kufert schreef op 2013-10-07 19:32:
After a lot of fiddling , instead of using

chan.setProperty('foo', 'bar');
var p = chan.getProperty('foo');

I've used

chan.properties['foo'] = 'bar';
var p = chan.properties['foo'];

And it worked.

On Monday, October 7, 2013 5:06:42 PM UTC+3, Yaron Kufert wrote:
Hi there,

I've

n't work as it use to. when running the following code:

Ape.log("creating a new channel: " + cr);
var chan = Ape.mkChan(cr);
Ape.log(chan);
chan.setProperty('foo', 'bar');
var p = chan.getProperty('foo');
Ape.log('>>>>>> '+p);

I get this log:

creating a new channel: smj924
----[object channel]----
({
properties: {},
pipe: {},
userslist: {}
})
undefined

Is SETPROPERTY deprecated? am I doing something wrong?

thanks!

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

 ---
 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 ape-project+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out [4].


Links:
------
[1] http://groups.google.com/group/ape-project?hl=en
[2] http://www.ape-project.org/
[3] http://github.com/APE-Project/
[4] 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 ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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 ape-project+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to