[lazarus] How does RegisterWSComponent work?

2006-01-14 Thread Martin Smat

Hi,

when I comment the command RegisterWSComponent(TCustomBitBtn, 
TWin32WSBitBtn); in file win32wsbuttons.pp in win32 interface, Lazarus 
crashes.
How is then possible that GTK2 interface is working (I suppose it is 
working, did not try) and has this command commented out?


Martin.

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


Re: [lazarus] Help with DLL (using pchar, etc.)

2006-01-14 Thread Marc Santhoff
Am Freitag, den 13.01.2006, 03:23 -0700 schrieb L505:
  I misinterpreted the scope of your approach. But you're right, if I get
  there and squeeze out the last bytes for embedded systems I'll make it
  publicly available.
 
  Marc
 
 
 I was saying that basically one way of trimming down cgi programs 
 significantly was
 to use CompactSysUtils - Another way to trim, is to put some functions into a 
 DLL

Yes, this is my favourite. As you can imagine, on embedded
nano-computers every single byte has to be checked if it does something
useful, the other ones have to go home. ;)

 (not  compactsysutils ones, things like database access , sessions, cookies
 functions). Maybe you thought I was going to put compactsysutils functions in 
 a dll -
 I didn't mean that. But actually it's an interesting thought - having some of 
 the fpc
 RTL in a dll. Or, maybe I misinterpreted your misinterpretation :)

I think from reading the message from Florian Klämpfl with the subject
dyn. linked lazarus the door to dynamicylly linked basics like RTL is
pushed open with fpc 2.1.1. That's a big step forward in general - good
work, Florian and others involved!

For small CPUs it is not sufficient, because wether a byte is linked in
statically or sits in a dynamic library - it has to be loaded anyways.

One way I started thinking about was to use non standard X-Server (X.org
or XFree86) but something like NanoX or similar. Unfortunately none of
the ones I know run on FreeBSD ...

Marc

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


Re: [lazarus] How does RegisterWSComponent work?

2006-01-14 Thread rainer
gtk has many similar problems. I tried lazarus and fpc snapshot 20060110
on kanotix (konoppix clone / KDE), ubuntu (GNOME), kubuntu (KDE) and
suse 10.0 (KDE and GNOME). 

Exept on suse / GNOME many items including the text inside the editor
disappears from time to time. 

On suse / GNOME speed buttons disappear when the mouse is moved over
that part of panel and sometimes labels disappear, when the mouse is
moved over them. The IDE crashes from time to time.

Rainer Hamann

 Hi,
 
 when I comment the command RegisterWSComponent(TCustomBitBtn, 
 TWin32WSBitBtn); in file win32wsbuttons.pp in win32 interface, Lazarus 
 crashes.
 How is then possible that GTK2 interface is working (I suppose it is 
 working, did not try) and has this command commented out?
 
 Martin.
 
 _
  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] Help with DLL (using pchar, etc.)

2006-01-14 Thread L505

 Yes, this is my favourite. As you can imagine, on embedded
 nano-computers every single byte has to be checked if it does something
 useful, the other ones have to go home. ;)

Do you think the PStrList will be useful, and some other fake (byte friendly)
classes (objects) in CompactUtils? I know pure arrays and and simple variables
without any objects at all, will save bytes, but hey wouldn't it be nice to 
have some
of object oriented programming without the cost of bytes?

Yes in your case embedded programming will not benefit from DLL programming of
course - in fact dll programming is more inefficient than static linking 
because with
static linking you don't have to load the entire DLL with wasted functions in 
it.

I'm not one of those dudes who is anal about having Exe's small - it's just a 
matter
of having a leading advantage of being able to upload a nice small 30kb 
powerful CGI
program and of course being able to work with embedded systems. That is one 
advantage
with FPC is being able to work with embedded systems, over say python or perl. 
I'm
sure people would love working with Pascal rather than C for embedded systems, 
but in
order for Pascal to have a chance in embedded systems we must have projects 
like this
compactutils and system.ppu replacements, otherwise people will have to resort 
to C.
Because the big 30kb hello world exe and the 90kb hello world exe with sysutils 
in
the uses clause is not good for embedded systems.

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


