Jump to content

Roger Cigol

Members
  • Content Count

    319
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Roger Cigol


  1. ...Also: which compiler are you using. C++ "classic" is the 32 bit compiler developed by Borland but basically frozen quite some number of years ago. The recommended compilers are Clang32 for 32 bit targets and Clang64 for 64bit targets. 12.1 also introduced a new tool chain for clang 64bit which is expected to replace the earlier 64bit system (this is currently called clang64 modern) but in 12.1 it has some minor limitations which may make it not your first choice if you are still finding your way around. These limitations are understood by Embarcadero and are expected to be removed in next version or two with the goal being to replace the clang64 approach with this "clang 64 modern" approach.

    You select the compiler used for 32 bit applications using the menu Project | Options and then under Builiding | C++ compiler there is an entry "Use classic borland compiler" (I suggest you set this to "false").

    You select the compiler used for 64 bit applications using the "target platform" in the project tree.


  2. Hi Newbee, I wonder what version you are using here? Embarcadero have tried various experiments with the auto completion type editing functionality in recent editions. It is only in 12.1 - with reasonable integration of the visual assists components from Whole Tomato that things are working well. I find 12.1 auto completion fast and reliable. 


  3. 30 minutes ago, Jirka52 said:

    Remember one think, Delphi 12.1 are still 32-bit. Therefore you need 32-bit driver for database, if you want to connect from Delph

    This is true for design time connections. But you can compile to 64 bit application and then connect at run time (but if you do this you CANNOT connect at design time because of the limitation I mention above).

    • Sad 1

  4. You can only open MS Access files on a PC using either 64 bit apps (in which case you need to install the 64 bit MS Access drivers into Windows) or 32 bit apps (in which case you need MS Access on the machine (or at least the drivers). You cannot have both on the machine at the same time.

     

    • Like 1

  5. 9 hours ago, Roger Cigol said:

    I've used ISO and web based installers for different installations - no difference between them.

    Everyone accepts that it is correct that you need elevated privileges to install. "There is no difference between them" means for me either route has always led to being able to run the IDE from a "standard user" account without elevated privileges.

    • Like 1

  6. I have a short sample XML file which is as follows

    <?xml version="1.0"?>
    <authors>
      <author>
        <name>abc</name>
        <posts>
          <items>
            <title lang="eng1">abc item 1</title>
            <content lang="eng2">abc item 1</content>
          </items>
          <items>
            <title lang="eng3">abc item 2</title>
            <content lang="eng4">abc item 2</content>
          </items>
          <items>
            <title lang="eng5">abc item 3</title>
            <content>abc item 3</content>
          </items>
          <items>
            <title>abc item 4</title>
            <content lang="eng6">abc item 4</content>
          </items>
        </posts>
      </author>
    </authors>

    I need a schema (ie a file *.xsd format) for this xml format. 

    Schema creation tools I have tried don't seem to be able to handle the fact that nodes such as <title>...</title> contain both an attribute and text data. If I use a tool to create a schema *.xsd and then recreate a sample xml from the created schema I always find that the resulting xml created is missing either the attribute or the data, meaning the schema I have generated does NOT match my XML file. Can anyone create a schema that does correctly map to an XML file with nodes with both attribute and text data?

    I know it's not a delphi question (or a C++ Builder question) but I also know there are some XML gurus on Delphi Praxis that might be able to solve my problem very easily !

    Thanks in anticipation


  7. 2 minutes ago, Dave Nottage said:

    Apparently you would need a BMW ZGW device, or a way of simulating one.

    Exactly, I've checked my tool box, I don't have a BMW ZGW device or a way of simulating one........

    I would also need someone to tell me what it was supposed to do in the event of different failures when communicating with the BMW ZGW device.....

    • Like 1

  8. 2 hours ago, Brandon Staggs said:

    Regardless, I think I agree that the bottom line is you can't actually guarantee the output is going to be rendered in the way you want it to, when you don't have control over the font and you are just outputting a plain text file padding columns with spaces hoping they will line up the same way on another system

    I agree - the key thing is that a text file (including a unicode text file) does not contain information about the display of the characters so any attempt at alignment can never be guaranteed to have success.

    Thinking out of the box - what about the plain old TAB character? using this as a separator between your columns might result in any reasonable file viewer lining them up for you. Always good to try a simple solution first.....


  9. One way is to add two dummy series, one with Y values that are at the smallest maximum value you want to allow and one with Y values at the largest minimum value you want to allow.

    Then set the colour of the two dummy lines equal to the background colour (so they aren't visible to the user). Not the most elegant solution but a devious workable one.....


  10. How about an example of how you have to pick your "epsilon" value with knowledge of what's going on:

    If I am working out shortest route to walk from London to Birmingham I might use floating point values to store route distance in km (roughly 175 km). I might consider any route that is within 1km of another route as being "equal" from the perspective of route assessment. So I can set a large epsilon when making my route comparisons. But if I am launching a module and trying to land it on a flat bit of the moon my route is roughly 400,000km but I want the landing point to be accurate to a couple of meters so I would need to choose a much tighter epsilon. 

    David is right - offering a "hidden" arbitrary epsilon value that works for "most cases" is a route that is often convenient but it is a potentially dangerous approach.

    Floating point values are the right approach for many coding problems but they do need using with an understanding of how they work and the inherent "limitations" that result from how they work.


  11. Your file refers to a custom schema with the line

    		<GetCAPRangeResponse xmlns="http://www.capnetwork.co.uk/CAPVehicles/">

    If you type this URL into your web browser you get a 404 error - ie this schema has been removed or the website is down.


  12. "Which is the best way?" questions in C++ are always tricky! The language has evolved so much (and continues to do so). We C++ Builder users have the added complication of the use of the VCL or FireMonkey functions (that come from the Delphi RTL). How important it is to keep your code portable is certainly one question to consider. Re: text files : also take into account encoding possiblities - if you need to anticipate different encodings then the VCL support is often the easiest route. I tend to use TStringList as the store and then the LoadFromFile() and SaveToFile() functions.

    • Like 1

  13. I don't actually see that you have to do anything here - just don't take any action for the case(s) you want to ignore.  If you do want to skip an extra step you can always deliberately increment the counting value - ie use this line inside the loop....

    i = i + 1; 

     


  14. Hi @Lajos Juhász

    Thanks for this. Usually editing techniques apply equally to Delphi or C+. I have the datamodule on the screen. But under my View menu I do not have a "View as text" option (is it somewhere else?). However alt+F12 does indeed change the form view to the text equivalent. Here I can manually edit the field (or anything else!). And alt+F12 toggles it back afterwards. I never knew this short cut (after all these years.....). So this saves me manually cutting and pasting to a different text editor. This may be useful to me in the future.

    It does still strike me as not being a RAD Studio IDE elegant way to edit a property. I wonder why the field type does not appear in the "properties" pane? I can visualise that there could be a good reason for this but if so it would be much better if a right click on the field in the structure display also gave me an option to bring up a window the same as the "new" field window - where I could then adjust the type. 

    May be I'll put in a feature request when the quality portal comes back from its "holiday"......

×