Harbour MemoEdit/HbEditor ... a couple of questions please.

475 views
Skip to first unread message

ChrisGillard

unread,
Dec 3, 2014, 10:52:44 AM12/3/14
to harbou...@googlegroups.com
Hi,

I am currently trying to migrate our business application from xHarbour/ADS to Harbour/ADS.

All has gone really well with very few changes except for a couple of problems with the behaviour of Harbour memoedit().

1.  From time to time when typing into a memoedit field I get to column position 16 and the cursor jumps back to position 1 and continues typing from there.  Occasionally it seems to skip back from position 8.

I have temporarily removed any UserFunc to keep thinks simple.

I am also now using HbEditor direct and have had the problem very occasionally.

I am currently tracing the keystrokes in the HbEditor:Edit method to see if I can see why.  Maybe typing too fat or hitting 2 keys at once?

Has anyone else had this problem?

2.  When using memoEdit/HbEditor I notice that when I delete with the delete key the line I am deleting gets shorter from the right as you would expect but the following wrapped line does not flow back to fill the space on the right of the higher line?

I try this in my xHarbour memoedit code and the second wrapped line flows back, one word at a time, up to the higher line where the deletion is happening as you might expect.

Looking at HbEditor it takes a fairly simple approach of an array of lines and maybe it just does it does not attempt to reproduce the behaviour of the xHarbour editor?

I think I can live with the Harbour behaviour but my users will notice the change.

Any thoughts on either of these problems and whether anyone has noticed them before.

Thanks

Chris
    

Klas Engwall

unread,
Dec 3, 2014, 5:38:03 PM12/3/14
to harbou...@googlegroups.com
Hi Chris,

> I am currently trying to migrate our business application from
> xHarbour/ADS to Harbour/ADS.
>
> All has gone really well with very few changes except for a couple of
> problems with the behaviour of Harbour memoedit().

As far as I can judge from reading every memoedit() related post in this
newsgroup in the last five years or so, very few people actually use it.
Don't ask me why ... but I don't use it either. And since so few people
use it, there is very little demand for fixing the existing issues.

But incidentally, Przemek committed a number of fixes, borrowed from
Viktor's branch, less than 24 hours ago. I don't know what those fixes
are, and the changelog entries do not give us the whole picture, so I
can only suggest testing tomorrow's binaries to see if your issues are
affected.

I know that over the years, the xHarbour version of memoedit() has had
more fixes than the Harbour version (at least up until now), so that is
one of the few areas where Harbour has been a little behind xHarbour in
recent years. Whether reflowing a paragraph after deleting characters in
included in the latest fixes remains to be seen (it seems more like a
missing feature than something that needs "a fix"), so please repeat
your tests with the latest Harbour version and report back here. Then,
at least, we will know what issues might remain.

Last time I looked at the code, a few months ago, there were still a few
comments in it about hotkeys that were not being handled. I have not
checked yesterday's changes, so I don't know if that has been changed in
this commit.

Regards,
Klas

ChrisGillard

unread,
Dec 4, 2014, 9:23:17 AM12/4/14
to harbou...@googlegroups.com
Hi Klas,

Thanks for responding to my questions.

As you say , the 'reflowing' of text during deletion is not a bug but a feature that does not appear to be implemented. In the end its probably something my users can live without as we also only use memoedit for Product, Customer & Supplier Notes plus our system has the ability to compose & send emails to Customers & Suppliers ... fairly simple stuff.

I too looked through all the old posts and could find no reference to my 'cursor skips back to position zero when on position 16 ... sometimes'.  I will have to keep debugging that.  At least we do get the source code to examine.

Its good that Przemek has committed some changes and I will try the new source in a day or two.

What I am doing now is using HbEditor directly and subclassing it to build in the keyboard behaviour we are used to.  Its much easier to do it this way than struggle with the Clipper memoedit and its userfunc which is a bit obscure in the 21st century.

When you say not many people seem to use memoedit ... do you think they use some other editor in its place or maybe that they just do much edition at all? 

Thanks again for your help.

Chris

Nenad Batocanin

unread,
Dec 4, 2014, 10:42:38 AM12/4/14
to harbou...@googlegroups.com

I also created a new class that inherits HBEditor. Nothing complicated, I just added a few commands. So far everything is working properly. But I'm very interested in a little more powerful editor.

 

Regards, NB

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Klas Engwall

unread,
Dec 4, 2014, 6:19:20 PM12/4/14
to harbou...@googlegroups.com
Hi Chris,

> As you say , the 'reflowing' of text during deletion is not a bug but
> a feature that does not appear to be implemented. In the end its
> probably something my users can live without as we also only use
> memoedit for Product, Customer & Supplier Notes plus our system has the
> ability to compose & send emails to Customers & Suppliers ... fairly
> simple stuff.
>
> I too looked through all the old posts and could find no reference to my
> 'cursor skips back to position zero when on position 16 ... sometimes'.
> I will have to keep debugging that. At least we do get the source code
> to examine.
>
> Its good that Przemek has committed some changes and I will try the new
> source in a day or two.
>
> What I am doing now is using HbEditor directly and subclassing it to
> build in the keyboard behaviour we are used to. Its much easier to do
> it this way than struggle with the Clipper memoedit and its userfunc
> which is a bit obscure in the 21st century.
>
> When you say not many people seem to use memoedit ... do you think they
> use some other editor in its place or maybe that they just do much
> edition at all?

I only know that the number of memoedit() related questions in the
newsgroup is limited. And I can only guess that those who need text
editing also use a GUI and a rich text editor, and that most people in
the TUI world only use single line gets. But I am just guessing now ...

I have only used Clipper's memoedit() occasionally a long time ago and
am not very familiar with its features. I only know that some things are
missing in the Harbour version. But I think it could be a good idea for
those who are really interested, and know what to expect from different
key presses in the editor, to collaborate and try to implement the
missing features. And I think that it would be possible to borrow some
ideas from xHarbour's implementation, like the reflowing and the missing
hotkeys (if those things were not in the latest fixes).

That could mean subclassing, or it could mean updating the current code.
Nenad seems interested in talking about this, for example.

Regards,
Klas

Nenad Batoćanin

unread,
Dec 5, 2014, 10:32:32 PM12/5/14
to harbou...@googlegroups.com
I tried to use MemoEdit, but he occasionally acting strange (cursor position bug that describes Chris). That's why I made my class. It is very simple and has only a few new commands:

- write cursor/row position
- save changes without question
- search string
- move edit window with Alt-Up/Down/Left/Right

I tried to make copy&paste, but I was not able to finish. Sending class as an example, because is used my form system, so it is not possible to directly use. Maybe somebody gets some idea :)

Regards, NB
memo.prgs

poopall

unread,
Apr 9, 2026, 8:41:48 PMApr 9
to Harbour Users
Where can one locate "nbcmd.ch" ?

Nenad Batoćanin

unread,
Apr 9, 2026, 9:00:52 PMApr 9
to harbou...@googlegroups.com

Huh, this is the include file for my extensions. Unfortunately it's too complicated for easy converting in standard HB... What command do you need, I'll try to translate it into standard harbor?

 

BTW, I just asked Claude to create HB editor and receive very interesting results :)

 

Regards, NB

--

You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com


---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages