Log in

View Full Version : IMPORTANT: Please Read!



Coh3n
02-19-2010, 09:36 PM
Hey guys,

For those of you who read/was aware of the problem I was having, it was fixed by reinstalling Windows. Seems extreme, but it needed to be done anyway. Thanks to whichever mod changed the title. :)

Now, I may as well use this thread for people to test/give suggestions on the program. I developed this program for a review assignment for my Grade 12 computer science class. I have already got some awesome feedback from Smartzkid and mixster. Both who's suggestions I'm going to use.

Basically this program sorts a list of inputted/loaded items and calculated their depreciated value over time, their new value, and totals. The items can be sorted alphabetically, by age category, from oldest to newest and vise versa. All these features are based on the criteria of the assignment.

Anyway, thanks in advance for anyone who decides to test it out, it's greatly appreciated.

Coh3n

Bionicle
02-19-2010, 09:45 PM
Any chance of seeing the script?

Naum
02-19-2010, 09:48 PM
http://www.villavu.com/forum/showthread.php?t=47866

Coh3n
02-19-2010, 10:03 PM
Any chance of seeing the script?
Yeah, I'll edit the first post.


http://www.villavu.com/forum/showthread.php?t=47866
Thanks, but got the same error. :(

senrath
02-19-2010, 10:14 PM
Huh. That's odd. It runs fine for me with 3.23, and my laptop is running XP as well. SP3 if that makes a difference.

Bionicle
02-19-2010, 10:19 PM
Weird...it runs for me fine, I'm running XP...home edition i think.

What is the error you're getting when you try to run it?

mixster
02-19-2010, 10:34 PM
Although not an ideal solution, converting every "StrToInt" or "StrToFloat" to "StrToIntDef" then adding error handling would most likely solve the problem. On the other hand, you could add debugging writeln's to see which bit throws the error (confident it will be a type conversion though) and then just adding the Def to that or encasing it in a try..except..end block. I don't get the error, so can't try anything myself.

However, I will say the the form should expand else the print box needs to be bigger as it's a pain to read through at the moment.

Coh3n
02-20-2010, 05:45 AM
@senrath and bionicle: It compiles fine for me. The error comes when you choose to sort by age category and then try to print the report. Did you try that or did you just see if it compiles?

@mixster: I have figured out where the error is, but I don't understand why it would give it. Again, it sorts fine, I don't get the error when using my desktop computer. Only on my laptop does it occur. Thus, why I'm so confused/frustrated. Lol. Oh and yeah, I think I will expand the form/memo box. Thanks. :)

EDIT: The error is in the ByAge_FindTotals function lines 34-35.

for i := 0 to hi do
temp := temp + StrToFloat(age[i]);

Also, I have them all as strings so I can make it show the extra 0 or .00 because I'm working with money. It's also more convenient for all the reports. I couldn't find any other way of doing it.

Smartzkid
02-20-2010, 06:23 AM
Since you figured out the bug, I'll give my evaluation ;)

I like it! Smooth interface, professional feel. Maybe not so much the 'tip' on adding/loading icons. Perhaps there is a better way to display this information?

The biggest improvement I can recommend is that you make the search button find partial matches. (being able to search on Enter would be awesome as well!)

What sort of CompSci class is this?

senrath
02-20-2010, 07:56 AM
I had it print the the report in all of the different sorts. It didn't give me any error.

Coh3n
02-20-2010, 07:41 PM
Since you figured out the bug, I'll give my evaluation ;)

I like it! Smooth interface, professional feel. Maybe not so much the 'tip' on adding/loading icons. Perhaps there is a better way to display this information?

The biggest improvement I can recommend is that you make the search button find partial matches. (being able to search on Enter would be awesome as well!)

What sort of CompSci class is this?
Thanks! :) The 'tip' you're talking about was a last minute addition that I needed because I thought he was marking the assignment that day. Turns out we have this weekend to finish, so I can fix that up. I think I'm going to make a Help button, that way I can make it much more detailed.

The partial matches you're talking about is actually in the "bonus" section of the assignment. It would be something cool to add, and if I get the time, I'll give it a go.

