Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-11

TWin32WSCustomX class

79 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Antônio

Correct me if I am wrong.

Now I know that TWn32WSCustomX classes are linked at runtime to TWSCustomX class procedures and functions, which are empty.

My problem is that one of these functions does not result, I don't know why. (I have already written some procedures that return, but now one of these fails). Any idea?

Thanks,
Ant?nio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/43f24157/attachment.html>

Reply by email

Antônio
to Antônio

The class name is TWin32WSCustomX and the problem is about a function which does not result. Any limit? Any restriction?

2014-11-08 11:00 GMT-02:00 Ant?nio :

Show quoted text 12 lines
Correct me if I am wrong. Now I know that TWn32WSCustomX classes are linked at runtime to TWSCustomX class procedures and functions, which are empty. My problem is that one of these functions does not result, I don't know why. (I have already written some procedures that return, but now one of these fails). Any idea? Thanks, Ant?nio

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/b983096a/attachment.html>

Reply by email

Mattias Gaertner
to Antônio
Show quoted text 13 lines
The class name is TWin32WSCustomX and the problem is about a function which does not result. Any limit? Any restriction? 2014-11-08 11:00 GMT-02:00 Ant?nio : > Correct me if I am wrong. > > Now I know that TWn32WSCustomX classes are linked at runtime to TWSCustomX > class procedures and functions, which are empty. > > My problem is that one of these functions does not result, I don't know > why. (I have already written some procedures that return, but now one of > these fails). Any idea?

Do you mean the TWSCustomX.AMethod is called, but your TWin32WSCustomX.AMethod is not called?

Mattias

Reply by email

Antônio
to Mattias Gaertner

Yes.

2014-11-08 11:22 GMT-02:00 Mattias Gaertner :

Show quoted text 31 lines
On Sat, 8 Nov 2014 11:04:45 -0200 Ant?nio wrote: > The class name is TWin32WSCustomX and the problem is about a function which > does not result. Any limit? Any restriction? > > 2014-11-08 11:00 GMT-02:00 Ant?nio : > > > Correct me if I am wrong. > > > > Now I know that TWn32WSCustomX classes are linked at runtime to TWSCustomX > > class procedures and functions, which are empty. > > > > My problem is that one of these functions does not result, I don't know > > why. (I have already written some procedures that return, but now one of > > these fails). Any idea? Do you mean the TWSCustomX.AMethod is called, but your TWin32WSCustomX.AMethod is not called? Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/27c59685/attachment.html>

Reply by email

Mattias Gaertner
to Antônio
Show quoted text 5 lines
[...] > Do you mean the TWSCustomX.AMethod is called, but your > TWin32WSCustomX.AMethod is not called? Yes

Is RegisterWSComponent(TWSCustomX,TWin32WSCustomX) called?

Mattias

Reply by email

Antônio
to Mattias Gaertner
function WSRegisterCustomX: Boolean; external name 'WSRegisterCustomX';

Where it should be called?

Ant?nio

2014-11-08 12:10 GMT-02:00 Mattias Gaertner :

Show quoted text 19 lines
On Sat, 8 Nov 2014 11:27:22 -0200 Ant?nio wrote: >[...] > > Do you mean the TWSCustomX.AMethod is called, but your > > TWin32WSCustomX.AMethod is not called? > > Yes Is RegisterWSComponent(TWSCustomX,TWin32WSCustomX) called? Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/6c2dc80f/attachment.html>

Reply by email

Antônio
to Antônio
class procedure TCustomX.WSRegisterClass;
begin
  inherited;
  WSRegisterCustomX;
end;

2014-11-08 12:47 GMT-02:00 Ant?nio :

Show quoted text 29 lines
function WSRegisterCustomX: Boolean; external name 'WSRegisterCustomX'; Where it should be called? Ant?nio 2014-11-08 12:10 GMT-02:00 Mattias Gaertner : On Sat, 8 Nov 2014 11:27:22 -0200 > Ant?nio wrote: > > >[...] > > > Do you mean the TWSCustomX.AMethod is called, but your > > > TWin32WSCustomX.AMethod is not called? > > > > Yes > > Is RegisterWSComponent(TWSCustomX,TWin32WSCustomX) called? > > Mattias > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/2443c7d0/attachment-0001.html>

Reply by email

Mattias Gaertner
to Antônio

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Show quoted text 5 lines
class procedure TCustomX.WSRegisterClass; begin inherited; WSRegisterCustomX; end;

