Roger Cigol

Current status: "Tokyo 10.2 looks good to me !" - 6 months ago
Member since: Thursday, 09 October 2014
Last login: 5 hours 17 minutes ago
Profile viewed: 2,046 views

Your Rank: 32
Points: 85

Roger Cigol replied to the topic 'Dynamic component results in segmentation fault?' in the forum. yesterday

Hi Free D,
I'm not sure if there isn't sometimes an issue with the segmentation fault 11 being generated on Android devices when the app is shut down, when compiled with Seattle 10 Subscription upgrade 1.
Have you tried the same code on a later version of Delphi?
Regards, Roger.

Read More...

Roger Cigol replied to the topic 'Can it be done' in the forum. yesterday

Hi Thomas,
Easy:
Connect all the left hand set of DBEdits to the table 1 data source. Connect all the right hand set of DBEdits to the table 2 data source.
Have the order number as a normal Edit field, and use the OnChange event to call some code that locates the correct record in both tables. If you design it elegantly this OnChange event will also display some kind of warning if the entered order number doesn't have a matching record in one or both tables.
Hope this helps. Roger.

Read More...

Roger Cigol replied to the topic 'C++ Builder StringGrid Cells' in the forum. 1 week ago

Hi Gary,
Cells is a two dimensional array (see http://docwiki.embarcadero.com/Libraries/Tokyo/en/Vcl.Grids.TStringGrid.Cells)
So
a) it needs square brackets to gain access to individual values
AND
b) it needs TWO sets of brackets (one for each dimension)
AND
Now I see why you were confused: My original answer included a second bracket pair with the letter "i" in. But the darn HTML editor has converted this second dimension text into "make rest of text in italics!" and removed it from the visible display.
Here's my sample again, but this time using variables R and C..
// sample C++ code to update a string grid.
int R = 1;
int C = 2;
MyStringGrid->Cells[C][R] = String("What you want to put in the cell");

Hope this helps.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'C++ Builder StringGrid Cells' in the forum. 1 week ago

Hi Gary,
// sample C++ code to update a string grid.
int j =1;
int i = 2;
MyStringGrid->Cells[j] = String("What you want to put in the cell");

Hope this helps.
Regards, Roger


Read More...

Roger Cigol replied to the topic 'can not read file at application start' in the forum. 2 weeks ago

Are you specifying the full path of the file you want to open? If not it's most likely that the different ways of starting the application are causing it to have different default search directory paths.
Regards Roger.

Read More...

Roger Cigol replied to the topic 'C++ Libraries in C++ Builder' in the forum. 2 months ago

Hi CBali,
The theoretical answer is "yes".
In practice there are sometimes compatibility issues. Embarcadero would probably claim that the clang compiler is more compatible with the official C++ standard (and they would probably be right) but this is of little consolation if you run across a library that doesn't compile.
You can definitely use all the Windows API functions (such as you might use for accessing directories etc) from within a Embarcadero C++ program (but of course this stops you from targeting non-windows devices).
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Modernize a delphi 7 application' in the forum. 2 months ago

Hi TKI
Get Delphi Tokyo 10.1.1 and manually port your old project across (sounds difficult but simply means create a new project and add in all the delphi source code files used in your old project to the new project file - usually takes ten minutes) and you will be away.
You may also need some care over use of Unicode strings (was Delphi 7 still using Ansii strings? I think so). This is not normally a problem unless your application processes strings character by character.
Go for it - you will soon be "very modern" !
Regards, Roger

Read More...

Roger Cigol replied to the topic 'is there a web master here' in the forum. 3 months ago

Hi Assapan,
I completely agree with you.
Embarcadero should realise that this forum area has the potential to be a genuine plus feature of using Embaracadero products. Conversely if it's full of spam then why should anyone buy an Embarcadero license if they feel the company can't even keep their main communications channel workable.
Come on Embarcadero - you can do better than this !
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Printing a PDF' in the forum. 3 months ago

Hi Oliver,
An interesting question.
"Printing a pdf" is one of those statements that sounds easy but when you think about it involves a lot of work. You need to resize, convert it into pages and send them to the printer in sequence. Options about colour, resolution, orientation etc.
Simplest way is to pass the pdf back to the operating system. This will open up the application that the user prefers for looking at pdf files. Use code like:

String FullPath = FullPathNameOfPdfFileIncludingExtension;
if (FileExists(FullPath)) {
ShellExecute(Handle, NULL,
FullPath.w_str(),
NULL, NULL, SW_SHOWNORMAL);
}
else {
// display some error message here
}
}

