[lazarus] close application

2007-07-12 Thread faread wajdy
helooo...can u help me.i have problem when i was writing coding lazarus in OS 
win32/windows after that i compile in lazarus with os linux i get problem.the 
problem is when i compile in linux the lazarus application close it self.why?


thank's 


faread,

 
-
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.

Re: [lazarus] Working with XML: crosscompatibility

2007-07-12 Thread David Lyon

Brett Hunter wrote:

Has anyone tried NativeXML?  I have compiled it under both Delphi and
Lazarus and don't seem to have any problems (it took about 5 minutes to
change some code to get it to work).
  

it looks good... but I'm after something that is open source also

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


Re: [lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread A.J. Venter

Hi again
Well it worked partially, it got the STATIC messages translated, but
not the dynamic ones.

First of those are the error messages. I use a little wrapper
procedure to show them (they are captions on a tpanel)

Procedure ShowError(Error:String);
Begin
  OKLinMain.ErrorLabel.Caption := Error;
  OKLinMain.ErrorLabel.Visible := True;
  Writeln(Error);
end;

Then wherever in the code is needed, I call showerror. So I defined
resource strings for
my error messages, and replaced the first few. Sure enough I could
translate them, but the resulting program doesn´t show their
translations.
The static parts are all translating just fine, but these ones are not
translating at all.

showError(LoggedInUser+' '+Utf8ToAnsi(RsHasBeenLoggedout))

Moreover this is clearly not an ideal setup for them since the grammer
would require the username to be elsewhere in the sentence sometimes
(how do I handle that), and there is the even more complex part where
I need to set a number of captions for a different form out of this
unit later on:

TrayIcon1.Hint := IntToStr(Units)+' Units remaining';
 Popup1.Caption := IntToStr(Units)+' Units remaining';
 Popup1.Panel1.Color := RGBToColor(227,108,42);
 Writeln(Units);
 Popup1.TextY.Caption := 'Welcome user '+LoggedInUser+LineEnding;
 Popup1.TextY.Caption := Popup1.TextY.Caption+'You have
'+IntToStr(Units)+' time units left'+LineEnding;

All of that should obviously ALSO be translated.

How do I do that part please ?

A.J.
--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread A.J. Venter

Thanks everybody,
By combining this with one other hunch, I have it working, I used
Mattias' example code, at first it still failed, until I changed my
call as follows:
LC_MESSAGES="af" ./oklin

I don't know why, but LANG does not seem to override LC_MESSAGES

Either way, it's working, thanks everybody.

A.J.

On 7/12/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote:

On Thu, 12 Jul 2007 22:35:40 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> > And there are two TranslateUnitResourceStrings functions. The one
> > with 4 parameters expects the file mask, the other a specific .po
> > file. If the file does not exist it returns false.
> In which unit is this second one declared ?

Both are defined in lcl/translations.pas.

> ? And which one should I use ?

See the example: The function with 4 parameters.


> > Try this:
> >   GetLanguageIDs(Lang,FallbackLang);
> >   TranslateUnitResourceStrings('oklinmainunit',
> > LANGPATH+PathDelim+'oklin.%s.po',Lang,FallbackLang);
> I'll try this

The GetLanguageIDs is defined in gettext.

Mattias

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




--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread Mattias Gaertner
On Thu, 12 Jul 2007 22:35:40 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> > And there are two TranslateUnitResourceStrings functions. The one
> > with 4 parameters expects the file mask, the other a specific .po
> > file. If the file does not exist it returns false.
> In which unit is this second one declared ? 

Both are defined in lcl/translations.pas.

> ? And which one should I use ?

See the example: The function with 4 parameters.


> > Try this:
> >   GetLanguageIDs(Lang,FallbackLang);
> >   TranslateUnitResourceStrings('oklinmainunit',
> > LANGPATH+PathDelim+'oklin.%s.po',Lang,FallbackLang);
> I'll try this

The GetLanguageIDs is defined in gettext.

Mattias

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Andrew Haines
Felipe Monteiro de Carvalho wrote:
> Hi,
> 
> I just tested the Lazarus IDE with carbon, and it loads and looks
> reasonable:
> 
> http://magnifier.sourceforge.net/photos/Fullscreen_1.png
> 
> =)
> 
> It cannot be used, because SynEdit doesn't work (lot's of bugs: no
> Caret, when moves around the text the new text is painted over the old
> text, no scrollbars, etc, etc).
> 
> But, nevertheless, it's a great progress already =)
> 


