Re: [Lazarus] Assign not working on text files (fwd)

2014-11-09 Thread Michael Van Canneyt
Hello, Sent to me, but I am forwarding it to the list because it contains a question for everyone. There is no global class chart, to my knowledge. The FPC docs have a chart, but it only covers non-visual components (essentially, the FCL classes). With fpdoc there is a tool that creates a cl

Re: [Lazarus] Toolbar divider issues

2014-11-09 Thread Giuliano Colla
Il 09/11/2014 19:01, Vojtěch Čihák ha scritto: Hi, CalcPreferredSize is called only when Autosize is True, it's not this case. No, it's called always, also when Autosize is false. It gets called starting from TToolButton.GetPreferredSize. In a minimal test program with a toolbar and Aut

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-09 Thread Dmitry Boyarintsev
On Sun, Nov 9, 2014 at 4:42 PM, Antônio 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.free

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:37 PM, Antônio 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 -- _

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 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
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.la

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).

Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Dmitry Boyarintsev
On Sun, Nov 9, 2014 at 3:26 PM, 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 a

Re: [Lazarus] TWin32WSCustomX class

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

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 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 Dmitry Boyarintsev
On Sun, Nov 9, 2014 at 6:27 AM, 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

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.lazaru

Re: [Lazarus] Toolbar divider issues

2014-11-09 Thread Vojtěch Čihák
Hi,   CalcPreferredSize is called only when Autosize is True, it's not this case.   Furthermore, I found this code in Componenteditors.pas in procedure TToolBarComponentEditor.ExecuteVerb(Index: Integer); around line 1255:   if NewStyle = tbsDivider then   NewToolButton.Width := 3;    IMO if defau

Re: [Lazarus] TWin32WSCustomX class

2014-11-09 Thread Mattias Gaertner
On Sat, 8 Nov 2014 22:29:02 -0200 Antônio wrote: > function WSRegisterCustomX: Boolean; external name 'WSRegisterCustomX'; > > {...} > > class procedure TCustomX.WSRegisterClass; > begin > inherited; > WSRegisterCustomX; > end; >[...] > > What does WSRegisterCustomX do? And? Mattias -- _

Re: [Lazarus] Toolbar divider issues

2014-11-09 Thread Giuliano Colla
Il 09/11/2014 17:39, Giuliano Colla ha scritto: Il 09/11/2014 15:04, Vojtěch Čihák ha scritto: [...] If you look into the matter, please do not forget that a toolbar can be either horizontal or vertical. [...] Another issue: prior to the patch, changing orientation from horizontal to

Re: [Lazarus] Toolbar divider issues

2014-11-09 Thread Giuliano Colla
Il 09/11/2014 15:04, Vojtěch Čihák ha scritto: Hi, with this code: procedure TToolButton.SetStyle(Value: TToolButtonStyle); begin if FStyle = Value then exit; FStyle := Value; if Value = tbsSeparator then Width := 10; if Value = tbsDivider then Width := 5; InvalidatePreferredSize;

Re: [Lazarus] TFMTBCDField problem

2014-11-09 Thread Chris Rempas
I am almost convinced that the problem is not what i am seeing...this code works if VSQLVar^.sqlscale = 0 then  i := AParams[ParNr].AsIntegerelse//i := Round(AParams[ParNr].AsCurrency * IntPower10(-VSQLVar^.sqlscale));   i := Round(BCDToDouble(AParams[ParNr].AsFMTBCD) * IntPower10(-VSQLVar^.sqlsc

Re: [Lazarus] Assign not working on text files

2014-11-09 Thread Michael Van Canneyt
On Sun, 9 Nov 2014, Bart wrote: On 11/9/14, Stefanos Beligiannis wrote: If somebody has met this problem please advise. code varf : text; fn,nam : string; begin fn:=Edit2.Caption; {$I-} assign(f,fn); if (not FileExists(fn)) then Rewrite(f) else A

Re: [Lazarus] Assign not working on text files

2014-11-09 Thread Bart
On 11/9/14, Stefanos Beligiannis wrote: > If somebody has met this problem please advise. > code varf : text; > fn,nam : string; > > begin > fn:=Edit2.Caption; > {$I-} > assign(f,fn); > if (not FileExists(fn)) then Rewrite(f) else Append(f); > {$I+

[Lazarus] Assign not working on text files

2014-11-09 Thread Stefanos Beligiannis
If somebody has met this problem please advise. code var    f : text;     fn,nam : string;    begin fn:=Edit2.Caption; {$I-} assign(f,fn); if (not FileExists(fn)) then Rewrite(f) else Append(f); {$I+}- end codecompiler error report---

Re: [Lazarus] Toolbar divider issues

2014-11-09 Thread Vojtěch Čihák
Hi,   with this code:    procedure TToolButton.SetStyle(Value: TToolButtonStyle); begin   if FStyle = Value then exit;   FStyle := Value;   if Value = tbsSeparator then Width := 10;   if Value = tbsDivider then Width := 5;   InvalidatePreferredSize;   if IsControlVisible then   UpdateVisibleToolba

Re: [Lazarus] Toolbar divider issues

2014-11-09 Thread Vojtěch Čihák
Hi,   @Is that expected, or it must be considered a bug?   That depends. Bugreport title is "ToolBar separator can't change width." Now all dividers and separators on TToolBar can have different width.   Therefore, saying "when created in code both Separator and divider are 23 pixels,..." is mean

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

[Lazarus] Toolbar divider issues

2014-11-09 Thread Giuliano Colla
With rev 46741 (patch from bug 25291) the default width of Toolbar Divider and Separator has become inconsistent. Before the patch, both from IDE designer and from component created in code, Separator width was 10 pixels, and Divider width 5 pixels. After the patch, from IDE designer Separato