Re: [lazarus] Drawing Strategy in Carbon Lazarus

2007-10-12 Thread Mattias Gaertner
On Thu, 11 Oct 2007 20:08:27 -0400
James Chandler Jr [EMAIL PROTECTED] wrote:

[...] 
 On Oct 11, 2007, at 6:25 PM, Mattias Gaertner wrote:
  On Thu, 11 Oct 2007 08:53:35 -0700
  Peter Gannon [EMAIL PROTECTED] wrote:
  [snip]Most programs do some kind of
  direct painting at some stage[...]
 
  Most programs? Can you give some examples?
 
 Hi Mattias
 
 1- On PC Delphi, screen flashing on heavy updates can occur. What I  
 think is probably a common workaround (though perhaps I'm the only  
 Delphi programmer who ever did this)--
 
 Rather than calling Invalidate and letting the OnPaint draw  
 everything, in some cases you just call OnPaint, which 'draws over'  
 the stuff already there, giving a quick clean visible change of only  
 the parts which have changed. The parts of the image that are the  
 same do not flicker, because you are just 'drawing over' what was  
 already onscreen.

Flickering:
a) Disable 'erase background', then OnPaint will only paint over.
This should be possible under carbon too. TCustomControl descendants
like TSynEdit and TPropertyGrid use this.
b) use double buffering. AFAIK this is default for win32/64, gtk2, qt. I
don't know carbon's double buffering.

 
[...]
 2. I use direct drawing a lot in a MIDI Piano Roll editor on PC. I  
 draw the 'marching ants' XOR rectangle if the user click-drags on  
 open space to select a group of notes.

Yes, for smooth interactive effects it is a problem when the OnPaint of
the underlying control is slow. Here you need to disable the
painting of the control. Can be done with TCustomControl, but the
rubberband should probably work on arbitrary controls.

 
[...]
 3. LED Audio VU Meters-- These things look best when they update  
 pretty frequently. It is typically done by having rectangular
 bitmaps of the VU Meter 'All Off', and another bitmap of the VU Meter
 'All On'. Depending on the audio instantaneous level, you blit a  
 percentage of the 'All On' image to the bottom of the VU Meter and  
 then blit a percentage of the 'All Off' image to the top of the VU  
 Meter.

Make the LEDs controls.


 4. On a Music Notation window-- All the Staves, barlines, and notes  
 are drawn with the OnPaint event. And then during playback the task  
 is to draw individual notes in Red when the sequencer starts each  
 note, and then redraw each note in Black when the sequencer stops  
 each note. So you want to (quickly) only update little pieces of the  
 notation with spots of Red or Black.

Use a TCustomControl descendant.

 
 5.[...]lot of mouse-tracking would probably be easier with some kind of  
 direct-draw mechanism.

Direct drawing with XOR is only easy if no OnPaint happens
between.

 
[...]

For small smooth effects you need drawing without drawing the
underlying control(s). Direct drawing is only one such possibility. And afaik 
it is not easy to implement such
effects properly. Not in the application code, and not in the
widgetsets.


Mattias

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


Re: [lazarus] Drawing Strategy in Carbon Lazarus

2007-10-12 Thread Felipe Monteiro de Carvalho
Creating a custom control is generally the best option to avoid
flickering. It's all documented here:

http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Motion_Graphics_-_How_to_Avoid_flickering

-- 
Felipe Monteiro de Carvalho

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


Re: [lazarus] More icons

2007-10-12 Thread Paul Ishenin

Great Thanks, 2 more.


Thanks, commited in r12422.

Best regards,
Paul Ishenin.

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


Re: [lazarus] Any idea why this is going wrong ?

2007-10-12 Thread Marc Weustink

A.J. Venter wrote:

Hi,
I'm trying to write a really simple SOAP client, to send SMS's with.
At least, it's really simple in THEORY.