I just compiled my lhelp program for the carbon interface (powerpc) and
it worked after I removed some TListView code. Great work!

Andrew


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


Re: [lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread A.J. Venter

And there are two TranslateUnitResourceStrings functions. The one with 4
parameters expects the file mask, the other a specific .po file.
If the file does not exist it returns false.

In which unit is this second one declared ? ? And which one should I use ?


Try this:
  GetLanguageIDs(Lang,FallbackLang);
  TranslateUnitResourceStrings('oklinmainunit',
LANGPATH+PathDelim+'oklin.%s.po',Lang,FallbackLang);

I'll try this

A.J.

--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread Luca Olivetti

En/na Mattias Gaertner ha escrit:


Then I run:
LANG="af" ./oklin


You forgot the && or ;

LANG="af" ; ./oklin


No, this is actually correct, it will execute a command with that 
environment variable set.


Bye
--
Luca

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


Re: [lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread Mattias Gaertner
On Thu, 12 Jul 2007 19:29:00 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> Hi all,
> I am trying to make OutKafe gettext translateable, using whatever code
> I can find for samples this is what my code now looks like:
> 
> ---
> uses
>   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
> ExtCtrls,Util,
>StdCtrls, Buttons , gtkproc, TrayIcon, popupnotifier,
> Menus,liboutkafe,popupunit,
>fileUtil,baseunix,unix, IpHtml, Ipfilebroker,gettext;
> 
> resourcestring
>  rsLoginDetails = 'Enter your login details to continue';
>  rsLoginName = 'Login Name';
>  rsPassword = 'Password';
>  rsLogin = 'Login';
> 
> procedure OklinMainForm.Create;
> 
> //LangPath is a const, it is set to /usr/share/outkafe/lang
> 
> TranslateUnitResourceStrings('oklinmainunit',
> LANGPATH+PathDelim+'oklin.%s.po');
>   Label1.Caption := Utf8ToAnsi(rsLoginDetails);
>   Label2.Caption := Utf8ToAnsi(rsLoginName);
>   Label3.Caption := Utf8ToAnsi(rsPassword);
>   LoginBtn.Caption :=  Utf8ToAnsi(rsLogin)
> ---
> 
> So I compile it, which generates an oklinmainunit.rst file, I run
> rstconv -i oklinmainunit.rst -o oklin.po
> cp oklin.po oklin.af.po
> 
> I edit oklin.af.po and copy it to /usr/share/outkafe/lang
> I ALSO run msgfmt oklin.af.po -o oklin.af.mo
> And put that in there as WELL,
> 
> Then I run:
> LANG="af" ./oklin

You forgot the && or ;

LANG="af" ; ./oklin

And there are two TranslateUnitResourceStrings functions. The one with 4
parameters expects the file mask, the other a specific .po file.
If the file does not exist it returns false.

Try this:
  GetLanguageIDs(Lang,FallbackLang);
  TranslateUnitResourceStrings('oklinmainunit',
LANGPATH+PathDelim+'oklin.%s.po',Lang,FallbackLang);

 
> But the program remains obstinately in English (no output in the
> console gives me any
> indication of why).
> 
> Can anybody give me an idea what I am doing wrong ?
> Why does the TranslateUnitResourceStrings function appear to have FOUR
> parameters in some calls (but not in the gettext unit) - is that
> alternative a better choice ? Where do I get it?


Mattias

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


Re: [lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread Giuliano Colla

A.J. Venter ha scritto:

Hi all,
I am trying to make OutKafe gettext translateable, using whatever code
I can find for samples this is what my code now looks like:

---
uses
 Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls,Util,
  StdCtrls, Buttons , gtkproc, TrayIcon, popupnotifier,
Menus,liboutkafe,popupunit,
  fileUtil,baseunix,unix, IpHtml, Ipfilebroker,gettext;

resourcestring
rsLoginDetails = 'Enter your login details to continue';
rsLoginName = 'Login Name';
rsPassword = 'Password';
rsLogin = 'Login';

procedure OklinMainForm.Create;

//LangPath is a const, it is set to /usr/share/outkafe/lang

   TranslateUnitResourceStrings('oklinmainunit',
LANGPATH+PathDelim+'oklin.%s.po');
 Label1.Caption := Utf8ToAnsi(rsLoginDetails);
 Label2.Caption := Utf8ToAnsi(rsLoginName);
 Label3.Caption := Utf8ToAnsi(rsPassword);
 LoginBtn.Caption :=  Utf8ToAnsi(rsLogin)
---

So I compile it, which generates an oklinmainunit.rst file, I run
rstconv -i oklinmainunit.rst -o oklin.po
cp oklin.po oklin.af.po

I edit oklin.af.po and copy it to /usr/share/outkafe/lang
I ALSO run msgfmt oklin.af.po -o oklin.af.mo
And put that in there as WELL,

Then I run:
LANG="af" ./oklin

But the program remains obstinately in English (no output in the
console gives me any
indication of why).

Can anybody give me an idea what I am doing wrong ?
Why does the TranslateUnitResourceStrings function appear to have FOUR
parameters in some calls (but not in the gettext unit) - is that
alternative a better choice ? Where do I get it?



I don't know what's wrong with what you're doing, but I can tell you 
what I've done. I wanted a way to translate in different languages, with 
some main constraints:


1) The translation must be a simple text file, so that any user may 
create a translation for his locale, or correct the translation.


2) I wanted the capability of switching from one language to another 
run-time, without closing the application. For example: a user is 
running the program, and uses Danish. A service man who doesn't speak 
Danish, but only English is assisting him. and takes over. He switches 
to English (otherwise he won't be able to understand button captions, 
messages, etc.), and then gives back the application to the user, which 
switches again to Danish. The application starts with the default 
environment language, but then it must very easy to change.


3) The process must be as far as possible transparent to the developer. 
He just sets Text or Caption properties, and translation occurs without 
any further action.