This is Grade 12 computer science and it's a review assignment from stuff we were suppose to learn in the Grade 11 comp sci. However, I didn't take grade 11, I skipped straight to grade 12 (I didn't want to learn all the basics of programming all over again). The other people in my class learned turing in grade 11, and my teacher didn't want me to have to learn it for one assignment, so he let me write it in the language I'm most comfortable with.

On monday we start learning Java and OOP, which is why I took the class in the first place. :p


I had it print the the report in all of the different sorts. It didn't give me any error.
Okay, that's exactly what it's suppose to do. :p I already reinstalled Windows on my laptop (it had a really sketchy version to begin with), so maybe starting fresh will solve my issue.

EDIT: Well reinstalling Windows got rid of the error, so I'm all good to go. :) Any feedback about the program in general that people have is greatly appreciated.

Smartzkid
02-20-2010, 08:39 PM
Crazy ideas.. you could skin it and give it a super slick interface!

Coh3n
02-20-2010, 09:27 PM
Crazy ideas.. you could skin it and give it a super slick interface!
Not sure what you mean. Lol :o

Smartzkid
02-20-2010, 09:40 PM
MainForm.BorderStyle := bsNone;

Then add your own title bar, etc. This would allow you to be very innovative with your UI; you could even create something like Microsoft Office's shorcut bar (which resides in the title bar).

Coh3n
02-20-2010, 10:00 PM
MainForm.BorderStyle := bsNone;

Then add your own title bar, etc. This would allow you to be very innovative with your UI; you could even create something like Microsoft Office's shorcut bar (which resides in the title bar).
Oh, like create my own border? It's possible and wouldn't be hard. There's a lot I can do with images (if you've seen my Draynor Chop N' Bank form). Do you mean the Quick Access toolbar in MO?

This stuff may be too fancy. After all, the rest of my class isn't even using a GUI. Their whole program is reading keyboard strokes. Lol.

EDIT: I uploaded a new .rar. I made a bunch of changes looks-wise. Oh and so you don't think it's a bug, the instructions button isn't suppose to do anything yet.

Rick
02-20-2010, 11:20 PM
Looks very nice.

I would use this:



{************************************************* ******************************
procedure OnKeyPress(Sender: TObject; var Key: Char);
By: SKy Scripter.
Description: Keeps stupid people from typing in the combobox.
************************************************** *****************************}

procedure OnKeyPress(Sender: TObject; var Key: Char);
begin
Key := Chr(VK_CANCEL);
end;


to prevent typing in Combo Boxes and prevent the Invalid Sorting Choice error box.
You could also adapt that to allow the user to press enter in the search box.

Partial matches would be nice also.

Another thing is if the user enters the current year as 2010, and the Items year as anything higher, the Item becomes invalid, maybe add a check comparing Current year to items year ?

You could add the option to save the items.

Good work, looks incredible :)

Naum
02-20-2010, 11:27 PM
Or ComboBox.ReadOnly := True, would also suffice along with ComboBox.Enabled := False.

Coh3n
02-21-2010, 04:58 AM
Looks very nice.

I would use this:



{************************************************* ******************************
procedure OnKeyPress(Sender: TObject; var Key: Char);
By: SKy Scripter.
Description: Keeps stupid people from typing in the combobox.
************************************************** *****************************}

procedure OnKeyPress(Sender: TObject; var Key: Char);
begin
Key := Chr(VK_CANCEL);
end;


to prevent typing in Combo Boxes and prevent the Invalid Sorting Choice error box.
You could also adapt that to allow the user to press enter in the search box. I'm definitely going to use this, thanks!

Partial matches would be nice also. Yeah, it's an extra feature I'd like to add if I get time.

Another thing is if the user enters the current year as 2010, and the Items year as anything higher, the Item becomes invalid, maybe add a check comparing Current year to items year ? When it sorts the items, it checks if the date is between 0 and the current date edit box. I also plan on having a ShowMessage for any invalid entries, I just haven't gotten to it yet. :p

You could add the option to save the items. Yeah, another extra feature that would be nice if I have the time to add it.

Good work, looks incredible :) Thanks! :D
Comments in red. ;)


Or ComboBox.ReadOnly := True, would also suffice along with ComboBox.Enabled := False.
I wouldn't want to disable it though cause I still want people to choose the given options. I've never used ReadOnly before, but it seems like it'd work.

EDIT: I uploaded the new version. It's probably the finished one. There was a lot I couldn't do just because I don't have time. Thanks everyone for their ideas and feedback. I really appreciate it. :)