Jump to content

Ian Branch

Members
  • Content Count

    1272
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Ian Branch

  1. Hi Team, I want to turn it off full time. I can't find any way/where to do that. Can I? Regards & TIA, Ian
  2. Ian Branch

    Version of Indy in D11.3??

    Hi Team, Do we know which version of Indy is supplied with D11.3? I need at least Indy 10.5.7 for an App. Regards & TIA, Ian
  3. Ian Branch

    Version of Indy in D11.3??

    Tks Remy.
  4. Ian Branch

    Delphi 11.3 is available now!

    I am almost eady to put it on a par with D2007. 🙂 IMHO the best ever. Not perfect, but still the best.
  5. Ian Branch

    Assigned(ErrorMessage) problem.

    Hi Team, I have a function definition of .. function ValidEmail(const EmailAddress: string; out ErrorMessage: string): Boolean; const EMAIL_REGEX = '^((?>[a-zA-Z\d!#$%&''*+\-/=?^_`{|}~]+\x20*|"((?=[\x01-\x7f])' + '[^"\\]|\\[\x01-\x7f])*"\x20*)*(?<angle><))?((?!\.)' + '(?>\.?[a-zA-Z\d!#$%&''*+\-/=?^_`{|}~]+)+|"((?=[\x01-\x7f])' + '[^"\\]|\\[\x01-\x7f])*")@(((?!-)[a-zA-Z\d\-]+(?<!-)\.)+[a-zA-Z]' + '{2,}|\[(((?(?<!\[)\.)(25[0-5]|2[0-4]\d|[01]?\d?\d))' + '{4}|[a-zA-Z\d\-]*[a-zA-Z\d]:((?=[\x01-\x7f])[^\\\[\]]|\\' + '[\x01-\x7f])+)\])(?(angle)>)$'; var .... .... The requirement is two fold. 1. ErrorMessage is optional in the calling program. i.e. it may be just - if validemail('myemail@somewhere.com') then .... 2. Assign an error message to ErrorMessage if the construction of the email address is incorrect. if (not Result) and Assigned(ErrorMessage) then ErrorMessage := 'The following email addresses are invalid: ' + String.Join('; ', InvalidEmails.ToArray); My problem is that I get an 'Incompatible types' error message for the 'then' in the above. I don't understand why. If I have read the help correctly, Assigned(Errormessage) should return a true or false, depending if Errormessage has been 'called'.?? Can somebody enlighten me please? What do I need to do to meet my needs? Regards & TIA, Ian
  6. Ian Branch

    Assigned(ErrorMessage) problem.

    Hi Remy, Great minds think alike. There is my mind.... I was laying in bed at 2am mulling the issue, as you do, when it occurred to me that that was what I needed to do. Regards & Tks, Ian
  7. Ian Branch

    Assigned(ErrorMessage) problem.

    Mmmm. Makes "If not ValidEmail('khggh.jghfjgh.vbn') then ..." more complicated and I would still have to revist every call. Thanks for your thoughts. I guess I will have to vistit every call. Regards & Tks again, Ian
  8. Ian Branch

    Assigned(ErrorMessage) problem.

    Nope.
  9. Ian Branch

    Assigned(ErrorMessage) problem.

    But it still requires the parameter in the calling function.
  10. Ian Branch

    Assigned(ErrorMessage) problem.

    How does one make a parameter such as this optional?
  11. Ian Branch

    Assigned(ErrorMessage) problem.

    Hi p2k, OK on the errormessage/object aspect. Quite so. I use the basic routine in multiple locations/projects and it doesn't have the error message functionality. I was looking to do a Global replace of old for new. Then update the many calling instances at my leisure.
  12. It can't hurt to ask... 🙂 https://quality.embarcadero.com/browse/RSP-41366?filter=-3
  13. It could at least warn you and ask you if it should remove the links....
  14. I do, but better I don't cause the issue to start with.
  15. That is most often the case. Open just the form to make a quick edit and save it. Perhaps I should stop that practice.. 😉
  16. Tks P2k. I went to my Profile but couldn't find any search functionality. @Uwe Raabe said - "This can also happen when the missing DataSource is not located at the same form/frame as the DB components and the IDE fails to open the datamodule (or wherever this datasource resides) for whatever reasons. I had similar experiences with actions located in a datamodule. If by any chance that datamodule shares its name with one of the IDE internal ones (including those in 3rd party modules) that can be the cause of breaking the linkage." Question - If the Form was opened on its own, and not via the project, therefore the relevant datamodule is not present/loaded, would that cause the issue? Ian
  17. Ian Branch

    Stop/Abort Form creation..

    Hi Team, Win 11, D11.3.1. I have the following form create code.. procedure TChangesLogForm.FormCreate(Sender: TObject); begin // IndexOrd.ItemIndex := 0; // case JSDialog1.Execute of 100: ttChangesLog.SQL.Text := 'SELECT * from dbiworkflow.changeslog order by DateTime'; 200: ttChangesLog.SQL.Text := 'SELECT * from dbiarchive.achangeslog order by DateTime'; 300: begin TaskMessageDlg('Warning!', 'You have selected to view both databases.' + #13 + 'This will take some time to produce the view!' + #13 + 'Please be patient.', mtInformation, [mbOK], 0); ttChangesLog.SQL.Text := 'SELECT * FROM vAllChangesLog order by DateTime'; end; 400: // Stop creating and abort the form. end; // end; the '400:' selection is to Cancel the form and return to the calling form. How do I achieve this please? I tried 400: PostMessage(Handle, WM_CLOSE, 0, 0);, but that didn't work. 😞 Regards & TIA, Ian
  18. Ian Branch

    Stop/Abort Form creation..

    P2k. Tks for the suggestion. I think I will quit while I am ahead. 🙂
  19. Ian Branch

    Stop/Abort Form creation..

    My thanks to all. I have a working solution and a new methodology for future use. Ian
  20. Ian Branch

    Stop/Abort Form creation..

    Cured it! I did this.. procedure TMainForm.actChangesLogExecute(Sender: TObject); begin // if IsFormOpen('ChangesLogForm') then Exit; // Screen.Cursor := crHourGlass; // try // var ChangesLogForm := TChangesLogForm.Create(Self); // ChangesLogForm.Show; // finally Screen.Cursor := crDefault; end; // end; No more spinning cursor.
  21. Ian Branch

    Stop/Abort Form creation..

    Hi Team, Getting there.. I have the following calling code.. procedure TMainForm.actEmailsLogExecute(Sender: TObject); begin // if IsFormOpen('EmailsLogForm') then Exit; // Screen.Cursor := crHourGlass; // var EmailsLogForm := TEmailsLogForm.Create(Self); // EmailsLogForm.Show; // Screen.Cursor := crDefault; // end; And the following Create in the called form.. constructor TChangesLogForm.Create(AOwner: TComponent); // called before "FormCreate()" begin inherited; // var lCloseForm := False; // case JSDialog1.Execute of 100: ttChangesLog.SQL.Text := 'SELECT * from dbiworkflow.changeslog order by DateTime'; 200: begin TaskMessageDlg('Warning!', 'You have selected to view records from the Archive database.' + #13 + 'This will take some time to produce the view!' + #13 + 'Please be patient.', mtInformation, [mbOK], 0); ttChangesLog.SQL.Text := 'SELECT * from dbiarchive.achangeslog order by DateTime'; end; 300: begin TaskMessageDlg('Warning!', 'You have selected to view records from both databases.' + #13 + 'This will take some time to produce the view!' + #13 + 'Please be patient.', mtInformation, [mbOK], 0); ttChangesLog.SQL.Text := 'SELECT * FROM vAllChangesLog order by DateTime'; end; 400: lCloseForm := True; // end; // if lCloseForm then Abort; // end; The Abort works fine, I return to the calling form, however, I end up with a spinning cursor.. 😞 Thoughts/suggestions? Regards, Ian
  22. Ian Branch

    Stop/Abort Form creation..

    Hi Thomas, I'm afraid I don't know where/how to do that. Can you show me an example or two please? Regards & TIA, Ian
  23. Ian Branch

    Class "abcdef" not found. error??

    Hi Team, D11.3. I have a multi component App with several tabs on a form. All works as designed/expected. Recently I have tried to add a button or a label or something else o one of the tabs, it builds OK but when run I get a 'Class "abcdef" not found.' error with "abcdef" being the added component. It's not peculier to the tab either, it happens if I just want to add a component to the form. Anybody seen this before? Is it a known issue? Have I reached some limit? Is there a cure? Regards & TIA, Ian
  24. Ian Branch

    Class "abcdef" not found. error??

    I FOUND IT!!! For whatever reason I had the following order at the start of the unit.. type .... .... private .... .... const .... .... public .... .... end; Something in me said this didn't look/feel right so I changed it to type .... .... private .... ... public .... .... end; const .... .... and all is fine now. Exactly why I had the const in the private section, I can only specualte that I was trying to make the consts private...... FWIW, this is the const declaration.. const sNoSvcEmail : string = 'There is no Service Email Address recorded in the Company data!'; sNoCorpEmail : string = 'There is no Corporate Email Address recorded in the Company data!'; sPrintMsg : string = 'The Job Ticket not in the correct status for this print function!'; // The following are for IndexOrd. aIndexOrd : array of string = ['Job #', 'Customer Ref.', 'Job Status', 'Account Code', 'Job Type', 'MSN', 'ESN', 'User ID', 'Account #', 'Customer #', 'Service #']; aSortOrder : array of string = ['JobNo', 'CustomerRef', 'JobStatus', 'AccountCode', 'JobType', 'MSN', 'ESN', 'UserID', 'AccountNo', 'CustomerNo', 'ServiceNo']; Anyway, all good now, I can add components again to my hearts content. Thank you all for your interest and suggestions/contributions. Very much appreciated. Regards, Ian
  25. Ian Branch

    Class "abcdef" not found. error??

    I am suspecting the latter. I removed all the plugins and the issue still occurred.
×