Therefore I devised my mechanism, which requires a minimal intervention 
on the caption property, and since then I'm happy.


When you have to deal with languages from Thai to Swedish, the number of 
headaches increases quickly, but since I started using my own way, the 
headaches have disappeared.


If you're interested I may give you more details.

Kind regards,

Giuliano

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


[lazarus] Gettext, what am I doing wrong ?

2007-07-12 Thread A.J. Venter

Hi all,
I am trying to make OutKafe gettext translateable, using whatever code
I can find for samples this is what my code now looks like:

---
uses
 Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls,Util,
  StdCtrls, Buttons , gtkproc, TrayIcon, popupnotifier,
Menus,liboutkafe,popupunit,
  fileUtil,baseunix,unix, IpHtml, Ipfilebroker,gettext;

resourcestring
rsLoginDetails = 'Enter your login details to continue';
rsLoginName = 'Login Name';
rsPassword = 'Password';
rsLogin = 'Login';

procedure OklinMainForm.Create;

//LangPath is a const, it is set to /usr/share/outkafe/lang

   TranslateUnitResourceStrings('oklinmainunit',
LANGPATH+PathDelim+'oklin.%s.po');
 Label1.Caption := Utf8ToAnsi(rsLoginDetails);
 Label2.Caption := Utf8ToAnsi(rsLoginName);
 Label3.Caption := Utf8ToAnsi(rsPassword);
 LoginBtn.Caption :=  Utf8ToAnsi(rsLogin)