Re: [lazarus] How does RegisterWSComponent work?

2006-01-14 Thread Martin Smat

rainer wrote:


gtk has many similar problems. I tried lazarus and fpc snapshot 20060110
on kanotix (konoppix clone / KDE), ubuntu (GNOME), kubuntu (KDE) and
suse 10.0 (KDE and GNOME). 


Exept on suse / GNOME many items including the text inside the editor
disappears from time to time. 


On suse / GNOME speed buttons disappear when the mouse is moved over
that part of panel and sometimes labels disappear, when the mouse is
moved over them. The IDE crashes from time to time.

Rainer Hamann
 

I asked because I'm preparing a patch for speedbuttons to shift the 
image one pixel right and down when pushed. This feature is dependent on 
used interface. This behavior is only for Win32 interface, GTK does not 
shift images on pushed buttons.
So I added new procedure to TWSSpeedButton and override it in 
TWin32WSSpeedButton where I uncommented the command for registration of 
this class: RegisterWSComponent(TCustomSpeedButton, TWin32WSSpeedButton);
After compiling everything seems to work well but my question is if I 
have to uncomment the registration command in GTK interface where this 
method is not implemented (there is no image shift).


Martin.


Hi,

when I comment the command RegisterWSComponent(TCustomBitBtn, 
TWin32WSBitBtn); in file win32wsbuttons.pp in win32 interface, Lazarus 
crashes.
How is then possible that GTK2 interface is working (I suppose it is 
working, did not try) and has this command commented out?


Martin.

_
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

 



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


Re: [lazarus] How does RegisterWSComponent work?

2006-01-14 Thread Mattias Gaertner
On Sat, 14 Jan 2006 11:49:52 +0100
rainer [EMAIL PROTECTED] wrote:

 gtk has many similar problems. I tried lazarus and fpc snapshot 20060110
 on kanotix (konoppix clone / KDE), ubuntu (GNOME), kubuntu (KDE) and
 suse 10.0 (KDE and GNOME). 
 
 Exept on suse / GNOME many items including the text inside the editor
 disappears from time to time. 
 
 On suse / GNOME speed buttons disappear when the mouse is moved over
 that part of panel and sometimes labels disappear, when the mouse is
 moved over them. The IDE crashes from time to time.
 
 Rainer Hamann

How are the above items related to the below?

  when I comment the command RegisterWSComponent(TCustomBitBtn, 
  TWin32WSBitBtn); in file win32wsbuttons.pp in win32 interface, Lazarus 
  crashes.
  How is then possible that GTK2 interface is working (I suppose it is 
  working, did not try) and has this command commented out?
  
  Martin.

Mattias

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


Re: [lazarus] How does RegisterWSComponent work?

2006-01-14 Thread Martin Smat

Mattias Gaertner wrote:

I asked because I'm preparing a patch for speedbuttons to shift the 
image one pixel right and down when pushed. This feature is dependent on 
used interface. This behavior is only for Win32 interface, GTK does not 
shift images on pushed buttons.
So I added new procedure to TWSSpeedButton and override it in 
TWin32WSSpeedButton where I uncommented the command for registration of 
this class: RegisterWSComponent(TCustomSpeedButton, TWin32WSSpeedButton);
After compiling everything seems to work well but my question is if I 
have to uncomment the registration command in GTK interface where this 
method is not implemented (there is no image shift).
   



Why do you need a method in the gtk interface for this?
Why not add a flag method TWSSpeedButton.GetPaintStyle(out DownOffset:
TPoint);
with default value 0,0 and overriden in TWin32WSSpeedButton with 2,2 (or
whatever offset)?

Mattias

 


Maybe I was not very precise. I don't need any gtk interface method.
I have this method: procedure TWSSpeedButton.PreparePaintRect(const 
ASpeedBtn: TCustomSpeedButton; const APaintRect: PRect; const 
ADrawFlags: integer);

