- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
49 Posted Topics
Have you compared the running processin the Control panel both ways?
The compiler reads and translates the code you write. All names etc are dropped so if there is a way to read the compiled code and identify the logic, it would still not have any names or other clues to what was what.
Before worrying about putting it all together, work on the parts of the program. For instance, you have identified the record to store your data, but how are you loading user input into the record array? Solve this as you would eat an elephant, one bite at a time. In …
FlamingClaw's example is for using an editbox in a Form application. Are you creating a form or are you doing a consule application?
EXE files are compiled. The code has been removed and replaced by an instruction that operates the computer. You must get a copy of your friend's uncompiled code to review or change it.
FlamingClaw, Two thoughts on your example: 1.) i := i + 9; // does not increment by 10 2.) Using the For statement could easily lead to an error in a large body of code. Imagine coming back to this a year from with no memery of the logic. You …
It looks like only a few lines actually change. Why don't you put the graphic in a loop with the few lines that change as a separate method? You can use counters to keep track of when to begin or change the lines that require it.
There are a number of conversion functions the sysutils.pas unit that can test this for you and check out extractstrings in the Classes unit for a basic parsing function.
Another possibility would be to create a small database structure and placing the items in a database file. IF you have not explored database managment in Delphi yet, then this would be a good opportunity to do so. You may also want to reconsider the idea of user access. Many …
IS "formvar" part of Delphi or your own method? I could not find a reference for it and am not familiar with it. Either way, what is the declaration for the function? Have you looked at tstringlist? Also check out extractstrings in the Classes unit.
What is the purpose of the integers Head and tail? Are they needed? Look at how you are using them and follow the value of Flip1 using debug monitors.
Take a look at Sysutils.pas. There a number of date/time methods that manage date operations.
To save LizR the effort let me ask you: What have got thus far? Have you developed any parts of the algorithm such as how to read the file, how to store the data for use, or how to determine the distances?
I just ran across some code that declares a complex packed record: aSInt = Integer; [ICODE]entity = packed Record Enttype : byte; field2 : double; ... //continues with other standard fields and then uses this case CASE aSInt OF entlin: (linpt1, linpt2: point); entln3: (ln3pt1, ln3pt2: point); entmrk: (mrkpnt, mrkvec: …
Have you tested this? What happens? What help are you looking for?
I am working on a project for a Cad program in which I must embed data in the Cad file. The tools for doing so in the cad program allow for embedding boolean, integer, double byte and string values, one at a time. There is a lot of data and …
The unit sysUtil.pas has a number of string routines including several that can be used to search through the string to find the spaces between words and allow you to extract the words individually for each line.
I am trying to use a clientdataset without an associated Table. I am attempting to extract and edit data from a Cad program. The Cad program has an interface in which the user selects specific entities within the Cad file (lines, circles, text etc) and provides basic information and attributes …
your array is "a" with 1 through 7 as the items. You addressed it correctly in the readln (a[i]) To test element three you would use a [3] or a [i] for a variable in a loop. if (a[i] < 1) or (a[i] >7) then I suspect that your having …
I have a question for LizR here. I have read and written into Excel spreadsheets using an ADO table and Clientdataset setup. It is my thinking that this would note require Excel to work with the Excel file. The set-up for doing this takes some knowledge of ADO databases to …
I am not certain I understand what you are asking. That is to say what level of experience you have with programming in general. You mention using DB related compnenets, but it is not clear if you understand (yet) how they work There are several excellent tutorial sites: Delphi.about.com has …
Darkyere, Check out this site: [url]http://blogs.codegear.com/nickhodges/2006/08/15/26687[/url] These demonstration files are excellent tutorials for beginners on many features of Delphi including using the debugger. Since your new, it would pay to spend a day going through all of them.
[QUOTE=smorton123;748737] procedure search_for_numbers (numbers: a; user: b; var counter: integer); var subscript: integer; begin for subscript := 1 to 7 do begin if user[subscript] = numbers[subscript] then counter := counter + 1; end; end; end.[/QUOTE] It only checks the matching subscript numbers because that is what you have told it …
MAny are avilable including a lot of third party products, some cost, some are free. Start your search at Codegear and look at the product information or google delphi datases. Your choice will depend upon how it will be used. I use the ADO based database tools (Microsoft Jet / …
[QUOTE=darkyere;739879] While x<listview2.Items.Count - 1 do begin if listview2.Items[x].Caption = inttostr(randomnr) then begin randomnr := random(listview1.Items.Count -1); x := 0; end; x := x +1; end; item := listview1.Items[randomnr]; form2.image1.Picture.LoadFromFile(item.Caption); listview2.Items.Add.Caption := inttostr(randomnr); [/QUOTE] You might want to skip the while loop and try: If listview2.findcaption (1,inttostr(randomnr)), false, true, true)=nil …
The code that reacts to pressing the buttons is not included here. Can you show an onclick event code for a button? The anser to uyour problem probalby is in the detail for how you are handling button clicks.
A Stringlist is a class of Tstring. It contains a list of strings that can be accessed and managed through the various methods (add, delete, find etc..) It also allows you to separate each string using a NameValueSeparator. The character assigned to this property is used to separate any of …
I'm not sure of your intent. I visualize three compnents on the form, the list box with the user names, and two text boxes, one for names and one for passwords. IF you have a listbox that has read the nnames, then it is a simple matter for the user …
This question is too vague to answer. Can you be more specific about what you did three years ago and what you want to do now. Are you trying to modify code or are you trying to duplicate what is shown on the sample site?
Have you placed the code from pritaeas in your MyButtonClick method?
I have a recurring problem: On some days, it appears that Delphi has problems with identifying some of the files in my "Uses" section. Certain files will be underscored in red zig-zag and identified in the structure window as "cannot resolve unit name ...". If I right click the unit …
A couple of questions come to mind: Are you having this problem in design mode or at run time? Have you opened your dataset? Have you correctly set the current record to the one you want? I am currently writing my first Delphi Database program but am having some other …
I am writing a program that uses two modules, a VCL win32 application module and a Datamodule to contain ADO components and a clientdataset to work the data in memory. When compiling the code fails with the message Raised Exception class EAccessViolation in Module EstimateMngr.exe. The debugger shows failrue in …
I am not familiar with Absolue Database. My first thought would be to try the same thing connecting to another database (BDE or ADO) and see if you still have the eror. How are you connecting between the grid, the datasource, Table and the database? I everyting wired up correctly?
Your question is too vague. Are you asking how to connect to a database, or how to structture the data? You may want to start by identifying what needs to be tracked. Such a list will certainly help the programmer plan the work. The programmer should know the how to …
IF your are new to Delphi, I strongly recommend you visit [url]http://blogs.codegear.com/nickhodges/index.php?p=26687[/url] for some very good demonstrations on h0ow to work within it. Good Lcuk.
I am trying to compile some code using BDS2006 and have received the following err: [Pascal Fatal Error] Variants.pas (1035): F2092 program or unit 'Variant' recursively uses itself. The code is highlighted by the debugger at the end of line 1035 which is the final end; statement for the Procedure …
Try this site for some really good & simple examples of how to handle menus and their associated actions: [url]http://blogs.codegear.com/nickhodges/index.php?p=26687[/url]
It sounds like you are getting into some of the more advanced concepts in programming and how you proceed depends upon your level of experience. Before doing anything, make certain you understand some of your options. For instance, check out items in ExplainThat's post above. Also read up on using …
1. Is your datafile arranged in and ordered sequewnce? The binary search begins generally as you have, finding the high , low and middle values. The student ID must be evaluated against the middle value to determine if it is higher or lower. ONce that is determined either the low …
The SysUtils.pas file contains a function as follows: isLeapYear (year : word) : boolean; It also contains a Monthdays constant which is a two dimensional array. The first dimension is boolean so it is either true or false with false being the number of days for each month in a …
FormatFloat is a function returning a string. The code is in the SysUtils Unit so you must verify it is included in the Uses statement. The GTBox.text should be changed to the name of your Tedit (TEdit1 ?) . You would enter the statement whereever you are assigning the text …
There is not enough code shown to answer. How are you determining that r begins at 28? Can you show us the code for STekoop[1,r]?
editbox2.value := editbox1.value + editbox2.value; invalidate; place these two lines in the code where thecalculation is required. Invalidate will cause the editboxes to be re-diplayed with the current values. Note that the "value" tion is a place holder for whatever variable you are using to hold the value. If you …
This might help: The property CaretPos will tell you which line the cursor has selected. (CaretPos.y) I have not tested it to see if it will point to a line beyond the end of the text or not. The number of lines in the Tmemo should be in the "lines" …
Check out [url]http://www.marcocantu.com/code/md5/default.htm[/url]. Marco Cantu writes a good deal about working with dates in chapters 2 & 3 of his book and code samples are available on his site.
I intend to write a new Actionlist component to meet special requirements of a program. The list will be limited to 20 items that must also include several additional properties in each ActionListItem. My question is were can I find samples (or can someone explain) how to create an Actionlist …
I have created several new components but cannot get them to appear in the tool palette. (BDS2006). The components are created in a package that compiles. The package includes the register procedure in the Interface and the implementation sections as follows: Procedure Register; Begin RegisterComponents('JESComp', [TcolorButton, TAButton, TBButton, TCButton, TDButton, …
The End.