---

So I compile it, which generates an oklinmainunit.rst file, I run
rstconv -i oklinmainunit.rst -o oklin.po
cp oklin.po oklin.af.po

I edit oklin.af.po and copy it to /usr/share/outkafe/lang
I ALSO run msgfmt oklin.af.po -o oklin.af.mo
And put that in there as WELL,

Then I run:
LANG="af" ./oklin

But the program remains obstinately in English (no output in the
console gives me any
indication of why).

Can anybody give me an idea what I am doing wrong ?
Why does the TranslateUnitResourceStrings function appear to have FOUR
parameters in some calls (but not in the gettext unit) - is that
alternative a better choice ? Where do I get it?

TIA
A.J.
--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] Spell Check and Thesaurus

2007-07-12 Thread Henry Vermaak

On 12/07/07, Christian U. <[EMAIL PROTECTED]> wrote:

Leonardo M. Ramé schrieb:
> Does anybody knows an Open Source Spell Check and/or Thesaurus
> component for FreePascal/Delphi?
you can use aspell to do this, and control it with TProcess.

regards
Christian
>
> Thanks in advance,
> Leonardo M. Ramé
> http://leonardorame.blogspot.com


here's some info for aspell.  you might be able to use libaspell.

http://aspell.net/man-html/Writing-programs-to-use-Aspell.html

henry

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


Re: [lazarus] Spell Check and Thesaurus

2007-07-12 Thread Christian U.

Leonardo M. Ramé schrieb:
Does anybody knows an Open Source Spell Check and/or Thesaurus 
component for FreePascal/Delphi?

you can use aspell to do this, and control it with TProcess.

regards
Christian


Thanks in advance,
Leonardo M. Ramé
http://leonardorame.blogspot.com


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



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


[lazarus] Spell Check and Thesaurus

2007-07-12 Thread Leonardo M. Ramé
Does anybody knows an Open Source Spell Check and/or Thesaurus component 
for FreePascal/Delphi?


Thanks in advance,
Leonardo M. Ramé
http://leonardorame.blogspot.com


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


RE: [lazarus] Carbon native IDE

2007-07-12 Thread Hess, Philip J
Same thing further down in TCarbonDeviceContext.GetTextExtentPoint. If 
BeginTextRender fails due to a blank string, it should probably set Size.cx and 
Size.cy to 0, which would probably make sense to calling code (that is, the 
width of the string is 0). I notified Tomas of the issue with passing a blank 
string to BeginTextRender last week but he's been on holiday.

Thanks.

-Phil


-Original Message-
From: Paul Ishenin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 12, 2007 5:53 AM
To: lazarus@miraclec.com
Subject: Re: [lazarus] Carbon native IDE

Felipe Monteiro de Carvalho пишет:
> Hi,
> 
> I just tested the Lazarus IDE with carbon, and it loads and looks 
> reasonable:
> 
> http://magnifier.sourceforge.net/photos/Fullscreen_1.png
> 
> =)
> 
> It cannot be used, because SynEdit doesn't work (lot's of bugs: no
> Caret, when moves around the text the new text is painted over the old
> text, no scrollbars, etc, etc).
> 
> But, nevertheless, it's a great progress already =)

After experience with patching same issues in qt I have an idea.

Felipe, can you correct TCarbonDeviceContext.ExtTextOut a bit and retest?

Look at code.

if not BeginTextRender(Str, Count, TextLayout) then Exit;

SynEdit uses ExtTextOut to fill background. To do this SynEdit passes 
Empty Str argument and Count = 0. As result BeginTextRender return False 
and no bg filling will happen.

So if (Options and ETO_OPAQUE) <> 0 then backgound should be filled 
inspite of BeginTextRendere = False.


Best regards,
Paul Ishenin.


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

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


RE: [lazarus] Carbon native IDE

