Re: [Lazarus] TWin32WSCustomX class

2014-11-19 Thread Dmitry Boyarintsev
On Wed, Nov 19, 2014 at 1:04 AM, Dmitry Boyarintsev 
skalogryz.li...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-19 Thread Antônio
Congratulations.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-18 Thread Dmitry Boyarintsev
On Mon, Nov 10, 2014 at 4:24 PM, Antônio antoniog12...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Reinier Olislagers
On 11/11/2014 20:36, 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.




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Antônio
I guess that license would not be a problema to Elson Junio. But maybe he
uses the wrong license, I don't know.

 The two?  I don't really understand what you mean there.

Dimitry and Elson.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Reinier Olislagers
On 12/11/2014 13:23, 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.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Antônio
What could I do to solve the license problem?

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Reinier Olislagers
On 12/11/2014 13:34, Antônio wrote:
 What could I do to solve the license problem?
 

http://forum.lazarus.freepascal.org/index.php/topic,26425.msg162338.html#msg162338
 So apparently the information in the .lpk file and the pas files is 
 conflicting:
 lpk file: LGPL
 pas file (text on wiki): modified LGPL (=LGPL with linking exception)
 I'd suggest updating the files so they all match the actual license...




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Mattias Gaertner
On Wed, 12 Nov 2014 10:34:48 -0200
Antônio antoniog12...@gmail.com wrote:

 What could I do to solve the license problem?

Ask the authors for permission to publish the code under modified LGPL2.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Antônio
 Ask the authors for permission to publish the code under modified LGPL2.

Sure, I will do it.

Antõnio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Antônio
Where to find a copy of modified LGPL2?

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Mattias Gaertner
On Wed, 12 Nov 2014 11:53:05 -0200
Antônio antoniog12...@gmail.com wrote:

 Where to find a copy of modified LGPL2?

COPYING.modifiedLGPL.txt and COPYING.LGPL.txt.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Antônio
So the exact line in LPK file should be this?

License Value=modified LGPL/

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Antônio
Well, done. The author agrees and the package will be modified.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-12 Thread Antônio
Thanks Mattias and Reinier for the help.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Reinier Olislagers
On 10/11/2014 22:24, Antônio wrote:
 You can joke or you can implement RichEdit on Windows. The choice is yours.
 
 See lzRichEdit implementation.
 

Was that the one with the uncertain copyright/legal status?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class [OT]

2014-11-11 Thread Lukasz Sokol
On 10/11/14 20:27, Frederic Da Vitoria wrote:
 2014-11-09 12:27 GMT+01:00 Antônio antoniog12...@gmail.com 
 mailto:antoniog12...@gmail.com:
 
 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



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
Copyrighted by Elson Junio with LGPL.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class [OT]

2014-11-11 Thread Antônio
I am deleting the whole text which Gmail putted below this. I don't know
how it arrives to you, but it is what I am doing.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
I have just created the wiki page:

http://wiki.freepascal.org/lzRichEdit

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Reinier Olislagers
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.

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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
Yes, this is the component. Maybe the author can change the license if you
put it on Lazarus. Something to check.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
Sorry, see by yourself:

http://wiki.freepascal.org/lzRichEdit#License

Antõnio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Mattias Gaertner
On Tue, 11 Nov 2014 17:39:51 +0100
Reinier Olislagers reinierolislag...@gmail.com wrote:

 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class [OT]

2014-11-11 Thread Lukasz Sokol
It arrives exactly like you wrote it. 
But it's not good enough: no need to delete ALL previous message,

JUST the not-important bits,
AND start writing response BELOW them and inline.

(screen reader exception applies, but then, would a screen reader work on GMail 
?).

el es


(how was this now without the whole or even part context ?)

[EOT from my side]



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
Yes, thanks.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Reinier Olislagers
On 11/11/2014 17:52, Antônio wrote:
 Sorry, see by yourself:
 
 http://wiki.freepascal.org/lzRichEdit#License

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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Reinier Olislagers
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...


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Mattias Gaertner
On Tue, 11 Nov 2014 18:11:53 +0100
Reinier Olislagers reinierolislag...@gmail.com wrote:

 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
Well, it seems that we have RichMemo, which does not work on Windows, and
lzRichEdit which works only on 2 platforms. Maybe someone can merge them
and implement a Lazarus.RichEdit.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
For 3 platforms.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Reinier Olislagers
Oh if you want to nitpick... In my initial post I talked about
using/copying the code Into the LCL obviously.

And no I did not say the component should go into the LCL /now/
(nitpicking myself here)

I just wanted to warn people to not copy paste code.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
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.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Dmitry Boyarintsev
On Tuesday, November 11, 2014, Antônio antoniog12...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
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). So I could
not find any bug you would consider relevant.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Dmitry Boyarintsev
On Tuesday, November 11, 2014, Antônio antoniog12...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-11 Thread Antônio
I could not remember.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Dmitry Boyarintsev
Hello Antonio

