Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / [LOCKED] programming project for school

Author
Message
djmaster
User Banned
Posted: 13th Jun 2008 19:57 Edited at: 13th Jun 2008 22:58
edit: forget the old stuff beacause i called my teacher and he said i really need a simpler application to make so i got this: ACCOUNT MANAGER

now i need to know how to make the interface that will show name,last name,where he lives and how much money he has and simple to edit info interface,and that it can read(or make own and read) text files and get the data it needs to show out of it and a selection list so you can select wich account to modify+ need to be able to make a new one or edit,delete and save

so first thing how to make a new entry,if i do it i will ask more,for now i just need to know how can i make that?

Soldier of Fortune Episode 1
djmaster
User Banned
Posted: 13th Jun 2008 20:24
no,i just want to know the basics of making stuff,i can fit the parameters myself and make all the drawing and other coding work

Soldier of Fortune Episode 1
Tone Dialer
Valued Member
19
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 14th Jun 2008 11:00
djmaster:

Not too difficult a project, first thing is you need to decide is how many fields each entry in the database has, what type of data, (numeric or text) and maximum character length (field size), name each one eg. Name (25 chr, text), Address#1 (30 chr, text), Address#2..... Account Balance (numeric).
Take a look at the DBPro help files for information on the file commands 'open to write' and 'open to read' these will give you a clue how to continue.

djmaster
User Banned
Posted: 14th Jun 2008 11:24
first i need to know how to make a button NEW to click it and to make a new entry on the side list

Soldier of Fortune Episode 1
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Jun 2008 14:02
things to serach for.

1. how to make a button and click it.
2. how to make, add, remove, load and save arrays
3. how to input/make input box and floats values.
3. postioning text.

Dark Physics makes any hot drink go cold.
djmaster
User Banned
Posted: 14th Jun 2008 14:16 Edited at: 14th Jun 2008 14:36
is it so hard for somebody to tell me how to make it? i searched MAK BUTTON,found nothing

edit: ok i made this now,when i click the button,the profile appears,now how to make boxes to type in,or how to make when i click on the button i need to enter name and last name and click ok to make a new button at side



Soldier of Fortune Episode 1
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Jun 2008 14:46
for input boxes there this one in code snippets

http://forum.thegamecreators.com/?m=forum_view&t=75153&b=6

and this

http://forum.thegamecreators.com/?m=forum_view&t=117790&b=6

Dark Physics makes any hot drink go cold.
djmaster
User Banned
Posted: 14th Jun 2008 14:57
now i dont know how to get it to work,maybe somebody explain how to insert it in my code? im new to darkbasic so i dont have any idea

Soldier of Fortune Episode 1
djmaster
User Banned
Posted: 14th Jun 2008 16:00
i understand what i did but the stuff im trying to insert is pretty complex,too much for me at this stage so is there any way to easily insert it?

Soldier of Fortune Episode 1
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Jun 2008 16:08
from your question at the beginning it sounds like all your teacher wants you to show is can you input the person name and how much they might have and update it, but not using any GUI unless you know how to do it.

Also what computer language do you normal use at school.

Dark Physics makes any hot drink go cold.
djmaster
User Banned
Posted: 14th Jun 2008 16:12
well we have c+,pascal and darkbasic but since i know a little bit of darkbasic i chose it

Soldier of Fortune Episode 1
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Jun 2008 16:22
well if you look at the old system that where a 8 bit clocked at 4hrezts and had no graphics they did it the very sinple way.

like a menu would be printed like this.

print "1 - new"
print "2 - edit"
print "3 - delete"

then you write some code that would work out which number key you had pressed. ascii code for 1 = 49.

and the above idea is already in some of the DBPro demos.

Dark Physics makes any hot drink go cold.
djmaster
User Banned
Posted: 14th Jun 2008 16:40
yeah but now how to make the Name,Last Name that appears to make it editable???