2007-07-12 Thread Hess, Philip J
Felipe,

I believe that SynEdit is a TCustomControl descendent. TCustomControl's
can't yet receive focus or keyboard input, as indicated as a bug on this
page:

http://wiki.lazarus.freepascal.org/Carbon_interface_internals#Bugs

Thanks.

-Phil


-Original Message-
From: Felipe Monteiro de Carvalho
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 12, 2007 6:39 AM
To: lazarus@miraclec.com
Subject: Re: [lazarus] Carbon native IDE

On 7/12/07, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:
> But which will be the rectangle to be filled if there is no text? The
> one in Rect argument?

Cool, I used the Rect argument and it works now =)

I commited the change.

If only I had a caret now =)

Keyboard input also doesn't work on the Carbon SynEdit.

-- 
Felipe Monteiro de Carvalho

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

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


[lazarus] timing how long a user is idle

2007-07-12 Thread Charl van Jaarsveldt

Hi,

I would like to have a procedure run after, say, 15 minutes of idle on the
computer. How do I do this? Is there a platform independent way?

Thanks
Charl

--
"I love deadlines. I especially love the whooshing sound they make as they
fly by." - Douglas Adams


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Felipe Monteiro de Carvalho

On 7/12/07, Andrew Haines <[EMAIL PROTECTED]> wrote:

can you send me your lazarus.app bundle? I compiled the ide for carbon
last night but it won't function without the bundle.


To create the bundle, I just followed the instructions here:

http://wiki.lazarus.freepascal.org/Carbon_Interface#Creating_the_Apple_resource_files

Althougth today I would probably copy one of my createbundle.sh
scripts, change the app name on it and execute it.

--
Felipe Monteiro de Carvalho

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


[lazarus] TSpeedButton bugs patch

2007-07-12 Thread Giuliano Colla

The attached patch fixes 2 issues for TSpeedButton:

1) With no Caption, the glyph is centered if Layout is Glyph Left or 
Glyph right, somewhere up or down with Glyph Top or Glyph Bottom. 
Reason: in speedbutton.inc, if Caption is empty, Result.CX is set twice 
to zero while Result.CY is left undetermined.


2) With a Caption, the glyph disappears if the layout is Glyph Bottom or 
Glyph Right.
Reason: the calculation increases Left (or Top) of the destination 
rectangle of the offset amount, and decreases Right (or Bottom) of the 
same quantity, determining a negative width (or height)


Regards,

Giuliano Colla
Index: lcl/include/speedbutton.inc
===
--- lcl/include/speedbutton.inc (revisione 11469)
+++ lcl/include/speedbutton.inc (copia locale)
@@ -871,8 +871,8 @@
   end
   else
   begin
+Result.CY:= 0;
 Result.CX:= 0;
-Result.CX:= 0;
   end;
 end;
 
Index: lcl/include/buttonglyph.inc
===
--- lcl/include/buttonglyph.inc (revisione 11469)
+++ lcl/include/buttonglyph.inc (copia locale)
@@ -102,26 +102,29 @@
   SrcRect := Rect((ImgID*gWidth), 0, ((ImgID+1)*gWidth), gHeight);
   DestRect:=Client;
   
-  if (Offset.X>=0) then begin
+
+  Inc(DestRect.Left, Offset.X);
+  {if (Offset.X>=0) then begin
 Inc(DestRect.Left, Offset.X);
 Dec(DestRect.Right, Offset.X); // image couldn't overlap rigth window edge
   end else begin
 Dec(SrcRect.Left, Offset.X);
 Inc(SrcRect.Right, Offset.X);
-  end;
+  end;}
   src_wh:=SrcRect.Right-SrcRect.Left; dst_wh:=DestRect.Right-DestRect.Left;
   if (dst_wh>src_wh) then
 DestRect.Right:=DestRect.Left+src_wh // if window for image is wider
   else if (dst_wh=0) then begin
