Compiling using Delphi 7 Personal ?
That's good news ! Maybe I should install Vista Home on my notebook or a virtual machine to be able to do some more tests with game catalog. It's just that I successfully avoided using Vista yet.. damned 
About the 'old Windows' theme - you mean switching AMC to another icon theme (XP) or changing something on Vista ? Not sure if that would be possible on PE, as it is only a restricted system. So it might be a PE problem, but that's not important if catalog runs properly on standard versions.

About the 'old Windows' theme - you mean switching AMC to another icon theme (XP) or changing something on Vista ? Not sure if that would be possible on PE, as it is only a restricted system. So it might be a PE problem, but that's not important if catalog runs properly on standard versions.
When compiling/building game catalog executable, it runs to the end and seems to work fine, but I always get these two warning messages:
On the code the lines look like:
I got the same messages when compiling AMC, so maybe it's because of the Personal Edition and FreeReport again - but does it affect the program itself (as it is only a 'Warning') ? Any idea how I could test for this ?
Code: Select all
[Warning] FR_Intrp.pas(119): Symbol 'NewStr' is deprecated
[Warning] FR_Intrp.pas(181): Symbol 'DisposeStr' is deprecated
Code: Select all
(119) p^.Name := NewStr(Name);
(181) DisposeStr(p^.Name);
It is not a big problem, these warnings are there because these functions should not be used anymore, they are replaced by other ones. But they still should work fine, they are kept in Delphi for compatibility purposes with old code.
In such case it is safer to continue to use it as it is, especially since I am not sure on how to modify the code, since I did not write it
In such case it is safer to continue to use it as it is, especially since I am not sure on how to modify the code, since I did not write it

Two short questions, just for understanding:
On unit FileManager there is this function:
1. Why are results (from unit messageform) only 1, 0 and 3 ? I know that buttons are an array[0..3], but with only three buttons on the messagewindow (Yes, No, Cancel) I thought it should result in 0, 1 and 2..
2. As 1 means Yes, where can I see which one is 0 and 3 ? (as far as I know, result is 0 when window is closed by corner button, too, so it should be same as Cancel)
On unit FileManager there is this function:
Code: Select all
function TFileManager.CheckUnsavedFile: Boolean;
begin
Result := True;
if Modified and FAskToSave then
case MessageWin.Execute(FMessageSaveQuery + IfThen(FCurrentFile <> '', sLineBreak + sLineBreak + FCurrentFile), mtConfirmation, [mbYes, mbNo, mbCancel]) of
1:
Result := Save;
0,3:
Result := False;
end;
if Result and Assigned(FOnCloseFile) then
FOnCloseFile(Self);
end;
2. As 1 means Yes, where can I see which one is 0 and 3 ? (as far as I know, result is 0 when window is closed by corner button, too, so it should be same as Cancel)
buttons results are 1..3, not 0..2 nor 0..3
it is not very "natural" but I wanted to have the possibility to "chose" what to do when the window was closed, even if in most of the cases it is linked to 'Cancel' (or 'No' if there is no 'Cancel').
0 is as you said when the user closes with the corner button.
so 0 and 3 are for cancelling here
1 is "yes", so saving
2 is "no", not saving, nothing special to do then.

0 is as you said when the user closes with the corner button.
so 0 and 3 are for cancelling here
1 is "yes", so saving
2 is "no", not saving, nothing special to do then.
As I'm going through the code to see what I don't need or should be changed, there are some more questions coming up..
1. Function CheckVersion on file Global.pas uses a variable CurVersion, that could be set when calling the function, but it seems not to be used on the program, so it's always set to settings.version. Is it correct, when this variable should be set from functions call, it would support only version numbers (major/minor..) < 10, as it reads only single numbers from the string [like Major = (Integer(CurVersion[1]) - Zero)] ?
2. The file import.pas isn't neccessary any more, I guess ? Could it be deleted from the project or did I oversee something (I did not find any declaration 'Uses import') ?
3. What about procedure GetPicture2 - has it been forgotten on the helpfile or is there another reason that it should not be used (it supports referer) ?
4. I have a problem with the icon of my catalog files
When I started the project catalogs were still .amc format, later I changed file extension to .sgc (and some fields inside), and the button 'Repair file associations' works fine, too. I thought I changed all icons, but I still have the AMC icon on my catalogs instead of a game catalog icon and did not find out how to change this.. shouldn't the icon be taken from the associated program ? Maybe I did oversee something ? Or is it a windows problem (maybe caching) ?
1. Function CheckVersion on file Global.pas uses a variable CurVersion, that could be set when calling the function, but it seems not to be used on the program, so it's always set to settings.version. Is it correct, when this variable should be set from functions call, it would support only version numbers (major/minor..) < 10, as it reads only single numbers from the string [like Major = (Integer(CurVersion[1]) - Zero)] ?
2. The file import.pas isn't neccessary any more, I guess ? Could it be deleted from the project or did I oversee something (I did not find any declaration 'Uses import') ?
3. What about procedure GetPicture2 - has it been forgotten on the helpfile or is there another reason that it should not be used (it supports referer) ?
4. I have a problem with the icon of my catalog files