and it is implemented in the TWin32WSSpeedButton:
procedure TWin32WSSpeedButton.PreparePaintRect(const ASpeedBtn: 
TCustomSpeedButton; const APaintRect: PRect; const ADrawFlags: integer);

begin
 if (ADrawFlags and DFCS_PUSHED) = 0 then OffsetRect(APaintRect^, -1, -1);
end;
There is no implementation of this method in TGtkWSSpeedButton, GTK does 
not shift the image.
The question is if I have to uncomment the RegisterWSComponent command 
for TGtkWSSpeedButton if it does not implement the method. I would say 
yes because when I don't uncomment it for TWin32WSSpeedButton then 
Lazarus crashes. But for example GTK2 does not register TGtk2WSButton at 
all and is working.


Martin.

 


Martin.

   


Hi,

when I comment the command RegisterWSComponent(TCustomBitBtn, 
TWin32WSBitBtn); in file win32wsbuttons.pp in win32 interface, Lazarus 
crashes.
How is then possible that GTK2 interface is working (I suppose it is 
working, did not try) and has this command commented out?


Martin.

_
   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



 


_
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

 



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


Re: [lazarus] How does RegisterWSComponent work?

2006-01-14 Thread Mattias Gaertner
On Sat, 14 Jan 2006 14:31:34 +0100
Martin Smat [EMAIL PROTECTED] wrote:

 Mattias Gaertner wrote:
 
 I asked because I'm preparing a patch for speedbuttons to shift the 
 image one pixel right and down when pushed. This feature is dependent on
 
 used interface. This behavior is only for Win32 interface, GTK does not 
 shift images on pushed buttons.
 So I added new procedure to TWSSpeedButton and override it in 
 TWin32WSSpeedButton where I uncommented the command for registration of 
 this class: RegisterWSComponent(TCustomSpeedButton,
 TWin32WSSpeedButton); After compiling everything seems to work well but
 my question is if I  have to uncomment the registration command in GTK
 interface where this  method is not implemented (there is no image
 shift). 
 
 
 Why do you need a method in the gtk interface for this?
 Why not add a flag method TWSSpeedButton.GetPaintStyle(out DownOffset:
 TPoint);
 with default value 0,0 and overriden in TWin32WSSpeedButton with 2,2 (or
 whatever offset)?
 
 Mattias
 
   
 
 Maybe I was not very precise. I don't need any gtk interface method.
 I have this method: procedure TWSSpeedButton.PreparePaintRect(const 
 ASpeedBtn: TCustomSpeedButton; const APaintRect: PRect; const 
 ADrawFlags: integer);
 and it is implemented in the TWin32WSSpeedButton:
 procedure TWin32WSSpeedButton.PreparePaintRect(const ASpeedBtn: 
 TCustomSpeedButton; const APaintRect: PRect; const ADrawFlags: integer);
 begin
   if (ADrawFlags and DFCS_PUSHED) = 0 then OffsetRect(APaintRect^, -1,
   -1);
 end;
 There is no implementation of this method in TGtkWSSpeedButton, GTK does 
 not shift the image.
 The question is if I have to uncomment the RegisterWSComponent command 
 for TGtkWSSpeedButton if it does not implement the method. I would say 
 yes because when I don't uncomment it for TWin32WSSpeedButton then 
 Lazarus crashes. 

If you call a function, at least one WSSpeedButton class must be registered.
Since you define a default method, you must register TWSSpeedButton in
wsbuttons.pp and the win32 override.


 But for example GTK2 does not register TGtk2WSButton at 
 all and is working.

The gtk2 inherites from gtk, so it includes the gtk.


Mattias

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


Re: [lazarus] How does RegisterWSComponent work?

2006-01-14 Thread Martin Smat

Mattias Gaertner wrote:


On Sat, 14 Jan 2006 14:31:34 +0100
Martin Smat [EMAIL PROTECTED] wrote:

 


Mattias Gaertner wrote:

   

I asked because I'm preparing a patch for speedbuttons to shift the 
image one pixel right and down when pushed. This feature is dependent on
   

