Quote:
Originally Posted by Tigairius
I usually use a this.attr[#] serverside to store the price which can be read clientside. Then if price is edited serverside, it applies clientside as well. Basically no code duplication involved?
|
This only works for values. If your logic is complex enough to require a function, you will have to duplicate it since there is no way to pass a function as data (like you can with a value) from the client<->server (and it'd certainly be impossible to find a way to serialize a function with GS2).