Vault9 Modding Vault9 Graphics Vault9 Code Vault9 Net Vault9 OS Vault9 Gaming Vault9 ChillZone Vault9 Tech Vault9 Archives       Vault9 Global9       Vault9 Fusion     Vault9 Blog     Vault9 Network          
 

Please Note!

This is a read-only board, no new topics or registrations are allowed. The Code Vault has moved to http://forums.vault9.net - Be sure to find more information there!


 
Reply to this topicStart new topic
> problem with java applet, help wanted
post Jul 12 2005, 10:37 AM
Post #1


What, me worry ?
Group Icon

Group: Regular Member
Posts: 2,095
Joined: 22-February 03
From: ape Town
Member No.: 894




haai
i have a project due for the 18th july and i have been at it for quite some time
it is an 'mark database' aimed at teachers to store marks and work out averages, its not much but i know im not an adept programmer

i have asked many people for help thus far and i thank them, but i still have a few things i need to do before it is complete.
so far it is able to store records in a text file, however i still don't know how to make it edit or delete entries.
so anyone with any help, it would be really appreciated
markdb on yousendit


--------------------
<center>user posted image</center>

got justice ?
dial the karma police today!
User is offlineProfile CardPM
+Quote PostGo to the top of the page
post Jul 12 2005, 10:37 AM
Post #


Member


Group: Administration

Joined: Today, 05:54 PM





Quote PostGo to the top of the page
post Jul 13 2005, 03:30 PM
Post #2


Senior Member
Group Icon

Group: Regular Member
Posts: 474
Joined: 1-December 03
From: JHB - West Side
Member No.: 2,296

Sex: Male



What's it written in?

I have no idea how your text file is handled, but the easiest would be to read the entire file to memory, remove/edit the entries you don't want, and rewrite the entire file.


--------------------
Every person takes the limits of their own field of vision for the limits of the world. - Arthur Schopenhauer
User is offlineProfile CardPM
+Quote PostGo to the top of the page
post Jul 13 2005, 05:17 PM
Post #3


What, me worry ?
Group Icon

Group: Regular Member
Posts: 2,095
Joined: 22-February 03
From: ape Town
Member No.: 894




it's written in java
its a pretty simple application however i do not have the means to implement the editing of entries with a gui
in other words i just dont know how to do it in code sad.gif
User is offlineProfile CardPM
+Quote PostGo to the top of the page
post Jul 14 2005, 04:06 AM
Post #4


Senior Member
Group Icon

Group: Regular Member
Posts: 253
Joined: 24-April 03
Member No.: 1,091

Sex: Female



blood105, still need help ?
User is offlineProfile CardPM
+Quote PostGo to the top of the page
post Jul 14 2005, 08:30 AM
Post #5


What, me worry ?
Group Icon

Group: Regular Member
Posts: 2,095
Joined: 22-February 03
From: ape Town
Member No.: 894




yes please, i would really appreciate it
User is offlineProfile CardPM
+Quote PostGo to the top of the page
post Jul 14 2005, 11:16 AM
Post #6


Senior Member
Group Icon

Group: Regular Member
Posts: 474
Joined: 1-December 03
From: JHB - West Side
Member No.: 2,296

Sex: Male



1st off -> NO GUI!?!?

eish ...

---
Record Selection
---
Well you have to have a way of selecting what entry is to be edited or deleted.

The simplest, but very user-unfriendly way, would be to just ask what record number should be edited.

The user says they want to edit record # X.

Then you've selected your record - it's the Xth one in the file - easy dry.gif

Slightly better way: Make it a Next/Previous type of thing. Select entry 1. If user wants Next - just go to entry 2, 3, 4... whatever. Remember to check if the record exists (no record #300, so can't go next @ record #299, and can't go previous @ #1)

---
To Edit
---
Just ask for every bit of information over. What's the new name, what's the new surname, what's the new mark... Messy but works.

Fancier would be to have a little menu asking "What do you want to change?" Then changing just that.
eg:
1: Change Name
2: Change Surname
3: Change Mark
4: Save Changes

---
Modifying text file
---
A text file is VERY hard to actually just 'edit', so the easiest is to read everything into memory, change it to whatever, and resave the whole file.

Another way to do it, would be to create a new file, entry by entry. So you create a new text file entry by entry, just changing the entries you want to as you go past them. Deleting an entry is just a matter of NOT writing it to the new text file then.

This post has been edited by PyroSA: Jul 14 2005, 11:18 AM
User is offlineProfile CardPM
+Quote PostGo to the top of the page

Reply to this topicStart new topic

Collapse

> Similar Topics

Topic Title Replies Topic Starter Views Last Action
ASP News->GridView Hidden Column Problem (And Two Common Solutions) 0 Vault9 578 Jul 9 2006, 09:38 PM
Last post by: Vault9
Apache coding problem 1 hempster 2,283 Oct 17 2005, 12:20 PM
Last post by: Evernight
Problem with Nexstar 3 0 Klepht 466 Jul 6 2005, 05:19 AM
Last post by: Klepht
Nvidia 77.72 driver video problem 4 Britz 2,146 Jul 4 2005, 03:08 AM
Last post by: IK200
Windows 2003 SBS - Exchange problem 3 Sureshot 441 Jul 1 2005, 03:32 AM
Last post by: aquadog


 



- Lo-Fi Version Time is now: 21st March 2010 - 05:54 PM
Privacy Policy
South Africa's Top Sites Kinetiq