Please note that Undo is part of the WSCustomMemo, thus it should not be
reintroduced in RichMemo.
Other attributes getting methods are just duplicates of the existing
method GetTextAttribute. Sorry - not acceptable. .

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Antônio
GetTextAttribute depends on SelStart and it causes errors.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Dmitry Boyarintsev
On Mon, Nov 10, 2014 at 9:55 AM, Antônio antoniog12...@gmail.com wrote:

 GetTextAttribute depends on SelStart and it causes errors.

 GetTextAttributes accepts start/end of the text. Which can be different
than SelStart value.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Antônio
Windows RichEdit messages refer to selection, you don't need to refer to
text range.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Dmitry Boyarintsev
On Mon, Nov 10, 2014 at 9:59 AM, Antônio antoniog12...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Antônio
Of course I could not see your implementation because I could not install
any other version than 3703 revision.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Antônio
Does RichMemo work fine in Linux?

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Dmitry Boyarintsev
On Mon, Nov 10, 2014 at 11:56 AM, Antônio antoniog12...@gmail.com wrote:

 Does RichMemo work fine in Linux?

 It does work fine to a certain extent.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Antônio
Why not to implement it on Windows in a way it works fine on this OS?

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Dmitry Boyarintsev
On Mon, Nov 10, 2014 at 1:47 PM, Antônio antoniog12...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread Antônio
You can joke or you can implement RichEdit on Windows. The choice is yours.

See lzRichEdit implementation.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-10 Thread waldo kitty

On 11/10/2014 3:27 PM, Frederic Da Vitoria wrote:

2014-11-09 12:27 GMT+01:00 Antônio antoniog12...@gmail.com:

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.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
Sorry for the big message, Gnail hides me the rest of the message.

The control is TRichMemo.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
I have already said, I think:

function WSRegisterCustomX: Boolean; external name 'WSRegisterCustomX';

{...}

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

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Dmitry Boyarintsev
On Sun, Nov 9, 2014 at 6:27 AM, Antônio antoniog12...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
Hi, Dimitry

So what the hell do class procedure TCustomRichMemo.WSRegisterClass?

Thanks,
Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
I know it is called.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Dmitry Boyarintsev
On Sun, Nov 9, 2014 at 3:26 PM, Antônio antoniog12...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Dmitry Boyarintsev
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

On Sun, Nov 9, 2014 at 3:48 PM, Antônio antoniog12...@gmail.com wrote:

 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
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
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;
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
Before this I have added an empty clone method in WSRichMemo.

Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
In fact the method name is GetSelectionColor, which is not coincident with
any other method you could have written before.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Dmitry Boyarintsev
On Sun, Nov 9, 2014 at 4:37 PM, Antônio antoniog12...@gmail.com wrote:

 In fact the method name is GetSelectionColor, which is not coincident with
 any other method you could have written before.

So let's trade.
You share your code, I share the knowledge of what is wrong with it.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
Should I post the files here:?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Dmitry Boyarintsev
On Sun, Nov 9, 2014 at 4:42 PM, Antônio antoniog12...@gmail.com wrote:

 Should I post the files here:?

 You could post the diff file here or you could attach it to the bug report
you've already created.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Antônio
Done in the bug report.

Thanks.
Antônio
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread 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 antoniog12...@gmail.com:

 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread Mattias Gaertner
On Sat, 8 Nov 2014 11:04:45 -0200
Antônio antoniog12...@gmail.com 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 antoniog12...@gmail.com:
 
  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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread Antônio
Yes.

2014-11-08 11:22 GMT-02:00 Mattias Gaertner nc-gaert...@netcologne.de:

 On Sat, 8 Nov 2014 11:04:45 -0200
 Antônio antoniog12...@gmail.com 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 antoniog12...@gmail.com:
 
   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
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread Mattias Gaertner
On Sat, 8 Nov 2014 11:27:22 -0200
Antônio antoniog12...@gmail.com 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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread Antônio
class procedure TCustomX.WSRegisterClass;
begin
  inherited;
  WSRegisterCustomX;
end;

2014-11-08 12:47 GMT-02:00 Antônio antoniog12...@gmail.com:

 function WSRegisterCustomX: Boolean; external name 'WSRegisterCustomX';

 Where it should be called?

 Antônio

 2014-11-08 12:10 GMT-02:00 Mattias Gaertner nc-gaert...@netcologne.de:

 On Sat, 8 Nov 2014 11:27:22 -0200
 Antônio antoniog12...@gmail.com 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
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread 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 antoniog12...@gmail.com wrote:

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

Is it called?


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread Antônio
Where it should be called? In what method?

Antônio

2014-11-08 14:37 GMT-02:00 Mattias Gaertner nc-gaert...@netcologne.de:

 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 antoniog12...@gmail.com wrote:

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

 Is it called?


 Mattias

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread 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 antoniog12...@gmail.com:

 Where it should be called? In what method?

 Antônio

 2014-11-08 14:37 GMT-02:00 Mattias Gaertner nc-gaert...@netcologne.de:

 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 antoniog12...@gmail.com wrote:

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

 Is it called?


 Mattias

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread Antônio
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 nc-gaert...@netcologne.de:

 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 antoniog12...@gmail.com 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
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TWin32WSCustomX class

2014-11-08 Thread Felipe Monteiro de Carvalho
Is this control really called X? What does it do? And why does it
need a WS implementation, it will go to Lazarus sources?

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus