|
||||||
| Delphi/Python Forum for discussing Borland Delphi and Python coding techniques, tips and tricks. Ask your python questions here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hey, i am always asked tons of questions from friends whenever i tell them about Delphi. And i was wondering if anyone could give me the answers so i can know and tell them
....-- Is it low level programming? If so, how low is it :P. -- Can it actually be used for a career? Now to my real question :P... I need some help on Delphi... FIRST QUESTION I have never been able to sucessfully load tstrings for some reason... And i need it because i'm trying to access a ini.readsectionvalues. It always says, "abstract error". Here is an example... Code:
procedure TForm1.Button1Click(Sender: TObject);
var
strngs: tstrings;
begin
strngs := tstrings.Create;
strngs.Add('Test');
Label1.Caption := strngs.Strings[1];
strngs.free;
end;
end.
Second Question I have it open a popupmenu while they are typing like if they put 'DEF' then it opens a popup and if they click it, it will add 'INE ' to the end. My problem is that i want users to be able to type while the popup is up... For some reason, it stops you from being able to type until you close the popup... Any ways to fix this? ---- Btw, i'm planning on making sort of an IDE for a scripting program. It has several DEFINE variables and FUNCTIONS so i figure it might help to have a listbox saying where they all are... Also gonna add some extra features :P. |
| Sponsored Links |
|
|
|
|||||
|
Delphi generally functions as a high-level language, but you can embed assembly code if needed. Also, it is one of the languages I use almost daily in my job.
For first question: I believe you need Label1.Caption := strngs[1];
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
it's a very powerful and flexible language, unfortunately due it not being particularly well used it's not particularly lucrative
You can get away with using it like a more database friendly version of old visual basic or it can be used in proper enterprise environments. The problem you are having with you first question, is firstly that you're requesting strings[1] rather than strings[0] Delphi is a 0 based language so the first element will always be 0. This means to loop through stuff it's always to the items.count-1 The second problem seems to be related to the Tstrings object, you're far better off using Tstringlist, mainly because that's what the delphi helpfiles seem to recommend, and I've seen little reason to argue with them. The second one sounds rather more complicated, I think popup menus will only respond to the first valid keystroke that matches the first letter of an option on the menu. Honestly, I don't think a generic popup menu is going to do what you want, and off the top of my head I've not got an instant solution, though I may have misunderstood what you're trying to do |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A couple of beginner questions | Nille | C# Programming | 5 | 01-16-2008 03:29 AM |
| Newbie questions regarding inputing a sentence | Emir | C and C++ | 3 | 12-29-2007 06:21 PM |
| questions about java games | stack | Java Help | 3 | 07-02-2007 05:35 PM |
| A few basic website questions | ehudgershon | General Programming | 4 | 06-11-2007 02:20 PM |
| Where to ask vBullentin questions | PC101 | Website Design | 4 | 09-19-2006 04:16 PM |