My code is below, I checked it - in string the content is perfect, and 
it is posting. But it kept failing, so enventualy I sniffed it, it's 
POSTING it as garbage - it looks like ansi-text being read by a UTF 
reader but it could be something else.



My best theory is that my document.write call is broken - I translated 
that one from the synapse Delphi example - any suggestions ?


A.J.

procedure TForm1.Button1Click(Sender: TObject);
begin


 :::


  HTTP := THTTPSend.Create;
  U := AnsiToUTF8(S);
  HTTP.Document.StrWrite(Pchar(U));



What is the declaration of U and HTTP.Document.StrWrite

Marc

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


[lazarus] SQLdb : get last_inserted_id

2007-10-12 Thread Alvise Nicoletti
Hi... I'm having some problems to get the last_insert_id after a insert 
query...
I'm getting always 0, the problem (I suppose) is that I have to do 
everything in the same transaction...


I paste you some code here to help me to understand the problem 
(id_ingresso is the variable I get always = 0):


procedure TMyClass.InsertIntotheDB(Connection: TSQLConnection);   // i 
pass the connection from another class (to be sure it's open and alive)

var
 Qry, QryRead: TSQLQuery;
 Trans: TSQLTransaction;
begin

 //parameters
 Trans:=TSQLTransaction.Create(nil);
 Qry:=TSQLQuery.Create(nil);
 QryRead:=TSQLQuery.Create(nil);
 try
  Connessione.Transaction := Trans;
  Qry.DataBase := Connessione;
  Qry.Transaction := Trans;
  QryRead.DataBase := Connessione;
  QryRead.Transaction := Trans;

  Qry.ParseSQL := true;
  Qry.ReadOnly := false;
  QryRead.ParseSQL := false;
  QryRead.ReadOnly := true;


  Qry.Active := false;
  Qry.SQL.Text := 'INSERT INTO ECCETERA';
  Qry.Params.ParamByName('PK_parameter').AsInteger := self.id_parameter;
  try
 Qry.ExecSQL;
  except
 Log.Scrivi(0,'Error'+QryRead.SQL.Text+'');
  end;

  QryRead.Active := false;
  QryRead.SQL.Text := 'SELECT LAST_INSERT_ID() as PK_INGRESSO';
  try
QryRead.open;
self.id_ingresso := QryRead.FieldByName('PK_parameter').AsInteger;
QryRead.close;
  except
 Log.Scrivi(0,'Error'+QryRead.SQL.Text+'');
 self.id_ingresso := -1;
  end;

  Log.Scrivi(6, 'Logica Passaggio registrato sul DB. Pk_ingresso = 
'+IntToStr(self.id_ingresso));


 finally
  Qry.Free;
  QryRead.Free;
  Trans.Free;
 end;

end;

end.

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


Re: [lazarus] SQLdb : get last_inserted_id

2007-10-12 Thread Joost van der Sluis
Op vrijdag 12-10-2007 om 10:39 uur [tijdzone +0200], schreef Alvise
Nicoletti:

Qry.Active := false;

I don't see anything strange. It should work, except that the following
query is incorrect (incomplete).

Qry.SQL.Text := 'INSERT INTO ECCETERA';

And it also has no parameters. Maybe there's an error on your log?

Qry.Params.ParamByName('PK_parameter').AsInteger := self.id_parameter;
try
   Qry.ExecSQL;

Joost.

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


Re: [lazarus] SQLdb : get last_inserted_id

2007-10-12 Thread Alvise Nicoletti
The query was incomplete cause I censored it... just cause the mailing 
list is public and sometimes googling I found pieces of our customers 
stuff.


I mailed you in private the complete code.

Thank you.

Op vrijdag 12-10-2007 om 10:39 uur [tijdzone +0200], schreef Alvise
Nicoletti:

  

   Qry.Active := false;



I don't see anything strange. It should work, except that the following
query is incorrect (incomplete).

  

   Qry.SQL.Text := 'INSERT INTO ECCETERA';



And it also has no parameters. Maybe there's an error on your log?

  

   Qry.Params.ParamByName('PK_parameter').AsInteger := self.id_parameter;
   try
  Qry.ExecSQL;



Joost.

_
 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 and Gtk2 under Mac OS X

2007-10-12 Thread Felipe Monteiro de Carvalho
Using those changes on fpc.cfg also breaks lazarus-gtk1:

felipe2:~/Programas/lazarus felipemonteirodecarvalho$ ./lazarus
dyld: Library not loaded: /usr/local/lib/libiconv.2.dylib
  Referenced from: /Users/felipemonteirodecarvalho/Programas/lazarus/./lazarus
  Reason: Incompatible library version: lazarus requires version 6.0.0
or later, but libiconv.2.dylib provides version 5.0.0
Trace/BPT trap



-- 
Felipe Monteiro de Carvalho

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


Re: [lazarus] Glyph in TBitButton

2007-10-12 Thread ajv

Thanks for this quick response Giuliano,

Now I see how the system works.
On the Lazarus site there is a bug-tracking entry.
It shows that this is a bug and was reported on 01-01-2007 and 26-11-2006.

(and yet not solved)



Giuliano Colla wrote:

ajv ha scritto:


Hello,

I just started my first Lazarus 0.9.22 project under Linux (Mandriva 
2008).
As I could not found a library with glyphs for a TBitButton I copied 
the Delphi 7 library.
Each button bitmap contains a set of two glyphs for the active and 
disable state.
In Lazarus I always see both glyphs on the TBitButton, in design and 
runtime, and NumGlyps

property settings of 0, 1 and 2.

Am I doing something wrong or is this a bug?

Thanks.

AFAIK it's a bug. Waiting for the bug to be fixed, you may use in 
place of TBitButton, TSpeedButton, which handles properly the NumGlyph 
property (but doesn't get the focus).


Giuliano



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


[lazarus] Patch for message tab error in compiler options

2007-10-12 Thread wile64
Hi,

See subjet

Regards,

-- 
Laurent.

My Web : http://wile64.neuf.fr/
French Forum : http://lazforum-fr.tuxfamily.org/index.php


compileropt.patch
Description: Binary data


Re: [lazarus] Lazarus and Gtk2 under Mac OS X

2007-10-12 Thread Marc Santhoff
Am Freitag, den 12.10.2007, 11:02 +0200 schrieb Felipe Monteiro de
Carvalho:
 -k'-dylib_file'
 -k'/usr/local/

I have no idea about macs linker, but if the second is a parameter to
the first you'd probably try:

-k'-dylib_file' '/usr/local/...'

On FreeBSD I had to use linker switches too, looking like this:

fpc -S2 -k-L/usr/local/lib -k-L/usr/X11R6/lib -k-lXtst ...

HTH,
Marc



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


Re: [lazarus] utf-8/unicode and keyboard input

2007-10-12 Thread Marc Santhoff
Am Freitag, den 12.10.2007, 14:02 +0200 schrieb Andreas Gick:

 Well the most obvious place, where the keycode could vanish is the following 
 procedure:
 
 procedure TfpgEdit.HandleKeyChar(var AText: string;
   var shiftstate: TShiftState; var consumed: boolean);
 var
   s: string;
   prevval: string;
 begin
   prevval := Text;
   s   := AText;
   consumed := False;
 
   // Handle only printable characters
   // Note: This is not UTF-8 compliant!
  if (Ord(AText[1])  31) and (Ord(AText[1])  127) then
   begin
 if (FMaxLength = 0) or (UTF8Length(FText)  FMaxLength) then
 begin
   DeleteSelection;
   UTF8Insert(s, FText, FCursorPos + 1);
   Inc(FCursorPos);
   FSelStart := FCursorPos;
   AdjustCursor;
 end;
 consumed := True;
   end;
 
   if prevval  Text then
 if Assigned(FOnChange) then
   if prevval  Text then
 if Assigned(FOnChange) then
   FOnChange(self);
 
   if consumed then
 RePaint
   else
 inherited HandleKeyChar(AText, shiftstate, consumed);
 end;

It looks as if you are right (although not knowing anything about
fpGUI ;).

 I tried commenting out  if (Ord(AText[1])  31) and (Ord(AText[1])  127) 
 then and the corresponding begin end; structure, but it didn't seem to 
 change anything. 

If you step down in the code you'll see the consumed=true statement.
This is at least responsible for not handing over the char to the
inherited method. So if the char should be handled there, set consumed
to false, too.

I'd try surrounding UTF8Insert(...) with writeln's to see if that's
the spot. Or check the inner workings of that procedure. Or for testing
purposes set the char directly to the edits text field ...

Hopefully Graeme can give some more sophisticated comments, mine are
only poking in the fog ... ;)

HTH,
Marc



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


Re: [lazarus] UTF8 mix-up

2007-10-12 Thread Mattias Gaertner
On Wed, 10 Oct 2007 10:17:12 +0200
Giuliano Colla [EMAIL PROTECTED] wrote:

 Up to some time ago the situation was pretty clear. If you started 
 Lazarus with UTF8 encoding active you were getting a warning that
 UTF8 wasn't supported.
 Now the situation has changed: with UTF8 enabled, I get a proper
 display in IDE, with localized captions showing accented letters.
 But the catch is that if I try to set up the string list Items of a 
 combo box with accented letters, I get a mess. I get either an empty 
 line, or a truncated line, where the accented letter is, and the 
 run-time items are messed up.

Marc, are accented chars supported in gtk1 intf?


 If I start Lazarus with ISO 8859 encoding, the the IDE doesn't
 display properly, I get question marks where accented letters are
 expected, but I can set up my combo box items form IDE without
 problems, and they show properly at run-time.
 
 I understand that this is work in progress and some discrepancies are
 to be expected, but I don't know if I should report an IDE bug, a
 combobox (or TStringList) bug, or what.
 
 Environement is Linux, widgetset is gtk1.

I guess, it has something to do with the cwstring unit.
Does someone know, how to get the old ISO-8859-1 on an ubuntu feisty?


Mattias

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


Re: [lazarus] SQLdb : get last_inserted_id

2007-10-12 Thread Alvise Nicoletti

No, in the original code it's correct.

However: I'm still having problems, someone can show me some code about 
how to extract a last_insert_id from a mysql database after a insert, 
with SQLdb libs?

On 12/10/2007, Alvise Nicoletti [EMAIL PROTECTED] wrote:
---8---
  

   QryRead.Active := false;
   QryRead.SQL.Text := 'SELECT LAST_INSERT_ID() as PK_INGRESSO';
   try
 QryRead.open;
 self.id_ingresso := QryRead.FieldByName('PK_parameter').AsInteger;



must this not be:
self.id_ingresso := QryRead.FieldByName('PK_INGRESSO').AsInteger;?

henry

_
 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] utf-8/unicode and keyboard input

2007-10-12 Thread Andreas Gick
Am Mittwoch 03 Oktober 2007 03:09:34 schrieb Marc Santhoff:
 Am Dienstag, den 02.10.2007, 18:50 +0200 schrieb Andreas Gick:
  Thanks for the quick answers
 
  Well there is a similar function in the source of fpgui that I included
  as attachment (at around line 414), and I'm not sure, why it only works
  with ASCII characters.
 
  But maybe I also need to clarify a bit more, what I want to do: At the
  moment, I cannot type ö into an edit field, because that key isn't
  mapped, but I can assign ö to a string variable and display it in the
  edit field.

 When pressing a key the Xserver receives it because it is handling the
 input driver. Then an event of type XKeyPressed (or similar named) is
 sent to the application having the focus. If you release the key,
 XKeyReleased is sent with the key code as data.

 When an application is running on X it regularly handles the message
 loop and reads the messages received. After discriminating a key event
 it will probably translate the key code to a key symbol and forward it
 to the control focused, which is the edit box.

 So if you compile the code with debug defined you will most likely see
 the event getting translated by

  function TfpgApplicationImpl.KeySymToKeycode(KeySym: TKeySym): Word;

 to a char 'ö'. The question now is: where does it vanish on the way from
 the applications decoding to the setText-procedure of the edit box.

 I don't know anything about fpGUI's internals.

 HTH and good luck,
 Marc


 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
Well the most obvious place, where the keycode could vanish is the following 
procedure:

procedure TfpgEdit.HandleKeyChar(var AText: string;
  var shiftstate: TShiftState; var consumed: boolean);
var
  s: string;
  prevval: string;
begin
  prevval := Text;
  s   := AText;
  consumed := False;

  // Handle only printable characters
  // Note: This is not UTF-8 compliant!
 if (Ord(AText[1])  31) and (Ord(AText[1])  127) then
  begin
if (FMaxLength = 0) or (UTF8Length(FText)  FMaxLength) then
begin
  DeleteSelection;
  UTF8Insert(s, FText, FCursorPos + 1);
  Inc(FCursorPos);
  FSelStart := FCursorPos;
  AdjustCursor;
end;
consumed := True;
  end;

  if prevval  Text then
if Assigned(FOnChange) then
  if prevval  Text then
if Assigned(FOnChange) then
  FOnChange(self);

  if consumed then
RePaint
  else
inherited HandleKeyChar(AText, shiftstate, consumed);
end;

I tried commenting out  if (Ord(AText[1])  31) and (Ord(AText[1])  127) 
then and the corresponding begin end; structure, but it didn't seem to 
change anything. 

Greets Andreas 

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


Re: [lazarus] Any idea why this is going wrong ?

2007-10-12 Thread A.J. Venter



  HTTP := THTTPSend.Create;
  U := AnsiToUTF8(S);
  HTTP.Document.StrWrite(Pchar(U));

I got it fixed this morning using:
S :TStringList
...
S.SaveToStream(http.Document);



--
Any sufficiently advanced technology is indistinguishable from magic - 
Clarke's law
Any technology that is distinguishable from magic is insufficiently 
advanced -Gehm's corollary
Any technologist that is distinguishable from a magician is 
insufficiently advanced - My corollary

The worlds worst webcomic: http://silentcoder.co.za/scartoonz
The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za

begin:vcard
fn:AJ Venter
n:Venter;AJ
org:Global Pact Trading Pty. Ltd.;OutKast Solutions
email;internet:[EMAIL PROTECTED]
title:Director of Product Development
tel;work:+27 21 554 5059
tel;fax:+27 21 413 2800
tel;cell:+27 83 455 9978
url:http://www.outkastsolutions.co.za
version:2.1
end:vcard



Re: [lazarus] SQLdb : get last_inserted_id

2007-10-12 Thread Henry Vermaak
On 12/10/2007, Alvise Nicoletti [EMAIL PROTECTED] wrote:
---8---

QryRead.Active := false;
QryRead.SQL.Text := 'SELECT LAST_INSERT_ID() as PK_INGRESSO';
try
  QryRead.open;
  self.id_ingresso := QryRead.FieldByName('PK_parameter').AsInteger;

must this not be:
self.id_ingresso := QryRead.FieldByName('PK_INGRESSO').AsInteger;?

henry

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


[lazarus] Patch for runparamdlg

2007-10-12 Thread wile64
Hi,

This patch fixes the bug poster in dialog run parameters / environement
:)

