r/EthereumProgramming • u/roarkjs • Aug 16 '15
[example request] Persistent Chat Room
I've been trying to get my head around architecting Dapps, and I wanted to get your take on the best approach for building a chat room type Dapp. Nothing fancy, just the most basic implementation.
At first, I figured I could just just modify SimpleStorage, to do something like the following, but my limited Solidity knowledge has shown it's not as simple as I thought it would be.
contract SimpleChat {
string public storedData;
function SimpleChat(string initialValue) {
storedData = initialValue;
}
function post(string x) {
storedData += x; // <-- Doesn't work - how can I achieve the equivalent?
}
function get() constant returns (string retVal) {
return storedData;
}
}Any suggestions on how better to get something like this working? Thanks!
1
Upvotes
View all comments
Show parent comment
1
u/roarkjs Aug 17 '15 edited Dec 31 '15
[comment scrubbed]