This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for Save it

Return to Save it

erdelferdelf

2012/6/30

nice work, but when I press shift it writes shift
SPowerSPower

2012/6/30

Yeah, haven't got time to fix that. Will do so now.
tylerstylers

2012/6/30

It the same a my password app
tylerstylers

2012/6/30

*as my password app
A new version of this scenario was uploaded on Sat Jun 30 14:04:56 UTC 2012 Bug fixes in: -the UI -the text field -little things in the code
SPowerSPower

2012/6/30

@tylers It was inspired by that, but the code is my own :). And I haven't got the 'I forgot my password' feature. While I haven't added it, you'll have to ask me for your password, since only I have access to it :). Others of course need your greenfoot account password to access your account on this app, so I think it is quite safe.
A new version of this scenario was uploaded on Sat Jun 30 14:19:53 UTC 2012 Smaller text in the text fields; it was a little to big.
A new version of this scenario was uploaded on Sat Jun 30 14:44:33 UTC 2012 Added cancel buttons
YomanYoman

2012/6/30

how is my pic there!!! this is cool stuff where get the spilli background?
SPowerSPower

2012/6/30

1. Using the UserInfo class, you can get access to data of the user (if he's logged in), including it's picture 2. thanks. 3. Look at Spilli's account, he's got a scenario Matrix Effect.
SPowerSPower

2012/6/30

@Yoman could you please click 'like' ? :)
A new version of this scenario was uploaded on Mon Jul 02 09:16:12 UTC 2012 -Added banning: after entering a wrong password 3 times, you have to wait 1 hour. -Added hatching of the passwords: way more safe, but it's impossible to unhash the passwords. REMEBER YOUR PASSWORD! -Added the placeholder in the text fields -Fixed little bugs in the UI
A new version of this scenario was uploaded on Mon Jul 02 09:49:21 UTC 2012 Bug fixes with the banning showing the wrong minutes left.
-nic--nic-

2012/7/2

this is really cool:D LIKE!
-nic--nic-

2012/7/2

this is really cool:D LIKE!
SPowerSPower

2012/7/2

Thanks!
SPowerSPower

2012/7/2

Yes busch2207, I've thought about the maximum of 50 characters in the info: it will remove parts of it when it's to long.
YomanYoman

2012/7/3

... I forgot the password... is there any way to recover it?
SPowerSPower

2012/7/4

No, there's no way.
A new version of this scenario was uploaded on Wed Jul 04 12:02:10 UTC 2012 Optimisations
SpilliSpilli

2012/7/4

Quite cool to see something I made quite a while ago been used again. :)
what's the password?
SPowerSPower

2012/7/5

If you haven't changed it yet, you must press enter immediately.
SPowerSPower

2012/7/5

Looks like you've changed it: there is no way to get the password, why didn't you remember it?
YomanYoman

2012/7/5

I think this is really neat stuff. i am making a library app, like where you log in, and see which book you've loged out, see the catalog etc. I am a total beginner in java, so i was wondering how you made it so that the program connected with the greenfoot server and into the user's account. because in my thing, everyone who uses it has an account ould you reply on my library page> Thanx!
erdelferdelf

2012/7/6

You should read the new documentary, with the latest greenfoot update the class Userinfo is usable, which allows you to use a few datas of the user
SPowerSPower

2012/7/6

@Yoman that's true, but you forgot to tell that the methods take some time to do: it looks like your program stops for a while. @Yoman take a look at those courses: http://www.greenfoot.org/collections/321 There is a course about the UserInfo class.
SPowerSPower

2012/7/6

Sorry, the first @ should be @erdelf
YomanYoman

2012/7/7

thanks! i didn't know there were courses...
YomanYoman

2012/7/7

but which course is the user info one? should i download the pdf or not
SPowerSPower

2012/7/7

Yes, the snake avoider is the UserInfo course
gusbus123gusbus123

2012/8/7

you forgot to check the escape and delete button.
A new version of this scenario was uploaded on Tue Aug 07 12:00:00 UTC 2012 Bug fix in TextField class
NXT45NXT45

2012/10/3

what is the password?
-nic--nic-

2012/10/3