Ce patch corrige le bug d'affiche dans le dialog


Regards,

-- 
Laurent.

My Web : http://wile64.neuf.fr/
French Forum : http://lazforum-fr.tuxfamily.org/index.php


runparamdlg.patch
Description: Binary data


Re: [lazarus] Lazarus and Gtk2 under Mac OS X

2007-10-12 Thread Felipe Monteiro de Carvalho
On 10/12/07, Víctor R. Ruiz [EMAIL PROTECTED] wrote:
   I installed Gtk using MacPorts and I didn't have those problems.

Gtk 1 or Gtk2?

The problems are only related to Gtk 2

-- 
Felipe Monteiro de Carvalho

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


Re: [lazarus] Lazarus and Gtk2 under Mac OS X

2007-10-12 Thread Víctor R. Ruiz
  Hi:

2007/10/12, Felipe Monteiro de Carvalho [EMAIL PROTECTED]:
 Today I tryed again to use lazarus with gtk2 under Mac OS X. I reviwed
 old e-mails, and synthetised some instructions:

 http://wiki.lazarus.freepascal.org/GTK2_Interface#Using_the_Gtk2_interface_under_Mac_OS_X

  I installed Gtk using MacPorts and I didn't have those problems.

  Greetings,

-- 
Víctor R. Ruiz [EMAIL PROTECTED] | - Todos estos momentos se perderán
http://rvr.blogalia.com/   |   como lágrimas en la lluvia

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


