ViewError - HMG building utility

Utilities like DBU, Make, IDE written in HMG/ used to create HMG based applications

Moderator: Rathinagiri

RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: ViewError - HMG building utility

Post by RPC »

Hi Pablo
Finally got it working and got my compile error in ViewError window. :D
1. Please mention somewhere in ViewError window "Press Esc to Exit"
2. How do I uninstall it or modify it. I have installed it at D:\HMG-SAMPLES\hmgforum\ViewError_Exe. I changed the default background color to yellow and program editor to npp from context. Now when I click ViewError exe in explorer it opens following screen
window opened on double clickig viewerror.exe file
window opened on double clickig viewerror.exe file
ViewError_SCR_on click.png (63.95 KiB) Viewed 6642 times
It seems once ViewError.ini file is created, viewError dialog box doesn't open for uninstall or modification. Why is it so :?
Thanks for a great utility 8-)
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: ViewError - HMG building utility

Post by Pablo César »

Hi Rajeev,

I am happy you got installed ViewError.
1. Please mention somewhere in ViewError window "Press Esc to Exit"
I will do it. Probably in a StatusBar.
2. How do I uninstall it or modify it
You have two ways:
  1. When you got an error during compile process. If you want to see write anything wrong in your source a try to compile by IDE.
    When got an error during compile, probably you will see like this:
    1. In this example, ViewError is working with GRID:
      Screen164.png
      Screen164.png (24.97 KiB) Viewed 6626 times
       
    2. In this other example, ViewError is working together with Notepad++ (my favorite usage):
      Screen163.png
      Screen163.png (44.06 KiB) Viewed 6627 times
  2. At Prompt Command by typing:
    Screen165.png
    Screen165.png (19.76 KiB) Viewed 6627 times
    You can use /REMOVE to uninstall it.
I changed the default background color to yellow and program editor to npp from context.

So, you got Editor preference (configurations) ?
Now when I click ViewError exe in explorer it opens following screen
Image
This is for you inform build.log or error.log file in the current folder where your project is being compiled.
In this case you clicked without parameter.
viewError dialog box doesn't open for uninstall or modification. Why is it so :?
I think would be better I change to open "Editor preference" (configurations) instead of this GetFile for error log files.

Thank you for you testing and give us a feed back. :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: ViewError - HMG building utility

Post by Pablo César »

ChangeLog:
  1. Open configuration module by default
  2. Fixed bug for changing Grid_1 color
  3. Added [Esc] to exit in StatusBar and centralized even by resizing.
Screen166.png
Screen166.png (20.12 KiB) Viewed 6616 times
  
<Attached files were removed because there is a newest version ahead in this topic>
Last edited by Pablo César on Mon Apr 03, 2017 7:52 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: ViewError - HMG building utility

Post by RPC »

Hi Pablo
I downloaded the latest version of ViewError :

* After installation, when I select Yes to reboot, it again goes to installation screen and then reboots.

* I tried latest build of viewerror but got the old problem and viewerror did not not show any error screen. The version earlier to this was working good.

* If i select Context as my default program editor the program keeps asking me parameter for line no , ie "-n" of npp. Earlier version did not ask about this parameter.

* The relevant Radio button for choosing program editor, appears "disabled" though clicking it enables it.

* I tried using /REMOVE to uninstall, it did not work. /CONFIG works and there I ticked Uninstall check box and selected save then it uninstalled.

Can you please check at your end.

Thanks
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: ViewError - HMG building utility

Post by Pablo César »

Hi Rajeev,

Thank you for you testing and reporting.

I think you have a special way to saying that's something wrong by using reverse psychology tactics ...
Has anyone ever said that to you before ? :D

Thanks to your and my persistence, I can say that I have been able to observe where my error is in this application.
Initially ViewError checks which program is associated with PRG files. I noted that's totally unnecessary, because at no time do I need to run the PRG editor in an associated way.
I was concerned that the user's favorite editor would always be registered. It was a mistake from my side, unless as long as user inform where editor is, be always available and for the most importance that it can accepts the parameter for positioning in the desired line, nothing more. ;)

I will change that. I will turned up more flexible to accept any favorite editor. That's the way it must be. :)

