Jump to content

ewong

Members
  • Content Count

    25
  • Joined

  • Last visited

Everything posted by ewong

  1. ewong

    BDE Installing

    Hi, Having finally gotten a new computer, I installed Delphi 12.0 and am in the process of installing my other packages. I installed BDEInstall for Delphi 12.0, but I am having trouble finding the BDE components. Now thinking about it, I suspect the BDEInstall for 12.0 *isn't* the BDE components install but the BDEAdmin install. I searched the web and came across a Delphi-Praxis link that states the BDE Components can be found in my.embarcadero.com. I don't see the BDEComp install anywhere. Can someone clarify where it is? I even searched https://cc.embarcadero.com/results.aspx?keywords=bde but getting Gateway timeout errors. Thanks Ed
  2. ewong

    BDE Installing

    Company is still using Dbase and I wish to move to SQL.
  3. ewong

    BDE Installing

    Nevermind... apparently it was supposed to be in the bin/ directory of Delphi. Sorry for the noise. Ed
  4. ewong

    BDE + 10.3 and error $210C

    Hi, I had to dig up an old XE project that required to access a DBF file. After installing the BDE installer for 10.3, and running the program, I came across the error $210C. According to [1], it means that 10.3 is picking up multiple versions of IDAPI32.dll. Since I also have dBasePlus installed, I probably do have multiple idapi32.dll. Is it possible to tell 10.3 to use a specific IDAPI32.dll file? Thanks Edmund [1] - http://www.delphigroups.info/2/08/355066.html
  5. ewong

    BDE + 10.3 and error $210C

    I don't know if you'd believe this but I actually 'solved' (I think) my problem by going into the registry and taking a look at which path was used. As I had already a BDE installed before and installing the 10.3 BDE added a new Borland Shared in my Program Files directory. I went to HKLM\Software\Winw6432Node\Borland\Database Engine, and noticed that CONFIGFILE01 key was pointing to c:\ProgramData\Common Files\Borland\BDE\IDAPI.CFG, whereas DLLPATH was c:\program files (x86)\Common Files\Borland Shared\BDE. I removed the "Shared" and now both 10.2 and 10.3 can run. Planning to remove the Borland Shared directory in a bit after a bit of testing. Thanks Ed
  6. Hi, I have an application which goes through a dataset (a 13k+ entry table) and grabs info and adds it into a dictionary for further use. Due to the length of the table, I had also created an extra form which is basically just a progress bar. When I run the app, the progress bar's position increases. The problem is when I click on something else within the form. The application immediately hangs (Application Not Responding). The application is still running though. After some time, the progress form closes and the data is displayed. I had thought it was a painting issue; but even adding progressform.repaint to the end of the (while not dataset1.eof do) loop, the application hangs. Is there a way to find out what part of the code is hanging or why it's hanging? Thanks Ed
  7. ewong

    changing inherited control

    Hi, I have added a DBGrid control on a form, and after fiddling with it, I realized I needed to override the MouseDown event. So I added a new Custom control and following the idea of http://www.delphigroups.info/2/f8/90624.html I thought changing the Text from MyGrid: TDBGrid to MyGrid: TCustDBGrid would work; but Delphi complains. If I click on ignore, it deletes the db control. If I have included the following code in the same unit as the form: TCustomDBGrid = class(TDBGrid) protected procedure MouseDown(Button: TMouseButton; ShiftState: TShiftState; X, Y: integer); end; Then if I change the DFM of the MyGrid from: MyGrid: TDBGrid; To: MyGrid: TCustDBGrid; It should work; but it doesn't, so I'm guessing I'm getting something wrong. What's the right way of doing this? Thanks Ed
  8. ewong

    changing inherited control

    In hindsight and as an anecdotal instance of losing the plot, I just realized I could have just setup a popup menu and be done with it. ;/ That said, I have learnt a bit more so that wasn't a total waste. 😜 Edmund
  9. ewong

    changing inherited control

    In hindsight, I think that's what's making me confused. That said, I've found an indirect way in accordance to [3]. TCustDBGrid = class(TDBGrid) protected procedure MouseDown(Sender: TObject; Button: TMouseButton; ShiftState: TShiftState; X, Y: Integer); end; TForm1 = class(TForm) ... recentinfo: TDBGrid; .. protected procedure FindComponentClass(Reader: TReader; const ClassName: string; var ComponentClass: TComponentClass); Procedure ReadState(Reader: TReader); override end; procedure TCustDBGrid.MouseDown(Sender: TObject; Button: TMouseButton; ShiftState: TShiftState; X, Y: Integer); begin if (name = 'recentinfo') and (button = mbRight) then begin ShowMessage('testing'); end else inherited; end; procedure TForm1.FindComponentClass(Reader: TReader; const ClassName: string; var ComponentClass: TComponentClass); var i : integer; s : string; ts : TComponent; begin if ComponentClass = TDBGrid then begin ComponentClass := TCustDBGrid; end end; procedure TForm1.ReadState(Reader: TReader); begin Reader.OnFindComponentClass := FindComponentClass; inherited; end; The above 'hack' worked. At first I had tried to find the associated ComponentClass' instance name; only to have it dawn on me that it's just finding the component class. It hadn't instantiated the component yet so no instance exists. Then I just gave up and had all the DBGrids to be changed to TCustDBGrid on the fly and then use the TCustDBGrid mousedown dispatcher to run when the right instance is referenced. Thanks! Edmund
  10. ewong

    changing inherited control

    Delphi complains that it can't find "TCustDBGrid". So what I have is: TCustDBGrid = class(TDBGrid) protected procedure MouseDown(Sender: TObject; Button: TMouseButton; ShiftState: TShiftState; X, Y :integer); end; TForm1 = class(TForm) .. recentinfo: TDBGrid; .. end; implementation procedure TCustDBGrid.MouseDown(Sender: TObject; Button: TMouseButton; ShiftState: TShiftState; X, Y: integer); begin if button = mbRight then showmessage("testing"); end; From [1], I tried: constructor TForm1.create; begin recentinfo.onMouseDown = MouseDown; end; This didn't work as it's complaining that there's not enough parameters. Then I tried (as mentioned above) changing in the dfm text to change "recentinfo: TDBGrid;" into "recentinfo: TCustDBGrid". Since the definition of TCustDBGrid is in the same unit as the tform, I figured it would work. I'm guessing it's wrong thinking this way as what I'm doing is in essence using a visible component which uses a different set of rules than simple "TpointX = class(TPoint)" type of definition. If I just click on the grid, and create an event handler for "OnMouseDown", as mentioned in [2], it doesn't work as it fires only if I click on the headers. Then I came across [3] and while I think it should work, I haven't yet found out how to find out whether the componentclass' instance is what I wanted. Tbh, it would've been just simpler had I made this custom dbgrid as a package and be done with it; but I feel there has to be a way other than the package route. Thanks Edmund [1] - http://www.delphigroups.info/2/2f/507785.html [2] - http://www.delphigroups.info/2/4a/305663.html [3] - https://stackoverflow.com/questions/4685863/replacing-a-component-class-in-delphi/4686920#4686920
  11. ewong

    changing inherited control

    It's because I did use OnMouseDown but it was being ignored and I found out from [http://www.delphigroups.info/2/4a/305663.html] that it only works with the column headers. Thus my current issue.
  12. ewong

    changing inherited control

    Hi Dany, The first option isn't going to work as that'll affect other dbgrids. So I guess I'll need to use the second option even though it's a bit overkill for just this. I'm very surprised that even with TCustDBGrid defined within the same unit as the form, the dfm processing can't see that. Thanks Ed
  13. ewong

    Determining why Delphi App Hangs

    I took up @Dalija Prasnikar's idea of threads and while the UI isn't hanging, there's a bunch of dependency control issues. Like in the thread when I disable the controls, I realized that I can't (by design) navigate a grid which depends on a dataset which had disablecontrol set. I'm now wondering if it makes sense two have two datasets. One which is linked to a grid, the other not linked to any control so that the thread can use that non-linked dataset leaving the grid-linked dataset available for use. But as it stands, it's a definite improvement but like all things I don't understand (threads), I'll need to read up on it. Again, Thanks for the help!! Very much appreciate it.
  14. ewong

    Determining why Delphi App Hangs

    Thanks for that suggestion. I'll keep that in mind for the smaller apps. Edmund
  15. ewong

    Determining why Delphi App Hangs

    That I believe I am since I'm not using threads or anything. I think I'll try using threads and see how things go. Thanks for the idea! Edmund
  16. ewong

    TMemo and unicode

    Hi, I'm using Delphi 10.3.3 and I have two Memo fields on a form and a button. I copy and paste a RFC2047 utf8 text to the left memo field. Then I press the button, and the resulting unicode text should be on the right memo field; but I get gibberish. procedure TForm1.convertbuttonclick(Sender: TObject); var use_st, s, s2 : string; b, q : boolean; begin s := Memo1.lines[0]; use_st := '?='; if pos('=?utf-8?', lowercase(s)) > 0 then begin s2 := stringreplace(s, '=?utf-8?', '', [rfReplaceAll, rfIgnoreCase]); if pos('b?', lowercase(s2)) > 0 then begin s2 := stringreplace(s2, 'b?', '', [rfReplaceAll, rfIgnoreCase]); b := True; use_st := '=?='; end else if pos('q?', lowercase(s2)) > 0 then begin s2 := stringreplace(s2, 'q?', '', [rfReplaceAll, rfIgnoreCase]); q := True; end; end else s2 := s; if pos(use_st, s2) > 0 then s2 := stringreplace(s2, use_st, '', [rfReplaceAll, rfIgnoreCase]); if q then s3 := idDecoderQuotedPrintable1.decodestring(s2) else if b then s3 := idDecoderMime1.decodeString(s2) else s3 := s2; memo2.lines.clear; memo2.lines.add(s3); end; Say I copy and paste "=?UTF-8?B?5aaC5L2V6K6TIGFydC1tYXRlIOaIkOeCug==?=" to the first memo. I press the button, and I get some string of which only I see "art-mate'. Can someone point out what I'm missing? Thanks Ed
  17. ewong

    TMemo and unicode

    Hi Remy! That's both short and sweet! This is much better than the code I had. Edmund
  18. Hi, I've scanned this forum's post and since I haven't found any mentions, I figured I'd ask. I can't seem to access the forums on community.embarcadero.com. Since I got messages sent to my email, I know I had logged in there before. Yet, clicking on the link in the email (since I can't seem to find any mention on forums on the site), brings me to a page that lists external sites (first of which is this site). Can someone please clarify what is going on? Thanks Ed
  19. ewong

    community.embarcadero.com's forums

    As someone on that thread said, that's brutal. Very brutal to the amount of information on those forums. While I am very dismayed at Embarcadero's practice of killing/removing vital helpful information, I'm not surprised. The forum, while not as useful as the newsgroups, at least provided some avenue of help/information. Thanks Remy for the info. At least I'm glad I can still see quite a few old regulars on the newsgroup. Perhaps Joanne might even appear here?
  20. ewong

    TDBGrid's SelectedRows count

    Hi, I am using Delphi 10.3. I have a DBGrid that's connected to a Datasource (which is connected to a dataset). I have DBGrid's rowselect and multiselect options set to true. I have the following in the datasource's onDataChange event: procedure TForm1.DataSource2DataChange(Sender: TObject; Field: TField); var cnt : integer; begin label1.Caption := 'DataSource2DataChange'; cnt := dbgrid1.SelectedRows.Count; label2.Caption := 'Count = ' + IntToStr(cnt); end; So when I run the form, and I select the an entry in the grid, I see "Count = 0" in the label2 caption. When I select a different row, it finally changes to Count = 1. However, if I ctrl-Click on a 2nd row, the 'Count = 1" remains. When I Ctrl-Click on a third row, the label changes to "Count = 2" (but since I've selected three items, it should be "Count = 3"). Can someone point out what I'm missing? Have I misunderstood the SelectedRows property? Thanks Ed
  21. ewong

    TDBGrid's SelectedRows count

    I was wondering what the arrow and dot meant. That clears up that question. Thanks!
  22. ewong

    TDBGrid's SelectedRows count

    That explains what I'm seeing. Thanks! I got the OnDataChange idea from Stackoverflow. Ed
  23. ewong

    Delphi 10.3 help

    I have Delphi 10.3.3 installed (for sometime) but have only started using Delphi recently. I had selected to install the help files; but when I press F1, no help file appears. I click on the Help -> Rad Studio Help. But nothing appears either. I had installed Delphi 10.3.3 in F:\delphi, and that path exists as does f:\delphi\help (and the .chm files) Is it possible to manually setup the help file? Might it be a registry hiccup that has Delphi 10.3.3 failing to see the help files? Thanks Ed
  24. ewong

    Delphi 10.3 help

    To answer my own question, I ended up finding out that for some reasons, the paths for the registry keys at : HKCU\Software\Embarcadero\BDS\20.0\Help\HtmlHelp1Files were all pointing to some non existing directory. I changed them to reflect where the actual help files were located and now I have help. Thankfully, I had 10.2 installed so just needed to compare the registry info. Ed
  25. ewong

    community.embarcadero.com's forums

    Oh. *sigh* Thanks for the info. First they removed the newsgroups. Now they've given up using forums and opted to have external sources for user help. Ed
×