@NXT45 its empty just press enter: The standard password is now empty, so press enter directly. After that, you can change it for yourself.
tylerstylers

2012/12/22

when you get your password wrong 3 times it crashes when you reset.
tylerstylers

2012/12/22

this is the error: java.lang.NullPointerException at BeginWorld.textFieldIsDoneWithText(BeginWorld.java:128) at TextField.addInput(TextField.java:102) at TextField.act(TextField.java:93) at greenfoot.core.Simulation.actActor(Simulation.java:565) at greenfoot.core.Simulation.runOneLoop(Simulation.java:523) at greenfoot.core.Simulation.runContent(Simulation.java:213) at greenfoot.core.Simulation.run(Simulation.java:203)
SPowerSPower

2012/12/22

I'll look at it right now.
SPowerSPower

2012/12/22

Does it happen immediately when you reset it?
tylerstylers

2012/12/22

no when you click enter
danpostdanpost

2012/12/22

It may be that UserInfo is not available (which may occur even when a user is logged in). Try either saving the user name when you initially check for user login, or use 'isStorageAvailable' before using 'getUserName'.
shrucis1shrucis1

2013/11/11

Notice this little snippet of code: if (this.name.equals("SPower")) { Button butt = new Button(ADMIN_BUTTON); butt.setResponder(this); addObject(butt, getWidth() /2, getHeight() /2 +100); } that gives you the 'Admin Button' if your username is SPower. And this: public void banUser() { if (this.info != null) { this.info.setString(BANNING_INDEX, "" + System.currentTimeMillis()); this.info.store(); } }
SPowerSPower

2013/11/11

Really, I don't think that's bad. Your password is hashed, so I can't access it (you can't un-hash something). And also, banning a user only happens when you enter the wrong password too many times. Ok with all that? And if I wanted to use it to my own advantage, why would I post the source?
shrucis1shrucis1

2013/11/11

I don't quite understand what you mean when you say it's hashed, unless Greenfoot does that automatically when you store data, because it seems like it's just storing the password as a regular string. Regardless, it's not like anyone is storing important data on this scenario (unless they were stupid enough to use their greenfoot account password for this password) and I was just pointing out that it seems you have total control. I didn't mean to offend you in any way. Also, are people allowed to use your 'Saver' and 'Scoreboard' classes if they cite credit? Greenfoot seems pretty open with people sharing code for reuse in different context, although you can get a project removed for plagiarism.
SPowerSPower

2013/11/11

Well, hashing is essentially turning a lot of data into a small form, which is almost impossible to crack, because a small change results in a completely different hash (The code for to hash the passwords is in the Coder class). This means that you can only compare the hash of the entered password to the stored one, and check if they are the same: the same data always has the same hash. And I wasn't really offended :) And yes, of course you may use the classes! That's why I posted the source! And ScoreBoard is from the greenfoot team, not me. And if you want to know more about hashing, I saw a good video about it: https://www.youtube.com/watch?v=b4b8ktEV4Bg
danpostdanpost

2013/11/11

Only the owner of the scenario has access to other users UserInfo data. This does not mean that the scenario cannot be programmed to share some or all information of one user with another. My 'Private Messaging' scenario will display the names and profile pics of any user that has used the app; however restricts the sharing of the data stored (the 'score' field, the ten 'int' fields, and the five 'String' fields) to just one String field; and then, only if certain conditions exist (that communication is intended between the two users). I am the only one who can access all communications between the users because I wrote and uploaded the scenario onto the site. All in all, as far as total control, I would say that, yes, the author (or uploader) of a scenario has total access to all UserInfo data and controls what information is shared between users. The only thing the author cannot do (well, not very easily), is change what information is stored in the UserInfo data of other users. An author can program the scenario to alter the data for a user when they run the scenario while logged onto the site. Even if data is encoded, I cannot see how the key would not be accessible to the author (it would either have to be a programmed constant or it would have to be stored somewhere within the UserInfo data).
shrucis1shrucis1

2013/11/11

Thanks SPower! And danpost, I was just pointing out that he had total control; I understand how it works.
RidicolasRidicolas

2016/11/25

it says I'm logged out even though I'm not