RE: [lazarus] Lazarus and Gtk2 under Mac OS X

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

Instead of adding the wiki lines to your fpc.cfg, just specify them in
an additional .cfg file on the Compiler Options Other tab for use when
compiling with gtk2. If these lines interfere with gtk, then just
uncheck the Use additional Compiler Config File box.

I've attached my original gimplib.cfg file to this message.

Also, to run an executable that's linked against the Gimp libraries, you
have to export some of the Gimp gtk2 library locations. The easiest
way to do this is with the attached script file. Run Lazarus like this:

./glaunch.sh lazarus

That's the way Gimp is launched and I adapted my script from Gimp's.
Study the script for more information.

Thanks.

-Phil


-Original Message-
From: Felipe Monteiro de Carvalho
[mailto:[EMAIL PROTECTED] 
Sent: Friday, October 12, 2007 5:02 AM
To: lazarus@miraclec.com
Subject: [lazarus] Lazarus and Gtk2 under Mac OS X

Hi,

Today I tryed again to use lazarus with gtk2 under Mac OS X. I reviwed
old e-mails, and synthetised some instructions:

http://wiki.lazarus.freepascal.org/GTK2_Interface#Using_the_Gtk2_interfa
ce_under_Mac_OS_X

Lazarus compiles file, but when I try to run it, I get:

felipe2:~/Programas/lazarus felipemonteirodecarvalho$ ./lazarus
dyld: Library not loaded: /usr/local/lib/libgtk-x11-2.0.0.dylib
  Referenced from:
/Users/felipemonteirodecarvalho/Programas/lazarus/./lazarus
  Reason: image not found
Trace/BPT trap

I tryed adding a new line to fpc.cfg, which would be:

-k'-dylib_file'
-k'/usr/local/lib/libgtk-x11-2.0.0.dylib:/Applications/Gimp.app/Contents
/Resources/lib/libgtk-x11-2.0.0.600.10.dylib'

I also tryed similar lines adding the .600.10 to the first part, but
it doesn't seam to help.

Any ideas?

thanks,
-- 
Felipe Monteiro de Carvalho

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


glaunch.sh
Description: glaunch.sh


gimplib.cfg
Description: gimplib.cfg


Re: [lazarus] Glyph in TBitButton

2007-10-12 Thread Giuliano Colla

ajv ha scritto:


Hello,

I just started my first Lazarus 0.9.22 project under Linux (Mandriva 
2008).
As I could not found a library with glyphs for a TBitButton I copied 
the Delphi 7 library.
Each button bitmap contains a set of two glyphs for the active and 
disable state.
In Lazarus I always see both glyphs on the TBitButton, in design and 
runtime, and NumGlyps

property settings of 0, 1 and 2.

Am I doing something wrong or is this a bug?

Thanks.

AFAIK it's a bug. Waiting for the bug to be fixed, you may use in place 
of TBitButton, TSpeedButton, which handles properly the NumGlyph 
property (but doesn't get the focus).


Giuliano

--
Giuliano Colla

Still using C++ and Visual Studio? I'm using Object Pascal and Lazarus.


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


Re: [lazarus] Patch for message tab error in compiler options

2007-10-12 Thread Dominique Louis

I was about to post about this crash.

wile64 wrote:

Hi,

See subjet

Regards,

--
Laurent.



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


Re: [lazarus] Lazarus and Gtk2 under Mac OS X

2007-10-12 Thread Víctor R. Ruiz
  Hi:

2007/10/12, Felipe Monteiro de Carvalho [EMAIL PROTECTED]:
 On 10/12/07, Víctor R. Ruiz [EMAIL PROTECTED] wrote:
I installed Gtk using MacPorts and I didn't have those problems.

 Gtk 1 or Gtk2?

 The problems are only related to Gtk 2

  I have installed, and Lazarus compiles on, both.

  Greetings,

-- 
Víctor R. Ruiz [EMAIL PROTECTED] | - Todos estos momentos se perderán
http://rvr.blogalia.com/   |   como lágrimas en la lluvia

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


Re: [lazarus] Drawing Strategy in Carbon Lazarus

2007-10-12 Thread James Chandler Jr


On Oct 12, 2007, at 3:59 AM, Felipe Monteiro de Carvalho wrote:


Creating a custom control is generally the best option to avoid
flickering. It's all documented here:

http://wiki.lazarus.freepascal.org/ 
Developing_with_Graphics#Motion_Graphics_-_How_to_Avoid_flickering


Thanks Felipe. Writing controls is fun. Am not concerned with  
flickering, just speed in the cases where direct draw makes sense.



On Oct 11, 2007, at 7:43 PM, Luiz Americo Pereira Camara wrote:

You can invalidate only the area that needs update using  
LCLIntf.InvalidateRect. Then you can get the update rect using the  
TLMPaint message. With this you can speed the drawing but will  
require a more sophisticated algorithm  to define what to draw.


Luiz


Thanks Luiz. That is worthy to explore if direct drawing turns out  
infeasible on Carbon Lazarus.



On Oct 12, 2007, at 3:55 AM, Mattias Gaertner wrote:


3. LED Audio VU Meters-- [snip]


Make the LEDs controls.


I wrote audio VU Controls. But consider a mixer window with 24 or 48  
VU meters, which should visually update about 15 to 30 times per  
second, while also maintaining realtime views in other sequencer  
windows (and of course should also play the music without staggering).


Controls I've written for heavy duplication (see screenshot link  
below)-- For rows of meters, sliders or knobs. They are written as  
non-windowed controls to minimize memory usage. They share imagelists  
so if you have a couple of hundred knobs in a mixer, at least all the  
knobs share the same image pool.


But even if you use controls, it can become a direct-draw issue- If  
there is a persistent 'pixel backing store' somewhere that individual  
controls can 'draw over' in small regions of the bigger canvas--


It is just plain faster to directly call the control's paint method  
somehow, than to invalidate each control and let a lot of messages  
percolate thru the system before the control finally decides to paint  
itself.


In Carbon LCL, haven't yet figured out how to directly call an  
OnPaint method and get anything to show on the screen. An object must  
be invalidated and called by the LCL before anything will show on the  
screen, so far.


In the past (non lazarus) it wasn't difficult to draw into a Mac  
window. Duh. It was much easier before Apple worked all those years  
to 'improve' it so much that it now causes permanent brain damage to  
figure out (grin).


Anyway, my sales pitch is not persuasive. Will let it go.

Here is a sequencer window full of some controls. It is a 1920 wide  
screenshot shrunk down. Reckon 30 times per second of invalidate- 
onpaint cycles on all these controls, is really gonna cut it?


www.errnum.com/tmpimages/ptw_scrn.jpg

Thanks

jcjr 


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