used interface. This behavior is only for Win32 interface, GTK does not 
shift images on pushed buttons.
So I added new procedure to TWSSpeedButton and override it in 
TWin32WSSpeedButton where I uncommented the command for registration of 
this class: RegisterWSComponent(TCustomSpeedButton,
   


TWin32WSSpeedButton); After compiling everything seems to work well but
my question is if I  have to uncomment the registration command in GTK
interface where this  method is not implemented (there is no image
shift). 
 


Why do you need a method in the gtk interface for this?
Why not add a flag method TWSSpeedButton.GetPaintStyle(out DownOffset:
TPoint);
with default value 0,0 and overriden in TWin32WSSpeedButton with 2,2 (or
whatever offset)?

Mattias



 


Maybe I was not very precise. I don't need any gtk interface method.
I have this method: procedure TWSSpeedButton.PreparePaintRect(const 
ASpeedBtn: TCustomSpeedButton; const APaintRect: PRect; const 
ADrawFlags: integer);

and it is implemented in the TWin32WSSpeedButton:
procedure TWin32WSSpeedButton.PreparePaintRect(const ASpeedBtn: 
TCustomSpeedButton; const APaintRect: PRect; const ADrawFlags: integer);

begin
 if (ADrawFlags and DFCS_PUSHED) = 0 then OffsetRect(APaintRect^, -1,
 -1);
end;
There is no implementation of this method in TGtkWSSpeedButton, GTK does 
not shift the image.
The question is if I have to uncomment the RegisterWSComponent command 
for TGtkWSSpeedButton if it does not implement the method. I would say 
yes because when I don't uncomment it for TWin32WSSpeedButton then 
Lazarus crashes. 
   



If you call a function, at least one WSSpeedButton class must be registered.
Since you define a default method, you must register TWSSpeedButton in
wsbuttons.pp and the win32 override.


 

But for example GTK2 does not register TGtk2WSButton at 
all and is working.
   



The gtk2 inherites from gtk, so it includes the gtk.
 


Thanks,
this is exactly what I wanted to know.

Martin.



Mattias
 



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


[lazarus] Lazarus on MacOSX

2006-01-14 Thread Mattias Gaertner

Improvements for Lazarus on MacOSX:

- TSynEdit bold/italic bug has been fixed. It was a endian typecast bug. 

- The IDE now uses the -w flag for 'make' to force Entering/Leaving
directory messages. This fixes the file not found errors, when working on
the IDE under Mac. So, the best tool to work under MacOSX is Lazarus.

- The carbon interface, a native LCL widgetset for the MacOS (aqua look, ..)
now includes the unit fpcmacosall.pas. That means you no longer need to
install the UInterfaces. 

- carbon interface is now comilable under Linux/FreeBSD. This means compile
tests for target carbon can be made on other platforms. Just set the
compiler option LCL Widget Type to carbon and compile.

- carbon interface: Mouse events (Down, Up, Move, Click, Double Click,
Triple Click, Quad Click, Wheel) now work.

- Graphical applications under MacOSX require a special directory structure
with some resource files. Otherwise the application can not be focused and
has no menu. There is now a small tool to create these directories
(components/macfiles/examples/createmacapplication.lpi). See wiki links
below.

- There are some wiki pages describing how to install Lazarus on Mac and how
to create native carbon applications:
http://wiki.lazarus.freepascal.org/index.php/Carbon_Interface

- For those interesting in helping programming the carbon interface, there
is a wiki page:
http://wiki.lazarus.freepascal.org/index.php/Carbon_interface_internals

- A demonstration, that the carbon interface is already usable, is:
The Lazarus OpenGLControl already supports the carbon interface with AGL.
This means TForm, TButton and TOpenGLControl are the first three working
carbon controls.



Mattias

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


[lazarus] compare

2006-01-14 Thread SIX-S



I have just found your product Lazarus. I 
have used Delphi several years ago, but stopped using it. The cost of the 
advanced features such as client server was the reason. Is Lazarus something 
that can be used or will it have limitations?
Jim