hmg-4 Changelog

Moderator: Rathinagiri

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi

Code: Select all

2011-12-16 18:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/basic.prg
     ! a valid name must be always assigned to the objects. Problem caused by
       ::s_lGridCellFlag equal to .F.
Cheers
Luigi from Italy
www.L3W.it
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: hmg-4 Changelog

Post by Ricci »

Thank Luigi, but ...

... now we have another error in GRID: you cannot edit fields using Textbox, the changes are not accepted. Try Grid/Demo_3.prg. Checkbox and Datepicker works well.
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: hmg-4 Changelog

Post by mrduck »

Ricci wrote:Thank Luigi, but ...

... now we have another error in GRID: you cannot edit fields using Textbox, the changes are not accepted. Try Grid/Demo_3.prg. Checkbox and Datepicker works well.
I studied the situation yesterday night and sent a PM to Luigi with what I think it is the actual problem. Just to note that Qt would handle the situation while hbQt has a crippled funztionality (only one handler for each event or signal)...

I think that by this evening it should be solved.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi Ricci.
Yes I know (I had already found this problem) and yesterday night I sent a PM to MrDuck and, as he writes here, he sent me a message. We must investigate because, as MrDuck writes, it's not so easy to find a solution or a good solution.

Cheers
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi friends.
related with GRID problem, the solution. Double commit: the first one to solve the problem the second only to change the method name (__Hmg* its better to preserve for internal/protected).

Remember: from this moment, while editing a cell and there is a mask, this will be used.

Code: Select all

2011-12-17 16:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/grid.prg
   ! source/textbox.prg
     __HmgGridKeybEvent() renamed into GridKeybEvent()


2011-12-17 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/grid.prg
   ! source/textbox.prg
     ! create __HmgGridKeybEvent(). Is a worker method to solve problem related
       with cell GRID editing. Avoid general use. Must be considered internal
Cheers
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi guys

Code: Select all

2011-12-17 19:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   * source/textbox.prg
     * BACKSPACE allowed while editing masquerade field but without selection.
Some people ask to me usage of BACKSPACE while editing masquerade field. I have enabled this option, but I think can be dangerous.

Please follow this example. Mask "AAA", current value "BC|D" (| is the cursor position). With BACKSPACE you will change "C" with SPACE(1).
The returned value will be "B D": IMHO, it's wrong. Obviously, you can not remove fixed/separator char.

Anyway, I have done this change.

Cheers
Luigi from Italy
www.L3W.it
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

hmg-4 Changelog

Post by Pablo César »

Dear Luigi, sorry to post here my msg and also we are very happy when receive a new of changings and when tere are to become nearly Clipper performs. But in my opinion I also disagreed as the way of backspace should be.

In one text (text editor, for example) when you press backspace in the midle of string all the string coming together with the previous character when cursor was postioned before pressed backspace.

In Clipper, even with mask/picture is done similar of mentioned above but there is a diference when picture has a separator character like as "." or "-" for exemplo:

("|" supposed to be a cursor) - Then will be pressed backspace key

1. Mask picture "AA|A-999" - Here the result will be: "AA -999" or "AC -123"
2. Mask picture "AA|A-AAA" - Here the result will be: "AA -AAA" or "AC -DEF"
3. Mask picture "99|9.99" - Here the result will be: "99 -999" or "13 .45"

In example 1 variable is type charactere and was typed "ABC-123" before backspace.
In example 2 variable is type charactere and was typed "ABC-DEF" before backspace.
In example 3 variable is type numeric and was typed "123.45" before backspace.

I also understand that in GUI enviroment is quite diferent than when in console as in Clipper done. I have mentioned how it was in Clipper just to give an idea how it was, because users are very familiarized with that perform. If is impossible to do this I will understand.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi Pablo and to everyone.
No sorry is due! When I start to rewrite TEXTBOX was my intention to give us an instrument very similar to the current (HMG3/CLIPPER). However, I have found several problems with QLineEdit object (events and so on), a different way to handle the input, etc.
Anyway, I appreciate your suggestion that it's very similar with MrDuck. As you can see in the last changelog I have enabled usage of BACKSPACE... So, I give you a first solution (I think working solution), now I can try to solve this problem based upon this work.

To do this follow these questions.
F.e. Very simple mask "AAA-AAA". "A" means: can be entered from [A-Z]-[a-z]. Please note "entered".
A) when programmer assign value can do a mistake; f.e. "1GG-Y3W". First question? this string/value must be accpeted?
B) If programmer doesn't assigns value I need an empty value (it's mandatory to manage editing on video); this empty value can be equal to SPACE(3) + "-" + SPACE(3) ? In other words, the space can be considered the "empty" value instead letters and digits and so on? n.b I'm using SPACE() function to avoid problem while viewing this post on internet.
C) with previous condition, if the user take action with DEL or BACKSPACE, the position can be changed with SPACE(1) or must be removed the position (very hard to manage)? In other words: starting value "GHI-LMN", user take action with BACKSPACE on position 6, can be returned "GHI-L"+SPACE(1)+"N" ?
D) related with previous, but with mask "999-999". An empty starting value ( SPACE(3) + "-" + SPACE(3) ) can be considered a valid starter? Please note "9" instead "A".

My POV: always the space must be considered a valid char for string input even if mask is "9". Only the input (user action) must be in according with picture.
In other words, with this mask "A9A-9A9", the programmer can write this starting value "1H2-E2U" but the user can only enter "H1J-8Y2" in according with mask.

1) Remember that, with QlineEdit, we need a "black hole" for editing; It's very hard to have "" as starting value and a picture like "AAA-AAA"; at least, I can manage SPACE(3) + "-" SPACE(3).
2) Remember that I have only Harbour functions to manage strings and dates. I'm not to be able to write C++ functions.

For these reasons, managing numbers is quite different.....

Anyway I will check your suggestions and I will try to find different solution.

Many thanks.
Cheers
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi friends
a bug related with MainWindow and a little cleaning with samples.

Code: Select all

2011-12-21 15:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   - samples/animatebox/demo_3.prg
   + samples/console/demo_1_oop.prg
   + samples/console/demo_1_cmd.prg
     * to show usage of ANIMATEBOX using: OOP style and CMD style.

   - samples/console/demo_1.PRG
   + samples/console/demo_1_oop.prg
   + samples/console/demo_1_cmd.prg
     * related with mainwindow.prg problem and to show OOP style and CMD style.

   ! source/mainwindow.prg
     ! ::s_oMainWindow was not reset when MainWindow is released.
       Thanks to Rossine for his notice.
Cheers
Luigi from Italy
www.L3W.it
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: hmg-4 Changelog

Post by Ricci »

Code: Select all

2011-12-21 15:20 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de )
   * source/control.prg
     + METHOD OnDropDown   SETGET
     + METHOD DragEvent
I added the method OnDropdown to all controls that inherit from CONTROL.
It only accept filenames (URLs) until now, so dragging files from the explorer is now possible.

Please use it like this way until control definition

Code: Select all

DEFINE LABEL oLabel
          ROW 10; COL 10
          WIDTH 100; HEIGHT 20
          VALUE ""
          OnDropDown { |oEvent| MyDropEvent(oEvent) }
END LABEL
or later with

Code: Select all

oLabel:OnDropDown { |oEvent| MyDropEvent(oEvent) }
A demo will follow later ...
Post Reply