-
Content Count
348 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Roger Cigol
-
Documentation is useful for questions like this: https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.UnicodeString_Methods
-
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
-
Your have defined AnsiString myString But then not used it..... myString = AnsiString(EditCharacterEntry -> Text);
-
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.
-
Custom manifest file specification - file does not exist
Roger Cigol posted a topic in Delphi IDE and APIs
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 ?).... -
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];
-
std::lock_guard<std::mutex> throwing exceptions under windows
Roger Cigol replied to Roger Cigol's topic in General Help
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..... -
WideString.c_bstr() operation in 11.2
Roger Cigol replied to Roger Cigol's topic in RTL and Delphi Object Pascal
I've created an RSP. https://quality.embarcadero.com/browse/RSP-41374 -
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
-
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).
-
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/
-
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.
-
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.....
-
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:
- 6 replies
-
- delphi 10.4 ide
- xml data binding
-
(and 1 more)
Tagged with:
-
Hi Lars, There is a numeric entry box for this limit on the XSD tab
-
Best Practice Question: Bidirectional EXE-to-EXE communication
Roger Cigol replied to Alexander Halser's topic in RTL and Delphi Object Pascal
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 ? -
Best Practice Question: Bidirectional EXE-to-EXE communication
Roger Cigol replied to Alexander Halser's topic in RTL and Delphi Object Pascal
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) -
Is there a way to use a platform specific win32/win64 DEF file?
Roger Cigol replied to alank2's topic in General Help
A definite improvement - thanks Remy. -
Is there a way to use a platform specific win32/win64 DEF file?
Roger Cigol replied to alank2's topic in General Help
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) -
Embarcadero C++ Programmer for Engineering UK
Roger Cigol replied to Roger Cigol's topic in Job Opportunities / Coder for Hire
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. -
Embarcadero C++ Programmer for Engineering UK
Roger Cigol replied to Roger Cigol's topic in Job Opportunities / Coder for Hire
Still looking for a C++ developer - still lots of exciting projects to work on...... -
Is there a way to use a platform specific win32/win64 DEF file?
Roger Cigol replied to alank2's topic in General Help
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. -
Is there a way to use a platform specific win32/win64 DEF file?
Roger Cigol replied to alank2's topic in General Help
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) -
I would plump for "doesn't exist". BCB6 had very little (no?) support for unicode
-
[bcc64 Warning] a.cpp(1385): unsequenced modification and access to 'ui3'
Roger Cigol replied to alank2's topic in General Help
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.