1. Indeed. But I never use numbers >9 in my versions, as this is confusing to have 3.10 vs 3.2.0 for example. In Ant Renamer 2, I merged the 2nd and 3rd number simplify versioning. So instead of a.b.c.d I have a.bc.d, I increase bc for new features and d for bug fixing, allowing up to 99 versions with new features which do not justify a really new major version (you still follow me? It is maybe not very clear
)
The day I will make AMC 4 I was planning to use same version style as Ant Renamer.
2. Indeed it could be deleted, it has been replaced by import2.
3. On my desk on my to-do list I still have the item "update AMC help file" :whistle:
4. in the res\icons folder, it is the "icon_doc.ico" file which contains the file used for .amc files. Once you modified this .ico file (which contains six images: 16x16, 32x32, 48x48 in both 16 and 256 colors), run icons.bat to recreate the icons.res file in AMC's code folder. You may have to close and reopen the project to have Delphi reinclude this new res file in the exe.

The day I will make AMC 4 I was planning to use same version style as Ant Renamer.
2. Indeed it could be deleted, it has been replaced by import2.
3. On my desk on my to-do list I still have the item "update AMC help file" :whistle:
4. in the res\icons folder, it is the "icon_doc.ico" file which contains the file used for .amc files. Once you modified this .ico file (which contains six images: 16x16, 32x32, 48x48 in both 16 and 256 colors), run icons.bat to recreate the icons.res file in AMC's code folder. You may have to close and reopen the project to have Delphi reinclude this new res file in the exe.
It's pretty clearantp wrote:In Ant Renamer 2, I merged the 2nd and 3rd number simplify versioning. So instead of a.b.c.d I have a.bc.d, I increase bc for new features and d for bug fixing, allowing up to 99 versions with new features which do not justify a really new major version (you still follow me? It is maybe not very clear)

About the icons, I will have a look on it the next days, as I wanted to create a new icon set for the first release (the current one has errors on some resolutions because of unclear transparent backgrounds ^^)
Thank you!
On file fields.pas there is a function named GetFieldSQLType that looks like
Is the order of these fields important ? I ask because I changed the order/numbering of fieldnames and the order within arrays for strXMLFields and strSQLFields on the same file, too, but this one seems to be sorted on field types only..
Code: Select all
function GetFieldSQLType(const FieldName: string): string;
begin
case strFields.IndexOf(FieldName) of
fieldDate: result := 'DATE';
fieldNumber,
fieldYear,
field...
Little bit confused about the icon files. icon_doc.ico contains your 'default' icon only sized 16x16 in 16 and 256 colors, the higher resolutions are different icons that I have not yet seen somewhere within AMC. So I thought you use the icon_pgm.ico for AMC, which contains the default icon in all 3 resolutions/2 colors.. If that's not the case, where do the different higher resolution icons appear ?antp wrote:4. in the res\icons folder, it is the "icon_doc.ico" file which contains the file used for .amc files. Once you modified this .ico file (which contains six images: 16x16, 32x32, 48x48 in both 16 and 256 colors), run icons.bat to recreate the icons.res file in AMC's code folder. You may have to close and reopen the project to have Delphi reinclude this new res file in the exe.
And how does the icons.res file work ? When I changed icons, I loaded them from within Delphi on 'project options -> application' and 'object properties' window. Maybe that was the wrong way if I want to change the .res file directly ?
I made an error previously (I mixed it with how I embedded an icon in the DLL I think), so I'll reexplain things correctly :
Delphi allows only to set one icon for the project, I wanted two, so I used a .res file created myself to add an icon in addition of the icon defined in project.
To set the main icon (i.e. program's icon) you use the Project Options window, and select the .ico file.
To set the document icon, it is with the .rc/.bat/.res file. When the icons.res file found in project folder is updated, just close and reopen the project. When you recompile it, the new icons.res file will be read by Delphi and embedded in the .exe file because of this line in moviecatalog.dpr :
{$R ICONS.RES}
The icons contained in the .exe are :

Indeed for the 16x16 icons, both are identical.
I just managed that the 1st icon is the program icon (as it is usually like that). The 2nd one is the document icon, associated with the .amc file (a .amc file will appear with that icon rather than the program icon).
To be sure of icons order I just had to give a name to the second one which was after "MAINICON" in alphabetical order ("SAVED1" in this case)
And to associate that 2nd icon to documents rather than the main program icon, when registering .amc extension it passes strAppExe + ',1' : the filepath to icon (moviecatalog.exe) is followed by icon number, starting at 0.
Delphi allows only to set one icon for the project, I wanted two, so I used a .res file created myself to add an icon in addition of the icon defined in project.
To set the main icon (i.e. program's icon) you use the Project Options window, and select the .ico file.
To set the document icon, it is with the .rc/.bat/.res file. When the icons.res file found in project folder is updated, just close and reopen the project. When you recompile it, the new icons.res file will be read by Delphi and embedded in the .exe file because of this line in moviecatalog.dpr :
{$R ICONS.RES}
The icons contained in the .exe are :

Indeed for the 16x16 icons, both are identical.
I just managed that the 1st icon is the program icon (as it is usually like that). The 2nd one is the document icon, associated with the .amc file (a .amc file will appear with that icon rather than the program icon).
To be sure of icons order I just had to give a name to the second one which was after "MAINICON" in alphabetical order ("SAVED1" in this case)
And to associate that 2nd icon to documents rather than the main program icon, when registering .amc extension it passes strAppExe + ',1' : the filepath to icon (moviecatalog.exe) is followed by icon number, starting at 0.