So let me clarify a little more in your question, Rajeev:
* After installation, when I select Yes to reboot, it again goes to installation screen and then reboots.
I think it's normal because, when UAC intervention dialog be querying to user if can run with administrator right yes or not, the user can answer to NOT... :| and if answered to YES the system must need to give some time for closing apps and then boot it the system. Do you considered as wrong this behaviour ? Please you comment.
* If i select Context as my default program editor the program keeps asking me parameter for line no , ie "-n" of npp.
In your previous messages, you have mentioned something like context... (lower case I guess) and I did not imagining you was referring to a your favorite editor. :roll: (IMHO: "context" word it's dual meaning)

I have installed and now I know it. Very good one because has a Foxpro highlighter but I am still liking NPP.

For this question of line parameter needing in Context editor you will need following info to ViewError's settings:

"/g1:"       (Without quotes)

See picture below:
Screen167.png
Screen167.png (42.79 KiB) Viewed 6581 times
For Notepad++, this parameterization for this same propose is:
Screen168.png
Screen168.png (71.49 KiB) Viewed 6581 times
http://docs.notepad-plus-plus.org/index ... e_switches
 
Earlier version did not ask about this parameter.
In this last version of ViewError its fundamental for proper work to exist this parameterization.
* The relevant Radio button for choosing program editor, appears "disabled" though clicking it enables it.
Here's where I noted that's no sense from my part to think for APP to be associated with PRG files. And the ViewError checked that PRGs are not assciated with your favorite editor the "Context". I could make ViewError to make question for associating but I think is not the ViewError propose... this concerns to your editor and your SO, not ViewError at all (not really).
* I tried using /REMOVE to uninstall, it did not work.
I think I will cut off this switch.

I still see that making applications/tools or any system, does not just looking good, thinking it's good enough...
what we really should take into account is the diverse opinions of the user and their difficulties with the program.
Programmer not always applies the good policy of:

"The program has to adapt to the user and not the user to the program..."

I think this is very good, it is healthy: Listen to what users need.

Thank you again Rajeev. :P
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: ViewError - HMG building utility

Post by Pablo César »

Hi Rajeev and all colleagues,

I hope changings could be turned to improvements for yours:
 
<Attachaed files were removed because there is a newest version ahead of this same topic>
 
As I mentioned, I changed the UnRegistered source editor procedure and will accept you favorite editor as always I tried to accept it.
Windows Notepad editor when be settled will display a mensage saying there is not line parameter for this editor.
This editor is not recomended to be configured for this propose, better is the app GRID.

Switch /REMOVE has been excluded because the Uninstall option is working well.

Some common source editors were included as well the parameter for line position as command line.
For who wish to have your favorite source editor and parameter syntax guaranteed in ViewError app, please let me know it.

Variables been optimized.

I'm happy to know that I can improve it. :P
Last edited by Pablo César on Tue Apr 04, 2017 8:05 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Tiger
Posts: 70
Joined: Mon Aug 31, 2015 11:28 am
Location: Taipei

Re: ViewError - HMG building utility

Post by Tiger »

Hi Pablo,

I got an error message ... I don't know what's wrong. :cry:

Error BASE/1302 Argument error: HB_TRANSLATE

Called from HB_TRANSLATE(0)
Called from MAIN(97)
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: ViewError - HMG building utility

Post by Pablo César »

Hi Tiger,

Thank you for you interest and reporting.

Certainly my code is wrong for Code Page indentification in Harbour at OEM text to be translated. :oops:

I prepared this ViewError to be tested by you:
 
<Executable file was removed even been special edition but better in this way to avoid confusions>
 
And I want two favors:

1. Please test this ViewError and send captured screen of dialog DEBUG INFO, which it will be displayed thre values.
2. May you attach your build.log file of you project which you have tested ?

Let me know after you confirmed the dialog DEBUG INFO if is it working well and displaying accordingly with the right local characters.
 
Screen171.png
Screen171.png (35.71 KiB) Viewed 6483 times
 
And please if anyone else wants to join the test, especially with Eastern Code Pages, I would be very grateful.
Last edited by Pablo César on Tue Apr 18, 2017 8:54 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Tiger
Posts: 70
Joined: Mon Aug 31, 2015 11:28 am
Location: Taipei

Re: ViewError - HMG building utility

Post by Tiger »

Hi Pablo,

Thanks. The program is working now but it can't call the notepad++ to display the error message. So. I replaced the build.bat with the one you provided before and then the notepad++ can be called to display the error. But, I got another problem that it seems the hmgpath is not point out to my installation location "c:hmg.3.4.4"

Here is the INI file

[SourceEditor]
EditSourceOption=2
Grid1FontColor=A 18N 10N 10N 10
Grid1BackColor=A 24N 3255N 3255N 3153
Grid2FontColor=A 19N 10N 10N 291
Grid2BackColor=A 24N 3204N 3204N 3255
Edit1BckColor=A 24N 3255N 3153N 3153
Edit1FntColor=A 20N 3102N 10N 10
FontSize=9
DisplayLines=T
InstalledAt=C:\Notepad++\notepad++.exe
ComandGoLine=-n
[AppInterface]
Language=English

Sorry, I forget how to insert the jpg file to here :?
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: ViewError - HMG building utility

Post by Pablo César »

Hi Tiger,
Tiger wrote: Tue Apr 04, 2017 2:18 pmI forget how to insert the jpg file to here
I confess that I am still curious to know the capture screen in you last test.
But I will considered as correct the Harbour procedures for CP detection.
Here's a simple video explaining how to attach files (images and RAR-compressed files):
viewtopic.php?p=50640#p50640
The program is working now but it can't call the notepad++ to display the error message.
How it is possible ?
Have you setted NPP as your favorite editor in "Preference" or by command line "/CONFIG" ?
Have you installed ViewError and then booted ?
May you explain what happining giving more details, please ?
I replaced the build.bat with the one you provided before and then the notepad++ can be called to display the error.
No need to do this. Please keep original Build.bat because It is extremely necessary that it be the original file to this version 3.4.4.
it seems the hmgpath is not point out to my installation location "c:hmg.3.4.4"
Is it at C:\hmg.3.4.4 ?

Any way I prepared an extra function whe ViewError is not able to recognize the current HMG version for "Re-Build" process.
 
Screen172.png
Screen172.png (93.78 KiB) Viewed 6443 times
Then a combobox will be displayed for user selecting HMG version.

Have you noted there are two kind of displaying errors messages ?

One is when the IDE compiling process has an error at PRG (syntax error)
For example, you have typed any word that is not function or command. Lets say blablabla this will be considered as error.

The other one is when a not included function is recognized.
For example: My_FunctionX() this will considered another kind of error.

There is also the runtime error type. But this is not contempleted in ViewError.

Another thing that must be considered, is to be reserved a folder for ViewError. i.e. will be findable at unique place because it will be resgistered in the Windows's REGISTRY.
Attachments
ViewError_Exe.rar
Executable file
(1.28 MiB) Downloaded 311 times
ViewError_Pack.rar
Source files (ViewError + InstalledAt)
(101.61 KiB) Downloaded 296 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply