SFSRoom Variables dont all update
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
SFSRoom Variables dont all update
I had acode running and i think it worked for a while,
however
I am sending 4 new room vars in one go, all fine all sent, yet the response is only the first two.
single one works, two works, three no, four no.
Anyone know what would result in this odd behaviour
I try to work around by doing two requests with two vars each. First one comes back, second one is plainly ignore, no response again.
I changed the vars around its always the first two are fine, afterwards , zilch.
Anyone?
however
I am sending 4 new room vars in one go, all fine all sent, yet the response is only the first two.
single one works, two works, three no, four no.
Anyone know what would result in this odd behaviour
I try to work around by doing two requests with two vars each. First one comes back, second one is plainly ignore, no response again.
I changed the vars around its always the first two are fine, afterwards , zilch.
Anyone?
Re: SFSRoom Variables dont all update
Hi.
How are you setting those vars?
Are you using the latest server patch (2.1.0) and client API?
And please make sure that you insert new values when you update those variables, different from the old ones.
How are you setting those vars?
Are you using the latest server patch (2.1.0) and client API?
And please make sure that you insert new values when you update those variables, different from the old ones.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
NSNumber *tLon = (NSNumber *)[(SFSUserVariable *)[tSmartFoxServerProxy.smartFox.mySelf getVariable:USER_PROP_LONGITUDE] getValue];
NSNumber *tLat = (NSNumber *)[(SFSUserVariable *)[tSmartFoxServerProxy.smartFox.mySelf getVariable:USER_PROP_LATITUDE] getValue];
NSLog(@">>>> %f::%f", [tLon floatValue], [tLat floatValue]);
NSArray *tVariables = [NSArray arrayWithObjects:
[SFSUserVariable variableWithName:@"pinLat" value:tLat],
[SFSUserVariable variableWithName:@"pinLon" value:tLon],
nil];
[tSmartFoxServerProxy setMyUserVariables:tVariables];
NSNumber *tLat = (NSNumber *)[(SFSUserVariable *)[tSmartFoxServerProxy.smartFox.mySelf getVariable:USER_PROP_LATITUDE] getValue];
NSLog(@">>>> %f::%f", [tLon floatValue], [tLat floatValue]);
NSArray *tVariables = [NSArray arrayWithObjects:
[SFSUserVariable variableWithName:@"pinLat" value:tLat],
[SFSUserVariable variableWithName:@"pinLon" value:tLon],
nil];
[tSmartFoxServerProxy setMyUserVariables:tVariables];
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
Might a minus value make a difference? it shouldnt, it worked for two values, and now that stopped as well for some reason (it goes crazy)
the values are there, they are written to the server but for some reason it does not include them in the response
the values are there, they are written to the server but for some reason it does not include them in the response
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
odd thing is my first round of user props setting
longitude, latitude
works fine
the second one
pinlat, pinlon
screws up ????
inconsistent, why?
longitude, latitude
works fine
the second one
pinlat, pinlon
screws up ????
inconsistent, why?
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
if I use the same properties to set the other properties, it works,
as if it would not like the property names
as if it would not like the property names
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
it looks like it doesnt like the user property names
why? is there a rule for user property names?
why? is there a rule for user property names?
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
it accepts the first prop name thousand times yet a new name makes it go funny (deprecate)
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
Okay I dont knwo what is going on here.
first segment works, second doesnt, only difference, the names of the properties:
first segment works, second doesnt, only difference, the names of the properties:
Code: Select all
if([[notification name] isEqualToString: SFS_YOU_LOCATION_UPDATE])
{
CLLocation *tCoordinate = (CLLocation *)[notification body];
NSNumber *tLon = [NSNumber numberWithDouble:tCoordinate.coordinate.longitude];
NSNumber *tLat = [NSNumber numberWithDouble:tCoordinate.coordinate.latitude];
NSArray *tVariables = [NSArray arrayWithObjects:
[SFSUserVariable variableWithName:USER_PROP_LONGITUDE value:tLon],
[SFSUserVariable variableWithName:USER_PROP_LATITUDE value:tLat],
nil];
[tSmartFoxServerProxy setMyUserVariables:tVariables];
}
else if([[notification name] isEqualToString: SFS_YOU_LOCATION_PIN])
{
NSNumber *tLonNumber = (NSNumber *)[(SFSUserVariable *)[tSmartFoxServerProxy.smartFox.mySelf getVariable:USER_PROP_LONGITUDE] getValue];
NSNumber *tLatNumber = (NSNumber *)[(SFSUserVariable *)[tSmartFoxServerProxy.smartFox.mySelf getVariable:USER_PROP_LATITUDE] getValue];
NSNumber *tLon = [NSNumber numberWithDouble:[tLonNumber doubleValue]];
NSNumber *tLat = [NSNumber numberWithDouble:[tLatNumber doubleValue]];
//NSLog(@">>>> %f::%f", [tLon floatValue], [tLat floatValue]);
NSArray *tVariables = [NSArray arrayWithObjects:
[SFSUserVariable variableWithName:USER_PROP_PIN_LON value:tLon],
[SFSUserVariable variableWithName:USER_PROP_PIN_LAT value:tLat],
nil];
[tSmartFoxServerProxy setMyUserVariables:tVariables];
}
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
okay the only difference I can test on why the added properties dont come back is that ,
they have different names
thing is what makes some names work?
they have different names
thing is what makes some names work?
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
OKAY I declare BUG!!!!!
some names cause the list of properties to respond back to be truncated.
what the rule is I dont know
but it looks complicated
I can cut off any user var and room var request by just adding new vars and it will break down
good ? no!!!!!!
some names cause the list of properties to respond back to be truncated.
what the rule is I dont know
but it looks complicated
I can cut off any user var and room var request by just adding new vars and it will break down
good ? no!!!!!!
- A51Integrated
- Posts: 240
- Joined: 03 Jan 2012, 19:55
- Location: Toronto, Canada
- Contact:
Re: SFSRoom Variables dont all update
Can you please post a concise example of what you are talking about to replicate this? Something without your proxy class but that actually shows the SetUserVariablesRequest.
thx.
thx.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
http://a51integrated.com / +1 416-703-2300
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
My proxy code is fairly simple. The function is:
- (void)setRoomVariables:(NSArray *)myRoomVariables inRoom:(id)myRoom
{
[_smartFox send:[SetRoomVariablesRequest requestWithRoomVariables:myRoomVariables room:myRoom]];
}
its the same when I use user variables instead:
- (void)setMyUserVariables:(NSArray *)myVariables
{
[_smartFox send:[SetUserVariablesRequest requestWithUserVariables:myVariables]];
}
- (void)setRoomVariables:(NSArray *)myRoomVariables inRoom:(id)myRoom
{
[_smartFox send:[SetRoomVariablesRequest requestWithRoomVariables:myRoomVariables room:myRoom]];
}
its the same when I use user variables instead:
- (void)setMyUserVariables:(NSArray *)myVariables
{
[_smartFox send:[SetUserVariablesRequest requestWithUserVariables:myVariables]];
}
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
The behaviour is highly bizarre.
If I duplicate the request when I set 'longitude' and 'latitude', it always works fine.
If I use the properties 'longitude' and 'latitude' in the 'pin' request, it works fine.
As soon as I use another value name, it lets me set one and anything after that gets cut off
If I set 'longitude' and 'latitude' twice, like in :
that works.
Maybe its some kind of capacity issue?
I can rename 'longitude' and 'latitude' and it still works, as if the first use defines which properties I can set.
If I duplicate the request when I set 'longitude' and 'latitude', it always works fine.
If I use the properties 'longitude' and 'latitude' in the 'pin' request, it works fine.
As soon as I use another value name, it lets me set one and anything after that gets cut off
If I set 'longitude' and 'latitude' twice, like in :
Code: Select all
NSArray *tVariables = [NSArray arrayWithObjects:
[SFSUserVariable variableWithName:USER_PROP_LONGITUDE value:tLon],
[SFSUserVariable variableWithName:USER_PROP_LATITUDE value:tLat],
[SFSUserVariable variableWithName:USER_PROP_LONGITUDE value:tLon],
[SFSUserVariable variableWithName:USER_PROP_LATITUDE value:tLat],
nil];
that works.
Maybe its some kind of capacity issue?
I can rename 'longitude' and 'latitude' and it still works, as if the first use defines which properties I can set.
-
- Posts: 34
- Joined: 11 Aug 2011, 12:40
Re: SFSRoom Variables dont all update
is there a limitation on the number of properties that can be set on a user or room? or do I have to preset the number or template?
Return to “SFS2X iPhone / iPad / OSX API”
Who is online
Users browsing this forum: No registered users and 15 guests