+  Inc(DestRect.Top, Offset.Y);
+  {if (Offset.Y>=0) then begin
 Inc(DestRect.Top, Offset.Y);
 Dec(DestRect.Bottom, Offset.Y); // image couldn't overlap bottom window 
edge
   end else begin
 Dec(SrcRect.Top, Offset.Y);
 Inc(SrcRect.Bottom, Offset.Y);
-  end;
+  end;}
   src_wh:=SrcRect.Bottom-SrcRect.Top; dst_wh:=DestRect.Bottom-DestRect.Top;
   if (dst_wh>src_wh) then
 DestRect.Bottom:=DestRect.Top+src_wh // if window for image is higher


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Andrew Haines
Felipe Monteiro de Carvalho wrote:
> On 7/12/07, Felipe Monteiro de Carvalho
> <[EMAIL PROTECTED]> wrote:
>> But which will be the rectangle to be filled if there is no text? The
>> one in Rect argument?
> 
> Cool, I used the Rect argument and it works now =)
> 
> I commited the change.
> 
> If only I had a caret now =)
> 
> Keyboard input also doesn't work on the Carbon SynEdit.
> 


can you send me your lazarus.app bundle? I compiled the ide for carbon
last night but it won't function without the bundle.

Thanks,

Andrew

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


Re: [lazarus] Ide doesn't find units in the fcl (or outside the project)

2007-07-12 Thread Luca Olivetti

En/na Mattias Gaertner ha escrit:

On Tue, 10 Jul 2007 12:56:09 +0200
Luca Olivetti <[EMAIL PROTECTED]> wrote:


En/na [EMAIL PROTECTED] ha escrit:

- Original Message -
From: Luca Olivetti <[EMAIL PROTECTED]>

[...]

Error: unit not found: contnrs


The unit builds fine.
I'm using rev. 11454, but this started before.

Is your fpc source directory in the environment options correct?

yes.


What fpc version do you use?


2.0.4 (installed from the rpm on the sourceforge/lazarus page)


What version are your fpc sources (compiler/version.pas)?


const
   { version string }
   version_nr = '2';
   release_nr = '0';
   patch_nr   = '4';
   minorpatch = '';

sources installed from the fpc-src rpm (same page), they're in 
/usr/share/fpcsrc and that's where lazarus should look for them.



Are you cross compiling?


No

Bye
--
Luca

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Marc Weustink

Felipe Monteiro de Carvalho wrote:

On 7/12/07, Marc Weustink <[EMAIL PROTECTED]> wrote:

the one in branches/marc-lcl


What I mean it: What does it have of special? =)


It adds alpha support to the widgetsets

Marc

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Felipe Monteiro de Carvalho

On 7/12/07, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:

But which will be the rectangle to be filled if there is no text? The
one in Rect argument?


Cool, I used the Rect argument and it works now =)

I commited the change.

If only I had a caret now =)

Keyboard input also doesn't work on the Carbon SynEdit.

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Ide doesn't find units in the fcl (or outside the project)

2007-07-12 Thread Mattias Gaertner
On Tue, 10 Jul 2007 12:56:09 +0200
Luca Olivetti <[EMAIL PROTECTED]> wrote:

> En/na [EMAIL PROTECTED] ha escrit:
> > 
> > - Original Message -
> > From: Luca Olivetti <[EMAIL PROTECTED]>
> [...]
> >> Error: unit not found: contnrs
> >>
> >>
> >> The unit builds fine.
> >> I'm using rev. 11454, but this started before.
> > 
> > Is your fpc source directory in the environment options correct?
> 
> yes.

What fpc version do you use?
What version are your fpc sources (compiler/version.pas)?
Are you cross compiling?


Mattias

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Felipe Monteiro de Carvalho

On 7/12/07, Marc Weustink <[EMAIL PROTECTED]> wrote:

the one in branches/marc-lcl


What I mean it: What does it have of special? =)

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Felipe Monteiro de Carvalho