Soldier of Fortune Episode 1
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Jun 2008 17:08 Edited at: 14th Jun 2008 17:23
are you using a dim statement yet, if so some thing like this,

dim person_name$(size,3)

`which if size = 1

person_name$(1,0) could have a first name in it.
input first_name$
print first_name$
print "correct y/n"
if no go back to input.
person_name$(1,0)=first_name$
person_name$(1,1) could have a last name in it.
person_name$(1,2) could have a amount.

If you had the Dark Basic Book, I think that will tell you to right down what you want the code to do and which order.
then turn those statements into working code.

so it could be
1. show a menu
2. code to pick and item in the menu.
3. show the first menu item
4. code to show input of name if it the first one.
5. code to get the first name.

and so on...


wonder what grade I'll get for this.

edit
even if you don't get any code going, if you have shown how to go about getting there with order of variables and a flow chart in how you think the code will run.

Dark Physics makes any hot drink go cold.
djmaster
User Banned
Posted: 14th Jun 2008 18:48 Edited at: 14th Jun 2008 18:54
i did this now but doesent work so how do i get it to work??



edit: i also made a picture of how it would finally look,but more stylish buttons ect.

and one more question,how do i set a picture for background???

Soldier of Fortune Episode 1

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Jun 2008 19:08
I was posting work it out code, not cut and paste code.

Dark Physics makes any hot drink go cold.
djmaster
User Banned
Posted: 14th Jun 2008 19:09 Edited at: 14th Jun 2008 19:12
ive been around for a year,always on fps creator forums so dont say that,i just actually started to use darkbasic,did never anything before,and i tried to read tutorials but i cant find any that explains what i want,and no i dont know what the compiler knows beacause i NEVER USED IT BEFORE AND I JUST STARTED MAKING STUFF!!! when you will learn to read,this is just useless,im out of here if everybodys rude and cant simply say its wrong and you need to fix that and that,read here how to,no you rather go yell,this is just pointless...

edit:

i did some modifications but how do i make the 8th line do the rest of the code i stated one line later???



Soldier of Fortune Episode 1
djmaster
User Banned
Posted: 14th Jun 2008 19:40
if nobody wants to help,fine,i quit

Current FPSC Projects:
Lion 3D (Wolf3D remake)10% done
Unknown World 25% done
djmaster
User Banned
Posted: 14th Jun 2008 20:52
i just asked how to do this: make the 8th line activate the rest of the code and you started invading with old topics and crap,so if somebody wants to explain what i asked,please i need help to finish this

Current FPSC Projects:
Lion 3D (Wolf3D remake)10% done
Unknown World 25% done
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 14th Jun 2008 21:07 Edited at: 14th Jun 2008 21:08
Probably, you should slow your roll a little, and write out exactly what you are going to code first. Then, ask yourself what it would take to do that. If nothing else, it would tell you where to focus your efforts in learning the how part.

The main intent of the exercise is to force you to engineer it. You are trying to write it as a finished product, in situ. That's not lazy (!), but it is not a very workable engineering methodology, either.

The account type should be your first order of business. So far, you are keeping all of the names in one multi-dimension array. It would probably be best not to do it that way. For example:



The reason for this will become more apparent as you start adding accounts. (You will have to redimension alot of arrays, and that gets messy very quickly.) If the account is self-contained (like a database table that is the result of a query), you will only need to manage one single-dimension array. This also simplifies the serialization enormously over any alternative approach.

Rather than make a GUI for something that you are still designing, take the approach that HowDo is advocating using simple text input. Once you have that working (with serialization to/from files), then you can put a pretty GUI on it.

If you make the GUI first, you will have to go back and modify it alot as you change the account parameters, etc.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Jun 2008 21:10
Start here, and read sections 1 through 4 - there's everything you need for this school project in there somewhere.

Now to stop this escalating further, I'm going to lock this thread - just realise that no-one is going to write your homework for you.

Login to post a reply

Server time is: 2024-11-25 01:31:56
Your offset time is: 2024-11-25 01:31:56