Jump to content

Roger Cigol

Members
  • Content Count

    323
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Roger Cigol

  1. Roger Cigol

    Does C++ Builder have a Clear() method?

    Documentation is useful for questions like this: https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.UnicodeString_Methods
  2. Roger Cigol

    How do I convert from string to char?

    Hmm - last bit of my previous post doesn't seem to have been displayed / submitted correctly. I also included a line of code: char ch = myString[1]; // rem: this is an example of use and does not include a check for an empty string
  3. Roger Cigol

    How do I convert from string to char?

    Your have defined AnsiString myString But then not used it..... myString = AnsiString(EditCharacterEntry -> Text);
  4. Roger Cigol

    How do I convert from string to char?

    Remy is (of course) correct. My example was to show you one possible solution. You would be wise to check for the String being empty before doing the conversion. String type has a function IsEmpty() to do just that.
  5. Working with Alexandria 11.2 - I am using a C++ builder Win 32 "classic" VCL project. If I use project options and specify a "custom" windows manifest file it allows me to specify a full path to a manifest file that I can manually create (and the IDE encourages me to use an extension *.manifest). If I enter a full path to a custom manifest file but (owing to my mistake) this manifest file does not exist the project still builds my *.exe target file without reporting an error. But (obivously) the resulting *.exe file cannot include the custom manifest information that I intended. I would have expected a linker error "can't find manifest file xxxxMyCustomFileNameHerexxx.manifest" rather than letting my mistake pass through unnoticed. Can anyone else confirm that they get the same behaviour (also with a Delphi VCL 32 bit project ?)....
  6. Roger Cigol

    How do I convert from string to char?

    The EditCharacterEntry->Text is a Unicode string (remember it would be possible for someone to enter several characters (including characters that can't be represented as C++ char type). So the first thing you need to do is to convert this to an 8 bit char string. Any easy way to do this is to construct and AnsiString from the Unicode String. So you use AnsiString(EditCharacterEntry->Text). This will lose (ie corrupt) characters that are Unicode and can't be represented in Ansi. Next you need to get the first character of the AnsiString. In a VCL framework application the first character has an index of 1. So you use char ch = AnsiString(EditCharacterEntry->Text)[1];
  7. Hi Remy, Thanks for your valuable input. I am aware I haven't offered a "minimum reproduceable error" set of code for my posting. This is my next step - just two threads - one passing a number to the other using my interface class. I will do this later this week and post it up here (assuming I get the same error). The code I do have which is showing the problem is a googletest framework unit test which seems to run ok on gnu/linux but not on Embarcadero - but I agree this could still be a bug in my code.....
  8. Roger Cigol

    WideString.c_bstr() operation in 11.2

    I've created an RSP. https://quality.embarcadero.com/browse/RSP-41374
  9. Roger Cigol

    Does C++ Builder have an input - message box?

    You can use TEdit or TLabelledEdit for basic user input, along with a myriad of other visual components to get input from a user. Similarly for output. The basic "Message Box" is not a C++ Builder feature but part of the operating system (assumed to be Windows since you don't say otherwise). C++ builder VCL does provide a convenient "wrapper" for the operating system message box: https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.Forms.TApplication.MessageBox
  10. Roger Cigol

    Pass working delphi code to c++ builder

    What C++ compiler are you using? Can you post the contents of form file (*.dfm) that corresponds to the two components TGridLayout and HorzScrollBox1. (or create a complete form that is a minimum not-working example) and paste the entire *.dfm file).
  11. Roger Cigol

    Looking for a forum is this it?

    This is somewhat pessimistic. For an optimistic look at the future go to this recent posting: https://blogs.embarcadero.com/whats-coming-for-cbuilder-an-amazing-preview/
  12. Roger Cigol

    Looking for a forum is this it?

    I am a professional developer (for industrial control systems) and use Embarcadero C++ (mostly using the VCL framework) extensively. Yes, Microsoft dominate the Windows C++ arena, but Embarcadero C++ with VCL is a great tool. Post questions in the C++ sub forum here on Praxis and (provided you clearly explain your challenge) there is a good chance you will get an answer.
  13. Roger Cigol

    Edits not saved??

    I've seen this happen if you have two copies of a c++ *.h header file open in the IDE (in two separate windows). You edit one copy and then later save the other uneditied copy and overwrite the changes. Not sure if it's possible to have two copies of the same pascal + *.dfm unit open or not. Just something to check though.... I've also had a multiple projects issue where different projects refer to the same file. If you at some point move the directory in which the file is in and then only update some of the projects you accidentally introduce two copies of what should be only one file. This has happened to me a couple of times and caused great confusion ! Just another thing to check - make sure full path of the file is the same in all the projects.....
  14. Roger Cigol

    Delphi 10.4 missing XML Data Binding

    Anyone who gets to this post should be aware that in March 2023, with Alexandria 11.3, there was a new version of XML Mapper in Getit. See also this post:
  15. Roger Cigol

    Updated XMLMapper

    Hi Lars, There is a numeric entry box for this limit on the XSD tab
  16. I realised that - but that seems to me to be a good reason to use it. Or is the problem that it ONLY uses UDP so there is no guarantee that all data gets through all the time ?
  17. I have been following this forum and am interested that no-one has mentioned the Delphi "App Tethering" components which I thought were specifically designed to help make this task straightforward. Am I incorrect or does AppTethering not work well? (I hope I am not going to distract the forum question from the main question by asking this here)
  18. A definite improvement - thanks Remy.
  19. You can use if (sizeof(ATypeName) > 20) { /*.... your code here ...*/ } in your code (ie it's just the preprocessor #if form that is not handled)
  20. Hi Gunther, The only interest I have had on here is fully visible on here ! I have an issue in that I have no time and no inclination to sift through large numbers of hopeful "straight from college" type of applicants that I would expect to get were I to post somewhere more obvious (and all of the candidates would be decent folk who deserve decent consideration and courtesy and respect). So I figure by posting here at least anyone who expresses an interest will know the Embarcadero IDE and will at least be a "distinctly possible" - ie using this site acts as a first level filter. But it does seem that very few C++ folk are using Embarcadero.
  21. Still looking for a C++ developer - still lots of exciting projects to work on......
  22. All C++ compilers (to my (limited) knowledge) mangle names (because it's the obvious way to track arguments and return values). But it is possible (perhaps even "likely") that clang32 and clang64 adopt the SAME mangling scheme. If this was the case, your need for a separate def file for each compiler would disappear.
  23. To make sure we understand what you are trying to do. You are trying to use the DEF file to specify to the linker which functions to export (and the names of the functions you want them exported as). <can you confirm this, please?> Can you confirm that you are using the clang32 compiler for your 32bit code (if not then first thing to try is to use the clang32 compiler - maybe it's name mangling will be the same as the clang64 (I haven't checked this)). I am wondering if another approach might work (as suggested by @David Heffernan)
  24. Roger Cigol

    old BCB6 question about wmain

    I would plump for "doesn't exist". BCB6 had very little (no?) support for unicode
  25. I would really want my compiler to give me a warning if I wrote this line of code. It's not at all clear what you want to happen (and as @hansw says it is undefined behaviour - although it is likely to be consistent for any one given compiler (my guess only!)). In the interest of good program practice and to help your self write maintainable code please split this into two lines to make it easy to tell what is intended to be achieved.
×