On 7/12/07, Paul Ishenin <[EMAIL PROTECTED]> wrote:

SynEdit uses ExtTextOut to fill background. To do this SynEdit passes
Empty Str argument and Count = 0. As result BeginTextRender return False
and no bg filling will happen.


But which will be the rectangle to be filled if there is no text? The
one in Rect argument?

thanks,
--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Marc Weustink

Felipe Monteiro de Carvalho wrote:

On 7/12/07, Marc Weustink <[EMAIL PROTECTED]> wrote:

One more ide to check, before I commit my alpha patch :( (at this moment
lazarus doesn't even start)


which alpha patch is that?


the one in branches/marc-lcl

Marc

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Paul Ishenin

Felipe Monteiro de Carvalho пишет:

Hi,

I just tested the Lazarus IDE with carbon, and it loads and looks 
reasonable:


http://magnifier.sourceforge.net/photos/Fullscreen_1.png

=)

It cannot be used, because SynEdit doesn't work (lot's of bugs: no
Caret, when moves around the text the new text is painted over the old
text, no scrollbars, etc, etc).

But, nevertheless, it's a great progress already =)


After experience with patching same issues in qt I have an idea.

Felipe, can you correct TCarbonDeviceContext.ExtTextOut a bit and retest?

Look at code.

if not BeginTextRender(Str, Count, TextLayout) then Exit;

SynEdit uses ExtTextOut to fill background. To do this SynEdit passes 
Empty Str argument and Count = 0. As result BeginTextRender return False 
and no bg filling will happen.


So if (Options and ETO_OPAQUE) <> 0 then backgound should be filled 
inspite of BeginTextRendere = False.



Best regards,
Paul Ishenin.


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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Graeme Geldenhuys

Nice one!  :)

Graeme.



On 12/07/07, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:

Hi,

I just tested the Lazarus IDE with carbon, and it loads and looks reasonable:

http://magnifier.sourceforge.net/photos/Fullscreen_1.png



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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Felipe Monteiro de Carvalho

On 7/12/07, Marc Weustink <[EMAIL PROTECTED]> wrote:

One more ide to check, before I commit my alpha patch :( (at this moment
lazarus doesn't even start)


which alpha patch is that?

thanks,
--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Henry Vermaak

On 12/07/07, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:

Hi,

I just tested the Lazarus IDE with carbon, and it loads and looks reasonable:

http://magnifier.sourceforge.net/photos/Fullscreen_1.png

=)

It cannot be used, because SynEdit doesn't work (lot's of bugs: no
Caret, when moves around the text the new text is painted over the old
text, no scrollbars, etc, etc).

But, nevertheless, it's a great progress already =)


this is great news, well done to everyone involved! :)

henry

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


Re: [lazarus] Carbon native IDE

2007-07-12 Thread Marc Weustink

Felipe Monteiro de Carvalho wrote:

Hi,

I just tested the Lazarus IDE with carbon, and it loads and looks 
reasonable:


http://magnifier.sourceforge.net/photos/Fullscreen_1.png

=)

It cannot be used, because SynEdit doesn't work (lot's of bugs: no
Caret, when moves around the text the new text is painted over the old
text, no scrollbars, etc, etc).

But, nevertheless, it's a great progress already =)


:)

One more ide to check, before I commit my alpha patch :( (at this moment 
lazarus doesn't even start)


Marc

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


[lazarus] Carbon native IDE

2007-07-12 Thread Felipe Monteiro de Carvalho

Hi,

I just tested the Lazarus IDE with carbon, and it loads and looks reasonable:

http://magnifier.sourceforge.net/photos/Fullscreen_1.png

=)

It cannot be used, because SynEdit doesn't work (lot's of bugs: no
Caret, when moves around the text the new text is painted over the old
text, no scrollbars, etc, etc).

But, nevertheless, it's a great progress already =)

thanks,
--
Felipe Monteiro de Carvalho

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