On Fri, 10 Mar 2006 18:23:59 +0100
darekM <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner napisa?(a):
> > On Fri, 10 Mar 2006 17:41:31 +0100
> > darekM <[EMAIL PROTECTED]> wrote:
> >
> >   
> >> Hi
> >>    without this patch tLabel and tSpeedButton not work proper with
> >> caption in UTF8 and Unicode fonts
> >>     
> >
> > You replaced several If..else with an assert. For example:
> >
> > -      If UseFont = nil then
> > -        DebugLn('WARNING: [TGtkWidgetSet.TextOut] Missing Font')
> > -      else begin
> > +        assert(UseFont<>nil,'WARNING: [TGtkWidgetSet.TextOut] Missing
> > Font');
> >
> > If UseFont is nil, then it almost always means, the calling code did
> > something wrong. The gtk intf should not continue, because otherwise the
> > gtk will give a warning, and this will be far less helpful, than the
> > above. It should not be replaced by an assert, because the warning
> > should be written even in non debugging code. It can only be replaced
> > with an raise exception, but that would be incomaptible to the other
> > widgetsets.
> >   
> 
> Ok, I can revert it.
> But I want to:
> 1.  remove any write to console in release version of my program

Of course. In a release version you will hopefully use the functions
properly and then you will not see any output. If you have a bug, then the
program will not crash, but write a warning, that your user can tell you and
this will help you to fix the bug.


> 2. When I test my Delphi application, I noticed that  function with any 
> strings operators  work longer, even if then not reach that line (Delphi 
> make longer "preamble" to that functions) , enough to move that code to 
> subfunction - in FPC is the same (if somebody understand me)

That's because of the hidden exception frame.
AFAIK using string constants without operators do not create such frames.
That's why the lazarus code at all time critical places works without string
operators.


> Darek
> 
> PS. What with my last patch about tComboBox

I will search ...

Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to