Is it called?

Mattias

Reply by email

Antônio
to Mattias Gaertner

Where it should be called? In what method?

Ant?nio

2014-11-08 14:37 GMT-02:00 Mattias Gaertner :

Show quoted text 25 lines
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? On Sat, 8 Nov 2014 12:49:58 -0200 Ant?nio wrote: > class procedure TCustomX.WSRegisterClass; > begin > inherited; > WSRegisterCustomX; > end; Is it called? Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/ca2571c6/attachment.html>

Reply by email

Antônio
to Antônio

Well, now I understand what you mean. Yes, it is called.

Ant?nio

2014-11-08 14:57 GMT-02:00 Ant?nio :

Show quoted text 33 lines
Where it should be called? In what method? Ant?nio 2014-11-08 14:37 GMT-02:00 Mattias Gaertner : A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > On Sat, 8 Nov 2014 12:49:58 -0200 > Ant?nio wrote: > > > class procedure TCustomX.WSRegisterClass; > > begin > > inherited; > > WSRegisterCustomX; > > end; > > Is it called? > > > Mattias > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/7e0a7adc/attachment-0001.html>

Reply by email

Mattias Gaertner
to Antônio

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Show quoted text 9 lines
Well, now I understand what you mean. Yes, it is called. [...] >> > class procedure TCustomX.WSRegisterClass; >> > begin >> > inherited; >> > WSRegisterCustomX; >> > end; >> >> Is it called?

What does WSRegisterCustomX do?

Mattias

Reply by email

Antônio
to Mattias Gaertner
function WSRegisterCustomX: Boolean; external name 'WSRegisterCustomX';

{...}

class procedure TCustomX.WSRegisterClass;
begin
  inherited;
  WSRegisterCustomX;
end;

Ant?nio

2014-11-08 22:07 GMT-02:00 Mattias Gaertner :

Show quoted text 28 lines
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? On Sat, 8 Nov 2014 15:25:37 -0200 Ant?nio wrote: > Well, now I understand what you mean. Yes, it is called. >[...] > >> > class procedure TCustomX.WSRegisterClass; > >> > begin > >> > inherited; > >> > WSRegisterCustomX; > >> > end; > >> > >> Is it called? What does WSRegisterCustomX do? Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141108/bfa0fa2e/attachment.html>

Reply by email

Dmitry Boyarintsev
to Antônio: Sorry for the big message, Gnail hides me the rest of the message. The control is…
Ant?nio wrote
The control is TRichMemo. Hello Ant?nio

Need to be noted that RichMemo is not part of standard LCL but a separate package.
Thus it has its own set of "register" process.

See richmemofactory.pas. This is the place where the Widgetset-specific RichMemo implementation is registered with LCL-RichMemo class.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141109/0dad3bbe/attachment.html>

Reply by email

Antônio
to Antônio

Dear Dimitry,

I have the RichMemo Revision 3703 version and I am trying to implement some extra features. I have made this for 2 ou 3 methods, but now I have a method which does not respond. I don't know why this occurs and if you could clarify this I would appreciate.

Ant?nio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141109/9803ec09/attachment.html>

Reply by email

Dmitry Boyarintsev
to Antônio: Hi, Dimitry So what the hell do class procedure TCustomRichMemo.WSRegisterClass? Ant?nio…
Ant?nio wrote
So what the hell do class procedure TCustomRichMemo.WSRegisterClass? It associates the LCL TCustomRichMemo with a certain WS-handler class.

That's necessary at the time TRichMemo is allocated by LCL it would receive a proper WS-level handler associated.
If there's no WS-specific handler registered/implemented, then TRichMemo would still be allocated by won't do have any RichMemo specific functionality.
As an example Qt widgetset doesn't have any implementation of RichMemo handles. However, an application using RichMemp could still be allocated.

Please note that WSRegisterClass is necessary for controls that heavily depend on the underlying widgetset. Pure cross-platform controls don't need this kind of bindings.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141109/fba30780/attachment.html>

Reply by email

Dmitry Boyarintsev
to Antônio: I have the RichMemo Revision 3703 version and I am trying to implement some extra…

Ant?nio

I can only guess that the changes you're talking about were reported here: http://bugs.freepascal.org/view.php?id=27009

From the changes I can see noted there, they're done not quite accurate