The user can then use the application to print as they see fit.
If you really want to automate the printing process completely then one
way would be to use an application that handles pdf files and use OLE
automation to drive the application to get it to print out as your need.
You will need a good understanding of the OLE API to do this. I think
Adobe Acrobat Reader is one (obvious) candidate.
Another you could look at is
FlexiPDF by SoftMaker
www.softmaker.com/en/flexipdf
There are lots of others out there too.
Hope this points you in the right direction.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Old Borland Builder 5 Import?' in the forum. 3 months ago

Hi Dibya,
Application->Title does not change the name of the exe file.
Take a look at
http://docwiki.embarcadero.com/Libraries/Tokyo/en/Vcl.Forms.TApplication.Title
If you want to change the name of your exe file you need to change the name of your project. Do this by using "Save As....".
If you are using a modern version of the Embarcadero product then make sure you follow the "rebuild the project using the same units as were used in the *.bpr file" advice that is given earlier in this forum discussion.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Delphi 10 free starter edition - ISO image-where?' in the forum. 3 months ago

Hi Michael,
Did you ever find a Delphi Starter ISO URL ?
Adrian has just posted the same request in the Embarcadero Forums and I was trying to help him and ran across your posting....
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Orpheus GetCellAttributes' in the forum. 3 months ago

Hi Oliver,
I think you must be using some third party component here
I don't recognise TOvcCellAttributes or otxInvisible
(Embarcadero Docwiki doesn't mention these either).
Most likely problem is you will need to upgrade your third
party component to suit the latest compiler.
Might be nice to know what you are using, what problem it
solved for you and how good you think the third party component
is so other Embarcadero users can benefit from your experience.
Regards, Roger

Read More...

prabhatmohanty thanked Roger Cigol in topic Delphi for Python 3 months ago
Roger Cigol replied to the topic 'Delphi for Python' in the forum. 3 months ago
Roger Cigol replied to the topic 'Unicode sprintf' in the forum. 3 months ago

Hi Oliver,
The statement
Form1->Caption = temp;
assigns the value of temp to the PROPERTY called Caption in the class Form1.
Under the cover this assignment can (and usually does) hide a lot of other
necessary activity (typically by actually calling a WriteTheProperty() [my name] method).
In your particular case updating the property will also ensure that the painting
of the form on the screen also updates the caption.
Your example that doesn't work:
Form1->Caption.sprintf (L"123");
will make the actual string Form1->Caption equal to "123" but, because it doesn't
use the "=" notation it doesn't call the property WriteTheProperty() method so the
form displayed caption fails to update.
For more information (and perhaps a better explanation!) search for

__property

in the Embarcadero docwiki
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Pega 7 CRM web app memory consumption' in the forum. 3 months ago

Hi Soujanya,
I didn't know what Pega 7 was. So I looked it up. Now that I do I can't help wondering what your posting has to do with any Embarcadero product.
So, whilst interesting, you are not likely to be helping fellow Embarcadero users, or yourself, by posting your question here. If I am missing something completely then I apologise and ask you to amplify your question to explain the part that Embarcadero plays in your question.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'std::tuple and 'Classic Compiler'' in the forum. 3 months ago

Hi Canellas,
The "Classic" compiler is not C++ 11 compliant. In fact Embarcadero haven't moved this compiler on for some time now. It is "Classic" in the sense of "classic car".
I still use it at times because it compiles a lot more quickly than the clang compiler (which is the one that is used when you clear the "use classic compiler" check box in the project options.
The clang compiler is really the one to use for all new projects.
I just wrote a simple VCL project with a single button and in the button click event handler I wrote:
//


double _d1 = 0.183330997825;
double _d2 = 2.26665997505;
std::ofstream _file("c:/trash/double.txt", std::ios_base::trunc);
_file.precision(12);
_file << _d1 << "|" << _d2 << std::endl;
//
When I run this I get the correct text file representation of the two double numbers
in the "double.txt file. This is true if I compile and run using both the "classic" compiler
and the "clang" compiler.
I am intrigued as to why your's is not working ! (I realise this is not much help).
Regards Roger.

Read More...

Roger Cigol replied to the topic 'source files always being recompiled' in the forum. 3 months ago

Hi Canellas,
I am sure all of this works in the IDE (this is all very standard stuff). So there must be another reason you are getting a full compile on using menu item Project | Make "your project name".
Other simple possible reasons:
a) you have used menu item Project | Clean to clear out all the old compiled files
b) you have edited a header file that is #included in all (or most) of the *.cpp files in your project (hence they need recompiling.
c) you have manually delete the *.obj files for other compiler generated files (using eg. Windows Explorer).
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Delphi 10.2 Tokyo - Scaling options?' in the forum. 3 months ago

Hi Michael,
If you are using VCL you have a big job ahead of you, I fear.
If you are using FireMonkey you can maybe use a TScaledLayout on each window and then move all your components inside of this (drag them using the Form "Structure" part of the tool bar).
Regards, Roger

Read More...