manner.
For example, Windows specific code is moved to TWSCustomRichMemo class (WSRichMemo.pas).

However, for the Win-widgetset the code should be added to TWin32WSCustomRichMemo (win32richmemo.pas)
Since TWin32WSCustomRichMemo drives RichMemo for Windows . TWSCustomRichMemo is only used for "unsupported" widgetset (such as Qt) or projected widgetsets (such as Cocoa)

thanks,
Dmitry

Ant?nio wrote 16 lines
Dear Dimitry, I have the RichMemo Revision 3703 version and I am trying to implement some extra features. I have made this for 2 ou 3 methods, but now I have a method which does not respond. I don't know why this occurs and if you could clarify this I would appreciate. Ant?nio -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141109/57e6ff5a/attachment-0001.html>

Reply by email

Antônio
to Dmitry Boyarintsev

Forget what I wrote on that bugreport. Now I have added to TWin32WSCustomRichMemo.

class function TWin32WSCustomRichMemo.GetColor(const AWinControl:
TWinControl) :TColor;
begin
  SayHello;   // this fails
end;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141109/31453fef/attachment.html>

Reply by email

Dmitry Boyarintsev
to Antônio
Ant?nio wrote
Windows RichEdit messages refer to selection, you don't need to refer to text range. Windows specific implementation has no effect on the interface of RichMemo.

However, if there's a glitch in the Windows implementation please report it.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141110/2fc25450/attachment.html>

Reply by email

Frederic Da Vitoria
to Antônio: Sorry for the big message, Gnail hides me the rest of the message. The control is…

2014-11-09 12:27 GMT+01:00 Ant?nio :

Sorry for the big message, Gnail hides me the rest of the message.

After clicking on the answer button, press <Down> twice (which selects the ellipsis) then press <Enter> and voil?, you get the message contents, which you can edit as you like.

But I agree GMail makes this unnecessarily complicated.

Membre de l'April - ? promouvoir et d?fendre le logiciel libre ? - http://www.april.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141110/9f78506d/attachment.html>

Reply by email

Dmitry Boyarintsev
to Antônio: Why not to implement it on Windows in a way it works fine on this OS? Ant?nio…
Ant?nio wrote
Why not to implement it on Windows in a way it works fine on this OS?

Gtk development team failed to copy WinAPI obviously.

But to be more serious, Gtk doesn't provide RTF native reading.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141110/96090fc6/attachment.html>

Reply by email

waldo kitty
to Frederic Da Vitoria: 2014-11-09 12:27 GMT+01:00 Ant?nio : After clicking on the answer button, press <Down>…
Frederic Da Vitoria wrote 9 lines
2014-11-09 12:27 GMT+01:00 Ant?nio : Sorry for the big message, Gnail hides me the rest of the message. After clicking on the answer button, press <Down> twice (which selects the ellipsis) then press <Enter> and voil?, you get the message contents, which you can edit as you like. But I agree GMail makes this unnecessarily complicated.

FWIW: this is why i use thunderbird (or another local storage mail client) and pull my mail off of gmail's servers using POP3 to my local machine to handle in a traditional manner ;)

NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Lukasz Sokol
to Frederic Da Vitoria: 2014-11-09 12:27 GMT+01:00 Ant?nio : After clicking on the answer button, press <Down>…
Frederic Da Vitoria wrote 12 lines
2014-11-09 12:27 GMT+01:00 Ant?nio < <mailto:>>: Sorry for the big message, Gnail hides me the rest of the message. After clicking on the answer button, press <Down> twice (which selects the ellipsis) then press <Enter> and voil?, you get the message contents, which you can edit as you like. But I agree GMail makes this unnecessarily complicated.

(the below is to Ant?nio actually but replied to Frederic to keep OT janitor duty to minimum)

Please also don't top-post if you don't have to.
(are you using a screen reader ? that would be just about only acceptable exception)

We are not commercial support operatives, we might not be 'on top of things' all the time.

Also this is a mailing list (though readable through a news server too) not a web forum with implicit threading.

/Not everybody/ has threading enabled or even available in their email/newsgroup readers /all/ the time.

Sometimes servers also mangle messages and the threading is lost, loosing context.

We need to see the message context and the natural reading sequence is down, not up.

Hence recommended place to put replies is UNDER the message, not above.

Regards

el es

Reply by email

Mattias Gaertner
to Reinier Olislagers: Ah, so it cannot be used directly in Lazarus as it isn't LGPL with linking exception. See…
Show quoted text 7 lines
On 11/11/2014 13:20, Ant?nio wrote: > Copyrighted by Elson Junio with LGPL. > > Ant?nio Ah, so it cannot be used directly in Lazarus as it isn't LGPL with linking exception.

The linking exception is to allow to use the LCL in a non (L)GPL application. Without it you can still use it in (L)GPL applications. For example the IDE.

See also http://bugs.freepascal.org/view.php?id=23383 where at that time certain parts of the code were marked GPL.

Mattias

Reply by email

Reinier Olislagers
to Antônio: Sorry, see by yourself: http://wiki.freepascal.org/lzRichEdit#License Ant?nio…
Ant?nio wrote

As I posted on the forum:
http://forum.lazarus.freepascal.org/index.php/topic,26425.0.html

lzrichedit.zip does not mention license in readme or in doc folder. In the .lpk package, it mentions LGPL (so not "modified LGPL")

Apparently (I haven't checked) the pas files contain the modified LGPL license, so I suggested on the forum to harmonize the licenses so that they match the actual license.

Thanks,
Reinier

Reply by email

Mattias Gaertner
to Reinier Olislagers
Show quoted text 7 lines
On 11/11/2014 17:53, Mattias Gaertner wrote: > The linking exception is to allow to use the LCL in a non (L)GPL > application. Without it you can still use it in (L)GPL applications. > For example the IDE. Yes, you're right. I did mean the LCL... because that seems like the only obvious place such a component could go...

According to the Wiki it only supports Linux/gtk2 and Windows/Win32. It is too early to add it to the LCL, isn't it?

Mattias

Reply by email

Dmitry Boyarintsev
to Antônio: Well, it seems that we have RichMemo, which does not work on Windows, and lzRichEdit…
Ant?nio wrote
Well, it seems that we have RichMemo, which does not work on Windows

Oh snap! These are loud words.
Please bug report what exactly doesn't work.

Thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141111/830cb3a1/attachment.html>

Reply by email

Dmitry Boyarintsev
to Antônio
Ant?nio wrote
I could not install RichMemo other than 3703 revision because the code does not compile and/or does not install (I can not understand that).

What revisions did you try and what was the error message? Is it true that r3703 installed for you after all?

Thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141111/656dea8b/attachment.html>

Reply by email

Reinier Olislagers
to Antônio: I don't say about copy/paste code, I refer to a person who could say to the two that we…
Ant?nio wrote
I don't say about copy/paste code, I refer to a person who could say to the two that we need to implement RichEdit in LCL.

"The two"? I don't really understand what you mean there. In fact, I have trouble understanding how this is a reply to my post. If neccesary, could you explain a bit more what you mean?

I refered to issues when using code with incompatible licenses. You yourself said to look at the lazrichtedit implementation. I'm qualifying that with the warning that incompatible licenses do not allow code reuse.

Reply by email

Reinier Olislagers
to Antônio
Ant?nio wrote
I guess that license would not be a problema to Elson Junio. But maybe he uses the wrong license, I don't know.

Mmm well, I tried to explain in my forum posts and this mail thread...

> "The two"? I don't really understand what you mean there. Dimitry and Elson.

Ah ok, thanks.

Reply by email

Dmitry Boyarintsev
to Antônio: You can joke or you can implement RichEdit on Windows. The choice is yours. See…
Ant?nio wrote
You can joke or you can implement RichEdit on Windows. The choice is yours. See lzRichEdit implementation.

I see what you mean now.
If you want to adjust paragraph attributes for the current selection only then you can subclass RichMemo (or CustomRichMemo) and add delphi RichEdit compatible properties, that would use existing RichMemo methods.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141119/8ce825a1/attachment-0001.html>

Reply by email

Dmitry Boyarintsev
to Dmitry Boyarintsev

On Wed, Nov 19, 2014 at 1:04 AM, Dmitry Boyarintsev <

Show quoted text 7 lines
wrote: If you want to adjust paragraph attributes for the current selection only then you can subclass RichMemo (or CustomRichMemo) and add delphi RichEdit compatible properties, that would use existing RichMemo methods.

Don't even have to subclass.
http://wiki.freepascal.org/RichMemo#.28Delphi.29_RichEdit_like_interface

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141119/2621f832/attachment.html>

Reply by email