Re: [lazarus] Windows CE support on the IDE

2006-03-05 Thread Yury Sidorov

From: Vincent Snijders [EMAIL PROTECTED]

Vincent Snijders wrote:


I think lazarus support is fine.

I will test later tonight (no time now).



Setting up the build environment takes longer than expected. I think most 
things can be done by carefully setting up the environment (fpc.cfg and 
directory layout). Maybe some things in the IDE can be made more 
comfortable, but using fpc (and not ppcXXX) as compiler and passing the -P 
compiler option, every thing should work.


Summary to make Lazarus cross compiler friendly:

1. fpc calls ppcarm instead of ppcrossarm when -Parm is passed. It should be 
fixed. Or Lazarus can directly call needed ppcrossXXX.

2. Lazarus should pass -P parameter to fpc depending of target CPU setting.
3. Lazarus should pass -XP parameter to compiler depending of target CPU and 
target OS settings (-XPtargetCPU-targetOS-).
4. Lazarus should have an ability to specify debugger settings for each 
target CPU/OS.


Yury Sidorov. 



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


Re: [lazarus] Windows CE support on the IDE

2006-03-05 Thread Vincent Snijders

Yury Sidorov wrote:

From: Vincent Snijders [EMAIL PROTECTED]


Vincent Snijders wrote:



I think lazarus support is fine.

I will test later tonight (no time now).



Setting up the build environment takes longer than expected. I think 
most things can be done by carefully setting up the environment 
(fpc.cfg and directory layout). Maybe some things in the IDE can be 
made more comfortable, but using fpc (and not ppcXXX) as compiler and 
passing the -P compiler option, every thing should work.



Summary to make Lazarus cross compiler friendly:

1. fpc calls ppcarm instead of ppcrossarm when -Parm is passed. It 
should be fixed. Or Lazarus can directly call needed ppcrossXXX.


Rename ppcrossarm to ppcarm.


2. Lazarus should pass -P parameter to fpc depending of target CPU setting.


True. IIRC, I told this also, when the Target CPU option was added to 
the compiler options.


3. Lazarus should pass -XP parameter to compiler depending of target CPU 
and target OS settings (-XPtargetCPU-targetOS-).


This should be part of your fpc.cfg, as is explained in the build FAQ
4. Lazarus should have an ability to specify debugger settings for each 
target CPU/OS.


I do not understand this, please elaborate.

Vincent

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


Re: [lazarus] Windows CE support on the IDE

2006-03-05 Thread Yury Sidorov

From: Vincent Snijders [EMAIL PROTECTED]

Yury Sidorov wrote:

From: Vincent Snijders [EMAIL PROTECTED]


Vincent Snijders wrote:



I think lazarus support is fine.

I will test later tonight (no time now).



Setting up the build environment takes longer than expected. I think 
most things can be done by carefully setting up the environment (fpc.cfg 
and directory layout). Maybe some things in the IDE can be made more 
comfortable, but using fpc (and not ppcXXX) as compiler and passing 
the -P compiler option, every thing should work.



Summary to make Lazarus cross compiler friendly:

1. fpc calls ppcarm instead of ppcrossarm when -Parm is passed. It should 
be fixed. Or Lazarus can directly call needed ppcrossXXX.


Rename ppcrossarm to ppcarm.


But ppcrossXXX is standard naming for cross compilers and ppcXXX is standard 
for native compilers. So fpc should be changed to correspond current 
namings.


2. Lazarus should pass -P parameter to fpc depending of target CPU 
setting.


True. IIRC, I told this also, when the Target CPU option was added to the 
compiler options.


3. Lazarus should pass -XP parameter to compiler depending of target CPU 
and target OS settings (-XPtargetCPU-targetOS-).


Ok. Then the following need to be added to default fpc.cfg:

#IFDEF FPC_CROSSCOMPILING
-XP$FPCTARGET-
#ENDIF


This should be part of your fpc.cfg, as is explained in the build FAQ
4. Lazarus should have an ability to specify debugger settings for each 
target CPU/OS.


I do not understand this, please elaborate.


At least debugger type and debugger path need to be configurable for each 
target.
For example I use one win32\gdb.exe for debugging win32 apps and use 
win32-arm\gdb.exe for remotely debugging wince apps.

Therefore different debuggers must be called for different targets.

Yury Sidorov. 



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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread Darius Blaszijk
A.J.

I've browsed through the list and find that some icons are missing (packages
/ run / among others). But I guess we could use the existing ones here.
Another thing is that the icons all are 16x16 in size. There should be a
22x22 equivalent though also included. Just have a look at the todolist for
example to see why. Large buttons plainly need 22x22 or else it looks
flimsy.

I think it's a good idea though to make icon sets that ship with lazarus
(in time). For instance high contrast or large size iconsets should be
included IMHO.

You are using Nuvola and CrystalSVG, ever considered Tango? I also like the
naming they use. It's like a taxonomy of functionality. I would like to
suggest taking over the naming for our purpose and start from there. You
added a huge list of icons, but I would be in favor of limiting the number.
Because all you get is each button having their own icon (like we do now
have). If we start with from functionality and work our way up I believe we
have more success in unifying lazarus. We can vote per icon wether to use it
in te base set or not.

I would also be glad to make a wiki on this subject and make it look similar
to this: http://tango-project.org/Tango_Icon_Gallery

BTW: why does the icons need to be converted to ICO? Lazarus is quite happy
with XPM. This format is also supported on all main platforms Lazarus is
available at (GIMP). So I see no real need it only adds to maintenance. And
if you want to do it  then use the convert util from ImageMagick.

Darius

- Original Message - 
From: A.J. Venter [EMAIL PROTECTED]
To: lazarus@miraclec.com
Sent: Sunday, March 05, 2006 5:23 AM
Subject: [lazarus] button icons for lazarus


 After some positive feedback on the suggestion last week, I did the work
and
 created a full set of button icons for lazarus. This set provides a
 replacement for everything in the standard delphi buttons directory
under
 images.

 Right now, only xpm's exist. Most of the icons were taken from the Nuvola
set
 for KDE (lgpl license) but a few came from CrystalSVG as well. Where I
could
 not find a suitable replacement, I made it myself. Overall they are as
 consistent as I could get them and should hopefully help give lazarus apps
a
 more consistent look and feel. Most importantly though I hope they will
save
 lazarus programmers some time by providing prebuilt icons for most common
 button-tasks so that nobody has to sit and create/find icons first.

 The icon names were taken directly from their delphi counterparts for
 familiarity reasons (of course it also made it a lot easier for me to see
 what I had done yet and what was waiting).

 Andrew Higgs has offered to do ico format versions of them, I personally
see
 no point in redoing the masked bitmap format that delphi used though I am
 open to the idea if somebody can give a good reason and will volunteer for
 the labour. However, I do think that before Andrew starts to do ico's I
would
 like everyone interested to take a look at the icons and make suggestions
for
 improvements, if you send me a better version of one of them, I will
happily
 replace it.

 The bit which would make me very happy if guys on top were so inclined
would
 be to see it included in the main lazarus tree eventually (based on it's
 delphi counterpart it should go under $LAZARUSDIR/images/buttons) but that
 should wait until after people had a chance to at least comment on the
 current set.

 I am wearing my asbestos undies so if you think I did a horrible job, you
are
 welcome to tell me :)

 The icons are in my subversion server and can be checked out with:
 svn co svn://silentcoder.co.za/lazarus/buttons/

 Ciao
 A.J.
 PS. Andrew, mail me with the username and password  you would like, and I
will
 give you write access to the tree.

 -- 
 there's nothing as inspirational for a hacker as a cat obscuring a bug
 by sitting in front of the monitor - Boudewijn Rempt
 A.J. Venter
 Chief Software Architect
 OpenLab International
 www.getopenlab.com
 www.silentcoder.co.za
 +27 82 726 5103

 _
  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] setColor part 3

2006-03-05 Thread Mattias Gaertner
On Sat, 04 Mar 2006 23:37:08 +0100
darekM [EMAIL PROTECTED] wrote:

 
  Well, a theme bug... guess the theme author must go hide really well
  now :)
 
  And usually then it isn't a TGroupBox any more but a TAlertableFrame
  that is derived from TGroupBox and has some extra style properties like
  overloaded-reactor-color ... :)
 
  I feel like I'm still missing your point :(

 Why You want all world move to theme.
 I know : theme are are good and we can do everything with it.
 But its only feature (its good ) not obligation
 Lazarus was made with one aspect: compatibility with Delphi and till now 
 it has no theme thinking at API layer.
 Of course we can all stuff prepare to theme, but many of us have hundred 
 thousand lines of code without theme, and now we all must move all code 
 to theme: what for? for new bugs, not necessary feature?

That's why the LCL maps the winapi functions, that are often used in Delphi
code, to themed functions.


 Not all people need theme, only working software. If they don't like 
 programs they change it.
 You can't tell: don't use Color only theme. Programmer have to know what 
 is better, he (not ) decided, if he goes wrong, he will not sell program.
 
 And when we talk about freedom: this is freedom to make mistake or not,
 Lazarus should (it can be) work with and without theme, even it 
 (programing without theme)  is bad

It's much simpler to implement one custom drawing function for a control,
then to map to various themed widgetsets. The LCL took the difficult and
more complex approach. Other people can contribute custom drawn controls. I
wonder, why there is not already a package providing some custom drawn
controls as there are so many for Delphi.

 
 When I say : live its not so simple, I think: nobody know all aspect and 
 environment of every program. One tools never be enough good to use in 
 any case.

Sure, but we try. :)


Mattias

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


Re: [lazarus] setColor part 3

2006-03-05 Thread A.J. Venter

 It's much simpler to implement one custom drawing function for a control,
 then to map to various themed widgetsets. The LCL took the difficult and
 more complex approach. Other people can contribute custom drawn controls. I
 wonder, why there is not already a package providing some custom drawn
 controls as there are so many for Delphi.
Well most of my visual components are actually custom drawn since they are 
designed to implement stuff that GTK doesn't normally do. Where themes fall 
short is in going one level up as it were. A quick google will find you at 
least twenty delphi components for doing more advanced pop-up hints with for 
example, depending on what you are looking for (everything from bubble-shaped 
to extensive html with image support is available) - THAT is where custom 
drawing becomes usefull, for adding that which gives your program an edge. 
Sure you don't NEED bubble-shaped pop-ups but they are more pleasing to users 
than square lines, and in fact they are becoming the default in several 
development environments (on windows anyway). 
As far as I can tell, there is no way to implement this with a theme - you 
need some form of custom drawing to do it, and I don't think it can be said 
that this in any way detracts from usability.
Several usability studies have come to the same conclusion, the universal look 
and feel is a myth - icons and colours only have meaning in the culture from 
which they originate - in other cultures they could mean completely different 
things or more commonly nothing at all - the core thing a programmer MUST do 
for usability is be consistent -always use the SAME file open icon, so users 
can recognise it even if it DOESN'T mean anything to them. 
The second most important thing is to ensure that your interface makes the 
purpose of every element obvious right from the start, the more obvious you 
can make things the easier it is to get the program. 
The third rule is - make it look pretty.

Rule 1 says - uses themeing almost all the time.
Rules 2 and 3 says - override the theme if you have to.

Mind you lazarus does not at present provide a clean way of SETTING theme 
style properties, and I think it will be very hard to add since the nature of 
this will be platform independent (I highly doubt that the same themeing 
structure would work on windows that works on GTK and even between GTK1 and 
GTK2 there are huge differences in the theme files).
What would be good is if we can create a set of generic theme-style specifiers 
for the LCL (much like we translated widgets) which are added as ADDITIONAL 
properties, not replacing the delphi properties but being added as extras. 
This way you can set at least those elements which are common to all 
platforms in the IDE and it will follow a theme file on how to actually 
implement them, but when there is a good reason, you use the delphi style 
properties to override the them.
A side effect is that if it can also translate to CSS properties it would be a 
very nice tool one day when CGI-from-the-IDE starts to become visual :)

  When I say : live its not so simple, I think: nobody know all aspect and
  environment of every program. One tools never be enough good to use in
  any case.

 Sure, but we try. :)
Lol, that is why there isn't one programming language to rule them all :) but 
OP comes pretty close. 

-- 
there's nothing as inspirational for a hacker as a cat obscuring a bug 
by sitting in front of the monitor - Boudewijn Rempt
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: [lazarus] TRunInThread - Progress, but new problem

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, A.J. Venter wrote:

 On Sunday 05 March 2006 08:43, A.J. Venter wrote:
  Well since my last mail on this a few weeks ago, I have made quite a bit of
  progress in my attempts to create a component that will allow me to call a
  tprocess in a thread while retrieving the output live.
 
  The structure I have no compiles, and can be placed on a form - it is all
  but right. The only trouble is - when I call the run method, it throws an
  access violation, the stack trace places it at line 76 (the line where I
  call FProcessThread.resume), I did a check and the first line of the
  execute method does not ever get executed.
 
 Mmmm, I think I know now why this is happening, though now I have even LESS of
 an idea how to prevent it.
 I instantiated TProcessThread directly in a test program (obviously this left
 me with no events or such but I was just trying to see if it worked) when I
 call TProcessThread.Create the program dies with error 232 complaining that
 there isn't a thread driver.
 I checked the lpr, it calls cthreads. I checked lazarus.pp - that too calls
 cthreads, the only thing I can imagine is that I must somehow call cthreads
 in olpack, putting it in olpack.lpk doesn't work - lazarus recreates the file
 on compile/save apparently, putting it in runinthread.pas doesn't  work
 (probably because it's not early enough in the uses clause) - leaving me
 unable to determine where I SHOULD add it - or is this the IDE telling me
 that what I am trying to do is simply not possible ?

You should add it in the program file (.lpr) of your test program.
As the _first_ unit (possibly after cmem, if you use that too).

Michael.

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


Re: [lazarus] Object pascal a Modern Language

2006-03-05 Thread Markku Niskanen
On Sun, 5 Mar 2006 03:50:47 -0300, Flávio Etrusco
[EMAIL PROTECTED] wrote:

I guess it's not so hugely useful or else someone would have
contributed it already. This is much more important in Java because
the String objects are constant/immutable and thus can't be

This is very true  I have never seen any performance problems with 
FPC. A StringTokenizer class could, however, be handy and it would 
not be very difficult to implement.

Markku
-- 
[EMAIL PROTECTED]

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


Re: [lazarus] TRunInThread - Progress, but new problem

2006-03-05 Thread A.J. Venter

  I checked the lpr, it calls cthreads. I checked lazarus.pp - that too
  calls cthreads, the only thing I can imagine is that I must somehow call
  cthreads in olpack, putting it in olpack.lpk doesn't work - lazarus
  recreates the file on compile/save apparently, putting it in
  runinthread.pas doesn't  work (probably because it's not early enough in
  the uses clause) - leaving me unable to determine where I SHOULD add it -
  or is this the IDE telling me that what I am trying to do is simply not
  possible ?

 You should add it in the program file (.lpr) of your test program.
 As the _first_ unit (possibly after cmem, if you use that too).
It IS the first unit in the lpr :(
Could it be that it somehow just doesn't get compiled intoto the component  ?
Has anybody ever DONE a threaded component ?

A.J.
-- 
there's nothing as inspirational for a hacker as a cat obscuring a bug 
by sitting in front of the monitor - Boudewijn Rempt
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread A.J. Venter

  
   Well I wasn't trying to extend the IDE, but to give a tool for USERS of
   the IDE, specifically to give replacements for the standard icons that
   delphi shipped with. These are not really meant for use INSIDE the IDE,
   but are meant to be available to people coding WITH the IDE.
   For compatibility I replaced specifically the icons that are in delphi
   (well Kylix OE actually), with the same names, and the same sizes
   (delphi's icon's are ALL 16x16)
 
  That is not completely correct: The component palette icons are 24x24,
  this is even a requirement which is documented.

 23x23
 Actually ideintf/formeditingintf.pas defines 25x25. Minus the border of at
 least 1 gives 23x23.
 Where is 24x24 documented?
Well like I said I was never TRYING to do buttons for use by the IDE or for 
the component pallette, I was doing icons for use by programs, e.g. for 
toolbars and menu's - basically to provide a set of instant access default 
buttons to put in timagelists.
Now having said that, there is no reason the same icons cannot be done at ANY 
size, or based on ANY icon set, but since there wasn't anything at ALL for 
this, I asked and people said it would be a good idea so I went ahead and 
pulled an allnighter and did it.
Now perhaps what is coming out of this is that we should in fact expand the 
set and possibly even start a full-scale subproject doing lazarus icons both 
for use by lazarus programs and for the IDE itself in all the appropriate 
sizes and styles ?

  The icons delivered with Delphi are 16x16, but that is because it is
  essentially still the same set of icons as delivered with Borland Pascal
  for windows 3.1
While this wouldn't surprize me at all there is more to it, considdering what 
these icons were typically meant for - 16x16 is STILL the standard size, I'm 
sitting in front of KDE right now and all the toolbar icons are 16x16 as are 
all the icons in menu's - because bigger than that and it would dwarve the 
text that goes next to it. 
While there may be good reasons for providing larger icons as well - for the 
goal I was trying to achieve, 16x16 remains the standard size on every 
desktop I know about and is likely to remain so for a long time yet.
 
  GUI and graphics requirements have increased since 3.1, so I would opt
  for a standard size of 22x22 ?
Possibly, though yet again - we are not talking about stuff to put on your 
Tglyphbuttons here but about things to put on toolbars and inside TMainMenu's 
- 16x16 as an available option at least must be considered, unless we will 
code automatic scaling into all the onpaints...
Basically what I am trying to do is to complete lazarus a little - by adding 
some of the things delphi users have come to expect, like a readily available 
set of standard icons they can assign to typical tasks like File|Open.

Ciao
A.J.


-- 
there's nothing as inspirational for a hacker as a cat obscuring a bug 
by sitting in front of the monitor - Boudewijn Rempt
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, A.J. Venter wrote:

 On Sunday 05 March 2006 11:02, Darius Blaszijk wrote:
  A.J.
 
  I've browsed through the list and find that some icons are missing
  (packages / run / among others). But I guess we could use the existing ones
  here. Another thing is that the icons all are 16x16 in size. There should
  be a 22x22 equivalent though also included. Just have a look at the
  todolist for example to see why. Large buttons plainly need 22x22 or else
  it looks flimsy.
 Well I wasn't trying to extend the IDE, but to give a tool for USERS of the
 IDE, specifically to give replacements for the standard icons that delphi
 shipped with. These are not really meant for use INSIDE the IDE, but are
 meant to be available to people coding WITH the IDE.
 For compatibility I replaced specifically the icons that are in delphi (well
 Kylix OE actually), with the same names, and the same sizes (delphi's icon's
 are ALL 16x16)

That is not completely correct: The component palette icons are 24x24,
this is even a requirement which is documented.

The icons delivered with Delphi are 16x16, but that is because it is essentially
still the same set of icons as delivered with Borland Pascal for windows 3.1

GUI and graphics requirements have increased since 3.1, so I would opt
for a standard size of 22x22 ?

Michael.

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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread rstar

A.J. Venter wrote:

Well I wasn't trying to extend the IDE, but to give a tool for USERS of
the IDE, specifically to give replacements for the standard icons that
delphi shipped with. These are not really meant for use INSIDE the IDE,
but are meant to be available to people coding WITH the IDE.
For compatibility I replaced specifically the icons that are in delphi
(well Kylix OE actually), with the same names, and the same sizes
(delphi's icon's are ALL 16x16)


That is not completely correct: The component palette icons are 24x24,
this is even a requirement which is documented.
  

23x23
Actually ideintf/formeditingintf.pas defines 25x25. Minus the border of at
least 1 gives 23x23.
Where is 24x24 documented?

Well like I said I was never TRYING to do buttons for use by the IDE or for 
the component pallette, I was doing icons for use by programs, e.g. for 
toolbars and menu's - basically to provide a set of instant access default 
buttons to put in timagelists.
Now having said that, there is no reason the same icons cannot be done at ANY 
size, or based on ANY icon set, but since there wasn't anything at ALL for 
this, I asked and people said it would be a good idea so I went ahead and 
pulled an allnighter and did it.
Now perhaps what is coming out of this is that we should in fact expand the 
set and possibly even start a full-scale subproject doing lazarus icons both 
for use by lazarus programs and for the IDE itself in all the appropriate 
sizes and styles ?
  

The icons delivered with Delphi are 16x16, but that is because it is
essentially still the same set of icons as delivered with Borland Pascal
for windows 3.1
  
While this wouldn't surprize me at all there is more to it, considdering what 
these icons were typically meant for - 16x16 is STILL the standard size, I'm 
sitting in front of KDE right now and all the toolbar icons are 16x16 as are 
all the icons in menu's - because bigger than that and it would dwarve the 
text that goes next to it. 
While there may be good reasons for providing larger icons as well - for the 
goal I was trying to achieve, 16x16 remains the standard size on every 
desktop I know about and is likely to remain so for a long time yet.
  

GUI and graphics requirements have increased since 3.1, so I would opt
for a standard size of 22x22 ?
  
Possibly, though yet again - we are not talking about stuff to put on your 
Tglyphbuttons here but about things to put on toolbars and inside TMainMenu's 
- 16x16 as an available option at least must be considered, unless we will 
code automatic scaling into all the onpaints...
Basically what I am trying to do is to complete lazarus a little - by adding 
some of the things delphi users have come to expect, like a readily available 
set of standard icons they can assign to typical tasks like File|Open.
  
Ciao

A.J.


  

Please also note:
http://www.lazarus.freepascal.org/mantis/view.php?id=1763


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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, Mattias Gaertner wrote:

 On Sun, 5 Mar 2006 11:25:30 +0100 (Romance Standard Time)
 Michael Van Canneyt [EMAIL PROTECTED] wrote:

 
 
  On Sun, 5 Mar 2006, A.J. Venter wrote:
 
   On Sunday 05 March 2006 11:02, Darius Blaszijk wrote:
A.J.
   
I've browsed through the list and find that some icons are missing
(packages / run / among others). But I guess we could use the existing
ones here. Another thing is that the icons all are 16x16 in size.
There should be a 22x22 equivalent though also included. Just have a
look at the todolist for example to see why. Large buttons plainly
need 22x22 or else it looks flimsy.
   Well I wasn't trying to extend the IDE, but to give a tool for USERS of
   the IDE, specifically to give replacements for the standard icons that
   delphi shipped with. These are not really meant for use INSIDE the IDE,
   but are meant to be available to people coding WITH the IDE.
   For compatibility I replaced specifically the icons that are in delphi
   (well Kylix OE actually), with the same names, and the same sizes
   (delphi's icon's are ALL 16x16)
 
  That is not completely correct: The component palette icons are 24x24,
  this is even a requirement which is documented.

 23x23
 Actually ideintf/formeditingintf.pas defines 25x25. Minus the border of at
 least 1 gives 23x23.
 Where is 24x24 documented?

I meant 'documented in Delphi' :-)

Michael.

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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread rstar

Mattias Gaertner wrote:

On Sun, 5 Mar 2006 11:25:30 +0100 (Romance Standard Time)
Michael Van Canneyt [EMAIL PROTECTED] wrote:

  

On Sun, 5 Mar 2006, A.J. Venter wrote:



On Sunday 05 March 2006 11:02, Darius Blaszijk wrote:
  

A.J.

I've browsed through the list and find that some icons are missing
(packages / run / among others). But I guess we could use the existing
ones here. Another thing is that the icons all are 16x16 in size.
There should be a 22x22 equivalent though also included. Just have a
look at the todolist for example to see why. Large buttons plainly
need 22x22 or else it looks flimsy.


Well I wasn't trying to extend the IDE, but to give a tool for USERS of
the IDE, specifically to give replacements for the standard icons that
delphi shipped with. These are not really meant for use INSIDE the IDE,
but are meant to be available to people coding WITH the IDE.
For compatibility I replaced specifically the icons that are in delphi
(well Kylix OE actually), with the same names, and the same sizes
(delphi's icon's are ALL 16x16)
  

That is not completely correct: The component palette icons are 24x24,
this is even a requirement which is documented.



23x23
Actually ideintf/formeditingintf.pas defines 25x25. Minus the border of at
least 1 gives 23x23.
Where is 24x24 documented?

 
  

The icons delivered with Delphi are 16x16, but that is because it is
essentially still the same set of icons as delivered with Borland Pascal
for windows 3.1

GUI and graphics requirements have increased since 3.1, so I would opt
for a standard size of 22x22 ?




Mattias

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


  
We should have fixed sizes (16x16, 24x24, etc.) not scaled sizes which 
are looking ugly.


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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread A.J. Venter
On Sunday 05 March 2006 14:13, Darius Blaszijk wrote:
  We should have fixed sizes (16x16, 24x24, etc.) not scaled sizes which
  are looking ugly.

 It makes no sense to use more than two sizes inside an app.

 16x16  - menuitems, treeviewitems, listviewitems, small toolbars buttons
 22x22 or 24x24 - large toolbar buttons

I'm with you on that one, but I spent about 5 hours doing these (quite a lot 
considering most of them were just conversions) the hard part was finding all 
the names, so I am not doing more today, but I reckon adding a 22x22 set 
should be faster. I want to do it the right way though - recreating them from 
the original SVG scaled images, not scaling the existing xpm's which will 
just make them ugly.

A.J.

-- 
there's nothing as inspirational for a hacker as a cat obscuring a bug 
by sitting in front of the monitor - Boudewijn Rempt
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread Darius Blaszijk
  I've browsed through the list and find that some icons are missing
  (packages / run / among others). But I guess we could use the existing
ones
  here. Another thing is that the icons all are 16x16 in size. There
should
  be a 22x22 equivalent though also included. Just have a look at the
  todolist for example to see why. Large buttons plainly need 22x22 or
else
  it looks flimsy.
 Well I wasn't trying to extend the IDE, but to give a tool for USERS of
the
 IDE, specifically to give replacements for the standard icons that delphi
 shipped with. These are not really meant for use INSIDE the IDE, but are
 meant to be available to people coding WITH the IDE.

I have misunderstood you in that case, but why not join the effords? If we
make a good iconset for Lazarus we can ship it with Lazarus for use by
coders.

  You are using Nuvola and CrystalSVG, ever considered Tango? I also like
the
  naming they use. It's like a taxonomy of functionality. I would like to
  suggest taking over the naming for our purpose and start from there. You
  added a huge list of icons, but I would be in favor of limiting the
number.
  Because all you get is each button having their own icon (like we do now
  have). If we start with from functionality and work our way up I believe
we
  have more success in unifying lazarus. We can vote per icon wether to
use
  it in te base set or not.
 I had a look at Tango, I must admit I like Nuvola better, I only used
Crystal
 where nuvola didn't have something that could cleanly replace the specific
 icon I was trying to replace. One of the little perks of being the one who
 actually DOES it, is that you get to choose what gets done first, since
 Nuvola is the default icon set for OpenLab, using it means my apps will
 integrate better in the environment I work on for a living, others are
 welcome to do other sets and I am happy to help them as well but since I
was
 the one doing it and nobody had complained about the Nuvola proposal, I
went
 ahead.

Don't feel offended, but if we ship a Nuvola or CrystalSVG or Tango (or
whatever) iconset with Lazarus (for use in apps) we will run into the same
problem you just described. People like working with icons that blend into
their interface.  Therefore I would suggest developing a conststent iconset
for lazarus (could be Nuvola or whatever) and ship that. People will
appreciate the feature wich comes free (seing it's been used by Lazarus
already).
The startingpoint for the iconset should be a naming convention IMHO and go
from there.
(Mattias, could we make ideimages.pas part of the LCL so any app can link to
that?)

 I think there should be ONE set of button-icons in the IDE tree, and other
 sets available as separate downloads for those who require them, if only
 because icons are big, which becomes the default and how it's all
structured
 is up for the community to decide. I just saw a need and tried to fill it
for
 everyones benefit. I for one will be happy to be able to use the ones I
did,
 I just thought others would like to be able to use them as well.
 
  I would also be glad to make a wiki on this subject and make it look
  similar to this: http://tango-project.org/Tango_Icon_Gallery
 That would be a good idea I think.

I will start on it as soon as I find some time. I will let you all know when
I get there. (Vincent: is there some easy way to upload a large amount of
images to the wiki?)

  BTW: why does the icons need to be converted to ICO? Lazarus is quite
happy
  with XPM. This format is also supported on all main platforms Lazarus is
  available at (GIMP). So I see no real need it only adds to maintenance.
And
  if you want to do it  then use the convert util from ImageMagick.
 Well the only reason I thought it had to be done was because all the OTHER
 icons in lazarus have ico versions as well, I know that xpm is well
supported
 all around but I assumed that there was a reason for this, if there isn't
 then there is no need.

No need I think.

Darius

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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread Darius Blaszijk

- Original Message - 
From: Mattias Gaertner [EMAIL PROTECTED]
To: lazarus@miraclec.com
Sent: Sunday, March 05, 2006 2:07 PM
Subject: Re: [lazarus] button icons for lazarus


 On Sun, 5 Mar 2006 13:35:03 +0100
 Darius Blaszijk [EMAIL PROTECTED] wrote:

I've browsed through the list and find that some icons are missing
(packages / run / among others). But I guess we could use the
existing
  ones
here. Another thing is that the icons all are 16x16 in size. There
  should
be a 22x22 equivalent though also included. Just have a look at the
todolist for example to see why. Large buttons plainly need 22x22 or
  else
it looks flimsy.
   Well I wasn't trying to extend the IDE, but to give a tool for USERS
of
  the
   IDE, specifically to give replacements for the standard icons that
   delphi shipped with. These are not really meant for use INSIDE the
IDE,
   but are meant to be available to people coding WITH the IDE.
 
  I have misunderstood you in that case, but why not join the effords? If
we
  make a good iconset for Lazarus we can ship it with Lazarus for use by
  coders.
 
You are using Nuvola and CrystalSVG, ever considered Tango? I also
like
  the
naming they use. It's like a taxonomy of functionality. I would like
to suggest taking over the naming for our purpose and start from
there. You added a huge list of icons, but I would be in favor of
limiting the
  number.
Because all you get is each button having their own icon (like we do
now have). If we start with from functionality and work our way up I
believe
  we
have more success in unifying lazarus. We can vote per icon wether
to
  use
it in te base set or not.
   I had a look at Tango, I must admit I like Nuvola better, I only used
  Crystal
   where nuvola didn't have something that could cleanly replace the
   specific icon I was trying to replace. One of the little perks of
being
   the one who actually DOES it, is that you get to choose what gets done
   first, since Nuvola is the default icon set for OpenLab, using it
means
   my apps will integrate better in the environment I work on for a
living,
   others are welcome to do other sets and I am happy to help them as
well
   but since I
  was
   the one doing it and nobody had complained about the Nuvola proposal,
I
  went
   ahead.
 
  Don't feel offended, but if we ship a Nuvola or CrystalSVG or Tango (or
  whatever) iconset with Lazarus (for use in apps) we will run into the
same
  problem you just described. People like working with icons that blend
into
  their interface.  Therefore I would suggest developing a conststent
  iconset for lazarus (could be Nuvola or whatever) and ship that. People
  will appreciate the feature wich comes free (seing it's been used by
  Lazarus already).
  The startingpoint for the iconset should be a naming convention IMHO and
  go from there.
  (Mattias, could we make ideimages.pas part of the LCL so any app can
link
  to that?)

 I will take a look. Of course we should rename it then. For example
 StdImages.pas.
 And of course using one item in an appliation should not include 50 others
 as well.
Well yes, that was my thinking too, but perhaps we could generate a single
unit per image and use that in StdImage.pas some way. I'm just thinking up
load.

Darius

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


Re: [lazarus] button icons for lazarus

2006-03-05 Thread Mattias Gaertner
On Sun, 5 Mar 2006 14:13:50 +0100
Darius Blaszijk [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: Mattias Gaertner [EMAIL PROTECTED]
 To: lazarus@miraclec.com
 Sent: Sunday, March 05, 2006 2:07 PM
 Subject: Re: [lazarus] button icons for lazarus
 
 
  On Sun, 5 Mar 2006 13:35:03 +0100
  Darius Blaszijk [EMAIL PROTECTED] wrote:
 
 I've browsed through the list and find that some icons are missing
 (packages / run / among others). But I guess we could use the
 existing
   ones
 here. Another thing is that the icons all are 16x16 in size. There
   should
 be a 22x22 equivalent though also included. Just have a look at
 the todolist for example to see why. Large buttons plainly need
 22x22 or
   else
 it looks flimsy.
Well I wasn't trying to extend the IDE, but to give a tool for USERS
 of
   the
IDE, specifically to give replacements for the standard icons that
delphi shipped with. These are not really meant for use INSIDE the
 IDE,
but are meant to be available to people coding WITH the IDE.
  
   I have misunderstood you in that case, but why not join the effords?
   If
 we
   make a good iconset for Lazarus we can ship it with Lazarus for use by
   coders.
  
 You are using Nuvola and CrystalSVG, ever considered Tango? I also
 like
   the
 naming they use. It's like a taxonomy of functionality. I would
 like to suggest taking over the naming for our purpose and start
 from there. You added a huge list of icons, but I would be in
 favor of limiting the
   number.
 Because all you get is each button having their own icon (like we
 do now have). If we start with from functionality and work our way
 up I believe
   we
 have more success in unifying lazarus. We can vote per icon wether
 to
   use
 it in te base set or not.
I had a look at Tango, I must admit I like Nuvola better, I only
used
   Crystal
where nuvola didn't have something that could cleanly replace the
specific icon I was trying to replace. One of the little perks of
 being
the one who actually DOES it, is that you get to choose what gets
done first, since Nuvola is the default icon set for OpenLab, using
it
 means
my apps will integrate better in the environment I work on for a
 living,
others are welcome to do other sets and I am happy to help them as
 well
but since I
   was
the one doing it and nobody had complained about the Nuvola
proposal,
 I
   went
ahead.
  
   Don't feel offended, but if we ship a Nuvola or CrystalSVG or Tango
   (or whatever) iconset with Lazarus (for use in apps) we will run into
   the
 same
   problem you just described. People like working with icons that blend
 into
   their interface.  Therefore I would suggest developing a conststent
   iconset for lazarus (could be Nuvola or whatever) and ship that.
   People will appreciate the feature wich comes free (seing it's been
   used by Lazarus already).
   The startingpoint for the iconset should be a naming convention IMHO
   and go from there.
   (Mattias, could we make ideimages.pas part of the LCL so any app can
 link
   to that?)
 
  I will take a look. Of course we should rename it then. For example
  StdImages.pas.
  And of course using one item in an appliation should not include 50
  others as well.
 Well yes, that was my thinking too, but perhaps we could generate a single
 unit per image and use that in StdImage.pas some way. I'm just thinking up
 load.

One unit per image? Is this a typo?


Mattias

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


Re: [lazarus] Windows CE support on the IDE

2006-03-05 Thread Marc Weustink

Yury Sidorov wrote:


Also there should be an option to setup a debugger for each target. 
There is gdb which allows to remotely debug wince applications from 
win32 host.


The type of debugger is not really dependent on the target. In this case 
 we need a remote debugger class which isn't there yet. (or can you 
connect the the device with ssh and run a gdb on the target ?)


I'll look if I can add the debugger

Marc

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


[lazarus] Lazarus component documentation

2006-03-05 Thread Uwe Grauer
Hi,

Where can i download documentation about lazarus components?
Are the lazarus components similar enough to Delphi to actually use the
Delphi docs?

Regards,
Uwe

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


Re: [lazarus] Lazarus component documentation

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, Uwe Grauer wrote:

 Hi,

 Where can i download documentation about lazarus components?
 Are the lazarus components similar enough to Delphi to actually use the
 Delphi docs?

Yes, unless you want to create custom descendents.

Michael.

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


Re: [lazarus] Lazarus component documentation

2006-03-05 Thread Uwe Grauer
Michael Van Canneyt wrote:
 
 On Sun, 5 Mar 2006, Uwe Grauer wrote:
 
 Hi,

 Where can i download documentation about lazarus components?
 Are the lazarus components similar enough to Delphi to actually use the
 Delphi docs?
 
 Yes, unless you want to create custom descendents.
 
 Michael.
 

Which delphi version docs are best suited for this?

Uwe

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


Re: [lazarus] Lazarus component documentation

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, Uwe Grauer wrote:

 Michael Van Canneyt wrote:
 
  On Sun, 5 Mar 2006, Uwe Grauer wrote:
 
  Hi,
 
  Where can i download documentation about lazarus components?
  Are the lazarus components similar enough to Delphi to actually use the
  Delphi docs?
 
  Yes, unless you want to create custom descendents.
 
  Michael.
 

 Which delphi version docs are best suited for this?

Doesn't matter. The basic components have remained
the same since ages. Anything up from version 3 of
Delphi should be OK, 5 or higher is even better.

Michael.

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


Re: [lazarus] compile lazarus on opensuse 10.0

2006-03-05 Thread Christian U.
you just have to install gdk and gtk devel packages just search on yast for 
gdk and gtk and install

the devel packages works fine for me.
another problem on suse is that the language settings are always on utf-8 
maybe thats no problem for english distributions. on my german i had to set 
the LC_LANG setting in the scripts manually 




- Original Message - 
From: Michael Van Canneyt [EMAIL PROTECTED]

To: lazarus@miraclec.com
Sent: Saturday, March 04, 2006 11:12 AM
Subject: Re: [lazarus] compile lazarus on opensuse 10.0





On Sat, 4 Mar 2006, John Briggs wrote:


  Any hint?
  I have /opt/gnome/lib/libgdk-1.2.so.0 .
  What am i missing?

 Any help on this, please?

 Uwe

Hi Uwe,
  For me there are major problems setting up the correct
programming/developement environment in OpenSuSe 10.0. I am currently 
using
the OpenSuSE10.0 x86_64 distribution and to me this distribution is 
crippled.
Perhaps you may get the answers to your specific distro questions by 
asking

them in an OpenSuSE forum.


One of my friends, who has little experience on Linux, set up Lazarus
on opensuse 10.0 without too much hassle. The distribution is fine and
contains all you need, but some names are different from what Lazarus
expects. It just takes creating a couple of symbolic links to fix things.

Michael.

_
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] Windows CE support on the IDE

2006-03-05 Thread Felipe Monteiro de Carvalho
On 3/5/06, Yury Sidorov [EMAIL PROTECTED] wrote:
  Rename ppcrossarm to ppcarm.

 But ppcrossXXX is standard naming for cross compilers and ppcXXX is standard
 for native compilers. So fpc should be changed to correspond current
 namings.

I agree with Yury on this. Althought renaming could be a quick fix we
should look for definitive fixes.

Also native arm compileres do exist. Maybe fpc cannot do it at this
point (or can it?), but it may do it on the future.

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] Windows CE support on the IDE

2006-03-05 Thread Yury Sidorov

From: Marc Weustink [EMAIL PROTECTED]

Yury Sidorov wrote:

From: Vincent Snijders [EMAIL PROTECTED]


Yury Sidorov wrote:


[snip]

4. Lazarus should have an ability to specify debugger settings for each 
target CPU/OS.



I do not understand this, please elaborate.



At least debugger type and debugger path need to be configurable for each 
target.
For example I use one win32\gdb.exe for debugging win32 apps and use 
win32-arm\gdb.exe for remotely debugging wince apps.

Therefore different debuggers must be called for different targets.


afaik you can use the same gdb for it (but Iv'e to admit that I never have 
used a remote gdb)


No. gdb for WinCE is absolutely different build. It can be used only to 
debug WinCE applications.
That's why several different debuggers need to be configured at the same 
time.

For example:

1. Win32 native gdb.
2. WinCE remote debugger.
3. Linux debugger via SSH.
4. MacOS debugger via SSH.
5. ... etc.

Once configured they will be used automatically when you run a project for 
corresponding target.


Yury Sidorov.


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


Re: [lazarus] Windows CE support on the IDE

2006-03-05 Thread Vincent Snijders

Felipe Monteiro de Carvalho wrote:

On 3/5/06, Yury Sidorov [EMAIL PROTECTED] wrote:


Rename ppcrossarm to ppcarm.


But ppcrossXXX is standard naming for cross compilers and ppcXXX is standard
for native compilers. So fpc should be changed to correspond current
namings.



I agree with Yury on this. Althought renaming could be a quick fix we
should look for definitive fixes.



It is supported by fpc now, (not yet tested). Implemented by Marco van 
de Voort.


Vincent

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


Re: [lazarus] Object pascal a Modern Language

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, L505 wrote:

 
 
   for very large strings that
   constantly change via concatenations. Instead of reserving memory for the
   ansistring to whatever amount you request, the stringbuffer type would
 reserve
   extra memory for you in a specifyable increment (256K, 128K, 20K, whatever
 you
   choose). If the string has a concatenation on queue which is larger than 
   the
   increment size, then the stringbuffer allocates enough memory with overlap
   (several increments until it fills the need).
 
  I guess it's not so hugely useful or else someone would have
  contributed it already.
 
 Mmm... if that was the case I wouldn't be programming because everyone has
 already implemented what I'm trying to program :-)
 
 Seriously though - it would mean less calls to SetLength when doing big
 operations on strings. Ansistrings work fine when you are doing small random
 concatenations but when you do tons at once they are much slower and you must
 resort to the following:
 
 setlength(string, NewMaxValue);
 string[i]:= 'string I want to concatenate';
 
 instead of
 
 string:= string + 'string I want to concatenate';

If it helps, we could add a function to TStrings:

Function TStrings.Concatenate : String;

begin
end;

Which would optimize the whole matter into a single 'getmem' call ?
if there is interest, I can add it. It's 30 minutes of work.

Michael.

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


[lazarus] System Information

2006-03-05 Thread Panagiotis Sidiropoulos
I need to get information regarding system, such as user login name, OS
Version/Distribution, Hard drive serial number, etc. (OS indepented).

Can anyone direct me where to find infomation and/or samples on this?

Panagiotis

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


Re: [lazarus] Object pascal a Modern Language

2006-03-05 Thread L505
   I guess it's not so hugely useful or else someone would have
   contributed it already.
 
  Mmm... if that was the case I wouldn't be programming because everyone has
  already implemented what I'm trying to program :-)
 
  Seriously though - it would mean less calls to SetLength when doing big
  operations on strings. Ansistrings work fine when you are doing small random
  concatenations but when you do tons at once they are much slower and you
must
  resort to the following:
 
  setlength(string, NewMaxValue);
  string[i]:= 'string I want to concatenate';
 
  instead of
 
  string:= string + 'string I want to concatenate';

 If it helps, we could add a function to TStrings:

 Function TStrings.Concatenate : String;

 begin
 end;

 Which would optimize the whole matter into a single 'getmem' call ?
 if there is interest, I can add it. It's 30 minutes of work.

 Michael.


But I mean if you are doing things at different times in the program:

for i := 1 to 1000
  DoSomestuff
  s:= string + string;
  DoOtherStuff
  s:= string + string;

in other words.. not one big concatenation at once such as:

string.concatenate(string1, string2, string3, string4);

The only way I saw it possible in my mind was through a special string buffer
type (or hey, even a stringbuffer class if not a true system type).

With TStrings.concatenate did you mean an all at once concatenation?

p.s. the reason I mention this was because I was just doing some work with my
friend Tony in pascal server pages for output buffering and we were doing some
benchmarks playing around with setlength calls

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


Re: [lazarus] Object pascal a Modern Language

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, L505 wrote:

I guess it's not so hugely useful or else someone would have
contributed it already.
  
   Mmm... if that was the case I wouldn't be programming because everyone has
   already implemented what I'm trying to program :-)
  
   Seriously though - it would mean less calls to SetLength when doing big
   operations on strings. Ansistrings work fine when you are doing small 
   random
   concatenations but when you do tons at once they are much slower and you
 must
   resort to the following:
  
   setlength(string, NewMaxValue);
   string[i]:= 'string I want to concatenate';
  
   instead of
  
   string:= string + 'string I want to concatenate';
 
  If it helps, we could add a function to TStrings:
 
  Function TStrings.Concatenate : String;
 
  begin
  end;
 
  Which would optimize the whole matter into a single 'getmem' call ?
  if there is interest, I can add it. It's 30 minutes of work.
 
  Michael.
 

 But I mean if you are doing things at different times in the program:

 for i := 1 to 1000
   DoSomestuff
   s:= string + string;
   DoOtherStuff
   s:= string + string;

 in other words.. not one big concatenation at once such as:

 string.concatenate(string1, string2, string3, string4);

 The only way I saw it possible in my mind was through a special string buffer
 type (or hey, even a stringbuffer class if not a true system type).

 With TStrings.concatenate did you mean an all at once concatenation?

All strings in the list are concatenated in one step, regardless of
when they were added to the list:

Sl:=TStringList.Create;
for i := 1 to 1000 do
 begin
 DoSomestuff;
 SL.Add(SomeString);
 DoOtherStuff;
 SL.Add(SomeOtherString);
 end;
Result:=SL.Concatenate; // This can be optimized to 1 getmem call.

Michael.

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


Re: [lazarus] Object pascal a Modern Language

2006-03-05 Thread L505

  But I mean if you are doing things at different times in the program:
 
  for i := 1 to 1000
DoSomestuff
s:= string + string;
DoOtherStuff
s:= string + string;
 
  in other words.. not one big concatenation at once such as:
 
  string.concatenate(string1, string2, string3, string4);
 
  The only way I saw it possible in my mind was through a special string
buffer
  type (or hey, even a stringbuffer class if not a true system type).
 
  With TStrings.concatenate did you mean an all at once concatenation?

 All strings in the list are concatenated in one step, regardless of
 when they were added to the list:

 Sl:=TStringList.Create;
 for i := 1 to 1000 do
  begin
  DoSomestuff;
  SL.Add(SomeString);
  DoOtherStuff;
  SL.Add(SomeOtherString);
  end;
 Result:=SL.Concatenate; // This can be optimized to 1 getmem call.

 Michael.


I suppose this is sort of like SetTextBuff for stringlist :)

And how about if you don't have any line delimiter? i.e. a string buffer with no
CRLF or LF.. does the TStrings type allow to disable the line delimiter?


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


Re: [lazarus] Object pascal a Modern Language

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, L505 wrote:

 
   But I mean if you are doing things at different times in the program:
  
   for i := 1 to 1000
 DoSomestuff
 s:= string + string;
 DoOtherStuff
 s:= string + string;
  
   in other words.. not one big concatenation at once such as:
  
   string.concatenate(string1, string2, string3, string4);
  
   The only way I saw it possible in my mind was through a special string
 buffer
   type (or hey, even a stringbuffer class if not a true system type).
  
   With TStrings.concatenate did you mean an all at once concatenation?
 
  All strings in the list are concatenated in one step, regardless of
  when they were added to the list:
 
  Sl:=TStringList.Create;
  for i := 1 to 1000 do
   begin
   DoSomestuff;
   SL.Add(SomeString);
   DoOtherStuff;
   SL.Add(SomeOtherString);
   end;
  Result:=SL.Concatenate; // This can be optimized to 1 getmem call.
 
  Michael.
 
 
 I suppose this is sort of like SetTextBuff for stringlist :)
 
 And how about if you don't have any line delimiter? i.e. a string buffer with 
 no
 CRLF or LF.. does the TStrings type allow to disable the line delimiter?

That would be the difference between 'Text' and 'Concatenate': 
Text adds CR/LF between the strings, 'Concatenate' would not.

Michael.

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


Re: [lazarus] System Information

2006-03-05 Thread Darius Blaszijk
There's no OS independent way to do this that I know of, but the getting the
OS version on win32 goes like this;

Darius

function GetWin32Version: string;
var
  verInfo: TOSVersionInfo;
  WinVersion: string;
begin
  verInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);

  if GetVersionEx(verInfo) then
  begin
WinVersion := 'Unknown Windows version';

if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 2) then
  WinVersion := 'Windows Server 2003';
if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 1) then
  WinVersion := 'Windows XP (2002)';
if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 0) then
  WinVersion := 'Windows 2000';
if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion = 0) then
  WinVersion := 'Windows NT';
if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion  0) then
  WinVersion := 'Windows 95/98/ME';

with verInfo do
  Result := WinVersion + #13#10 +
Format('%d.%d (Build %d) %s',
  [dwMajorVersion, dwMinorVersion, dwBuildNumber,
string(verInfo.szCSDVersion)]);
  end;
end;


- Original Message - 
From: Panagiotis Sidiropoulos [EMAIL PROTECTED]
To: lazarus@miraclec.com
Sent: Sunday, March 05, 2006 7:27 PM
Subject: [lazarus] System Information


 I need to get information regarding system, such as user login name, OS
 Version/Distribution, Hard drive serial number, etc. (OS indepented).

 Can anyone direct me where to find infomation and/or samples on this?

 Panagiotis

 _
  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] button icons for lazarus

2006-03-05 Thread Darius Blaszijk
   I will take a look. Of course we should rename it then. For example
   StdImages.pas.
   And of course using one item in an appliation should not include 50
   others as well.
  Well yes, that was my thinking too, but perhaps we could generate a
single
  unit per image and use that in StdImage.pas some way. I'm just thinking
up
  load.

 One unit per image? Is this a typo?

Actually no, but I realise what a beast this would become. The point is that
unused units are not linked in to make the footprint smaller. This is what
we should do (as you point out). So making units of an image could take
benefit of this behaviour. This is the pragmatic approach, but perhaps you
have proper generic alternative?

Darius

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


Re: [lazarus] System Information

2006-03-05 Thread Felipe Monteiro de Carvalho
I get Windows version like this:

type
  TVersaoDoWindows =
   (
vwDesconhecida,
// Informações simplificadas
Serie9x, // 32s em 3.11, 95, 98 e Me
SerieNT, // NT 3.51, NT, 2000 e XP
// Informações completas
vwWin32sEm311,
vwWinNT351,
vwWin95,
vwWinNT,
vwWin98,
vwWinMe,
vwWin2000,
vwWinXP,
vwWin2003,
vwWinVista,  // Ou superior
vwWinLongHorn  // Ou superior
   );

{***
*  TGlass.VersaoDoWindows ()
*
*  DESCRIPTION:Returns the Windows Version
*
*  PARAMETERS:
*
*  RETURNS:
*
***}
function TGlass.VersaoDoWindows(ApenasSerie: Boolean): TVersaoDoWindows;
{$IFDEF Win32}
var
  Versao: TOSVersionInfo;
{$ENDIF}
begin
  Result := vwDesconhecida;

{$IFDEF Win32}
  {--
Inicializações
   --}
  Versao.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
  if not GetVersionEx(Versao) then Exit;

  {--
Verifica qual o sistema operacional
   --
Serie 9x
   --}
  if Versao.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS then
  begin
if ApenasSerie then Result := Serie9x
else
begin
  if (Win32MajorVersion = 4) and
   (Win32MinorVersion = 90) then
   Result := vwWinMe
  else if (Win32MajorVersion = 4) and
   (Win32MinorVersion = 10) then
   Result := vwWin98
  else Result := vwWin95;
end;
  end
  {--
Série NT
   --}
  else if Versao.dwPlatformId = VER_PLATFORM_WIN32_NT then
  begin
if ApenasSerie then Result := SerieNT
else
begin
  if (Win32MajorVersion = 3) and
   (Win32MinorVersion = 10) then
   Result := vwWinNT351
  else if (Win32MajorVersion = 4) then
   Result := vwWinNT
  else if (Win32MajorVersion = 5) and (Win32MinorVersion = 0) then
   Result := vwWin2000
  else if (Win32MajorVersion = 5) and (Win32MinorVersion = 1) then
   Result := vwWinXP
  else if (Win32MajorVersion = 5) and (Win32MinorVersion = 2) then
   Result := vwWin2003
  else if (Win32MajorVersion = 6) then
   Result := vwWinVista;
end;
  end
  {--
Série 32s operando no 3.11
(OBS: Se pediu apenas série responde 9x, pois não é da NT,
   mas, na verdade, representa uma série aparte).
   --}
  else
  begin
if ApenasSerie then Result := Serie9x
else Result := vwWin32sEm311;
  end;
{$ENDIF}
end;

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Object pascal a Modern Language

2006-03-05 Thread L505
   Sl:=TStringList.Create;
   for i := 1 to 1000 do
begin
DoSomestuff;
SL.Add(SomeString);
DoOtherStuff;
SL.Add(SomeOtherString);
end;
   Result:=SL.Concatenate; // This can be optimized to 1 getmem call.
  
   Michael.
 
 
  I suppose this is sort of like SetTextBuff for stringlist :)
 
  And how about if you don't have any line delimiter? i.e. a string buffer
with no
  CRLF or LF.. does the TStrings type allow to disable the line delimiter?

 That would be the difference between 'Text' and 'Concatenate':
 Text adds CR/LF between the strings, 'Concatenate' would not.

 Michael.


Oh! it has been a while since I looked into the Tstrings source code.. so you're
saying that a tstrings already *IS* buffered and all you would have to do is
implement concatenate function.. because buffering already exists.

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


{SPAM?} Re: [lazarus] System Information

2006-03-05 Thread Panagiotis Sidiropoulos
Thanks a lot for information. Now I'm seeking for similar information
under Linux and MacOS. Any help would be most appreciated.

Panagiotis

Στις 05-03-2006, ημέρα Κυρ, και ώρα 18:09 +0100, ο/η Darius Blaszijk
έγραψε:
 There's no OS independent way to do this that I know of, but the getting the
 OS version on win32 goes like this;
 
 Darius
 
 function GetWin32Version: string;
 var
   verInfo: TOSVersionInfo;
   WinVersion: string;
 begin
   verInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
 
   if GetVersionEx(verInfo) then
   begin
 WinVersion := 'Unknown Windows version';
 
 if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 2) then
   WinVersion := 'Windows Server 2003';
 if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 1) then
   WinVersion := 'Windows XP (2002)';
 if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 0) then
   WinVersion := 'Windows 2000';
 if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion = 0) then
   WinVersion := 'Windows NT';
 if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion  0) then
   WinVersion := 'Windows 95/98/ME';
 
 with verInfo do
   Result := WinVersion + #13#10 +
 Format('%d.%d (Build %d) %s',
   [dwMajorVersion, dwMinorVersion, dwBuildNumber,
 string(verInfo.szCSDVersion)]);
   end;
 end;
 
 
 - Original Message - 
 From: Panagiotis Sidiropoulos [EMAIL PROTECTED]
 To: lazarus@miraclec.com
 Sent: Sunday, March 05, 2006 7:27 PM
 Subject: [lazarus] System Information
 
 
  I need to get information regarding system, such as user login name, OS
  Version/Distribution, Hard drive serial number, etc. (OS indepented).
 
  Can anyone direct me where to find infomation and/or samples on this?
 
  Panagiotis
 
  _
   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] Windows CE support on the IDE

2006-03-05 Thread Yury Sidorov

From: Marc Weustink [EMAIL PROTECTED]

Yury Sidorov wrote:

From: Marc Weustink [EMAIL PROTECTED]


Yury Sidorov wrote:


From: Vincent Snijders [EMAIL PROTECTED]


Yury Sidorov wrote:



[snip]

4. Lazarus should have an ability to specify debugger settings for 
each target CPU/OS.




I do not understand this, please elaborate.




At least debugger type and debugger path need to be configurable for 
each target.
For example I use one win32\gdb.exe for debugging win32 apps and use 
win32-arm\gdb.exe for remotely debugging wince apps.

Therefore different debuggers must be called for different targets.



afaik you can use the same gdb for it (but Iv'e to admit that I never 
have used a remote gdb)



No. gdb for WinCE is absolutely different build. It can be used only to 
debug WinCE applications.
That's why several different debuggers need to be configured at the same 
time.

For example:

1. Win32 native gdb.
2. WinCE remote debugger.
3. Linux debugger via SSH.
4. MacOS debugger via SSH.
5. ... etc.

Once configured they will be used automatically when you run a project 
for corresponding target.


I think this is more a project option then something based on a target.
On linux I want sometimes to debug locally and sometimes remote, depending 
on what project I'm working with.


Sure. It will be great to have an ability to choose debugger and set some 
its options per project. But there should be default set of debuggers also.


Now I see it as follows:

An ability to add several debugger configurations in global debugger 
options. For each configuration target CPU and target OS specified.
For every project needed debugger configuration is used if found matched 
CPU/OS pair.


Also it will be good manually choose needed debugger configuration in 
project options.


Yury Sidorov.


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


{SPAM?} Re: {SPAM?} Re: [lazarus] System Information

2006-03-05 Thread Panagiotis Sidiropoulos
I had problems again receiving messages to the list since yesterday
noon. Today I had to re-subscribe in order to get alive again. Now, a
reply from me considered as potential SPAM. Does anyone know why? 

Panagiotis

Στις 05-03-2006, ημέρα Κυρ, και ώρα 19:26 +, ο/η Panagiotis
Sidiropoulos έγραψε:
 Thanks a lot for information. Now I'm seeking for similar information
 under Linux and MacOS. Any help would be most appreciated.
 
 Panagiotis
 
 Στις 05-03-2006, ημέρα Κυρ, και ώρα 18:09 +0100, ο/η Darius Blaszijk
 έγραψε:
  There's no OS independent way to do this that I know of, but the getting the
  OS version on win32 goes like this;
  
  Darius
  
  function GetWin32Version: string;
  var
verInfo: TOSVersionInfo;
WinVersion: string;
  begin
verInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
  
if GetVersionEx(verInfo) then
begin
  WinVersion := 'Unknown Windows version';
  
  if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 2) then
WinVersion := 'Windows Server 2003';
  if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 1) then
WinVersion := 'Windows XP (2002)';
  if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 0) then
WinVersion := 'Windows 2000';
  if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion = 0) then
WinVersion := 'Windows NT';
  if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion  0) then
WinVersion := 'Windows 95/98/ME';
  
  with verInfo do
Result := WinVersion + #13#10 +
  Format('%d.%d (Build %d) %s',
[dwMajorVersion, dwMinorVersion, dwBuildNumber,
  string(verInfo.szCSDVersion)]);
end;
  end;
  
  
  - Original Message - 
  From: Panagiotis Sidiropoulos [EMAIL PROTECTED]
  To: lazarus@miraclec.com
  Sent: Sunday, March 05, 2006 7:27 PM
  Subject: [lazarus] System Information
  
  
   I need to get information regarding system, such as user login name, OS
   Version/Distribution, Hard drive serial number, etc. (OS indepented).
  
   Can anyone direct me where to find infomation and/or samples on this?
  
   Panagiotis
  
   _
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


{SPAM?} Re: [lazarus] System Information

2006-03-05 Thread Panagiotis Sidiropoulos
I found Linux command hdparm at
http://www.webmasterworld.com/forum40/957.htm. This command provides a
part of information I need, as follows. Is it possible to retrieve this
information from inside a Lazarus app but without root previledges?


# hdparm -i /dev/hda 

/dev/hda: 

Model=Maxtor 52049H3, FwRev=JAC61HU0, SerialNo=F3H238ZC 
Config={ Fixed } 
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57 
BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=8 
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=39102336 
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} 
PIO modes: pio0 pio1 pio2 pio3 pio4 
DMA modes: mdma0 mdma1 *mdma2 
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 
AdvancedPM=yes: disabled (255) WriteCache=enabled 
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 0: 1 2 3 4 5 6 


Panagiotis


Στις 05-03-2006, ημέρα Κυρ, και ώρα 14:18 -0300, ο/η Felipe Monteiro de
Carvalho έγραψε:
 I get Windows version like this:
 
 type
   TVersaoDoWindows =
(
 vwDesconhecida,
 // Informações simplificadas
 Serie9x, // 32s em 3.11, 95, 98 e Me
 SerieNT, // NT 3.51, NT, 2000 e XP
 // Informações completas
 vwWin32sEm311,
 vwWinNT351,
 vwWin95,
 vwWinNT,
 vwWin98,
 vwWinMe,
 vwWin2000,
 vwWinXP,
 vwWin2003,
 vwWinVista,  // Ou superior
 vwWinLongHorn  // Ou superior
);
 
 {***
 *  TGlass.VersaoDoWindows ()
 *
 *  DESCRIPTION:Returns the Windows Version
 *
 *  PARAMETERS:
 *
 *  RETURNS:
 *
 ***}
 function TGlass.VersaoDoWindows(ApenasSerie: Boolean): TVersaoDoWindows;
 {$IFDEF Win32}
 var
   Versao: TOSVersionInfo;
 {$ENDIF}
 begin
   Result := vwDesconhecida;
 
 {$IFDEF Win32}
   {--
 Inicializações
--}
   Versao.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
   if not GetVersionEx(Versao) then Exit;
 
   {--
 Verifica qual o sistema operacional
--
 Serie 9x
--}
   if Versao.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS then
   begin
 if ApenasSerie then Result := Serie9x
 else
 begin
   if (Win32MajorVersion = 4) and
(Win32MinorVersion = 90) then
Result := vwWinMe
   else if (Win32MajorVersion = 4) and
(Win32MinorVersion = 10) then
Result := vwWin98
   else Result := vwWin95;
 end;
   end
   {--
 Série NT
--}
   else if Versao.dwPlatformId = VER_PLATFORM_WIN32_NT then
   begin
 if ApenasSerie then Result := SerieNT
 else
 begin
   if (Win32MajorVersion = 3) and
(Win32MinorVersion = 10) then
Result := vwWinNT351
   else if (Win32MajorVersion = 4) then
Result := vwWinNT
   else if (Win32MajorVersion = 5) and (Win32MinorVersion = 0) then
Result := vwWin2000
   else if (Win32MajorVersion = 5) and (Win32MinorVersion = 1) then
Result := vwWinXP
   else if (Win32MajorVersion = 5) and (Win32MinorVersion = 2) then
Result := vwWin2003
   else if (Win32MajorVersion = 6) then
Result := vwWinVista;
 end;
   end
   {--
 Série 32s operando no 3.11
 (OBS: Se pediu apenas série responde 9x, pois não é da NT,
mas, na verdade, representa uma série aparte).
--}
   else
   begin
 if ApenasSerie then Result := Serie9x
 else Result := vwWin32sEm311;
   end;
 {$ENDIF}
 end;
 
 --
 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


Re: {SPAM?} Re: {SPAM?} Re: [lazarus] System Information

2006-03-05 Thread Vincent Snijders

Panagiotis Sidiropoulos wrote:

I had problems again receiving messages to the list since yesterday
noon. Today I had to re-subscribe in order to get alive again. Now, a
reply from me considered as potential SPAM. Does anyone know why? 



Maybe your outgoing mail server adds it? Maybe your incoming mailserver 
adds it?


Vincent.

P.S. It would be nice if you could adjust your clock / time zone 
settings. Your last mail was sent two hours into the future. It helps 
sorting my messages, especially since you don't start a new thread with 
a new subject, but take an existing mail and change the subject, so sort 
by threading doesn't really help then either.


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


Re: {SPAM?} Re: [lazarus] System Information

2006-03-05 Thread A.J. Venter
On Sunday 05 March 2006 22:29, Panagiotis Sidiropoulos wrote:
 I found Linux command hdparm at
 http://www.webmasterworld.com/forum40/957.htm. This command provides a
 part of information I need, as follows. Is it possible to retrieve this
 information from inside a Lazarus app but without root previledges?

You should be able to get almost all of it from /proc normal users have 
read-only privileges there, it's basically a case of reading files to get the 
information you want.

A.J.

-- 
there's nothing as inspirational for a hacker as a cat obscuring a bug 
by sitting in front of the monitor - Boudewijn Rempt
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: [lazarus] System Information

2006-03-05 Thread Felipe Monteiro de Carvalho
Hello,

There are probably better ways to do this, but the command dir on
Windows will give you the HD serial number. It´s hard to parse this,
since the command result can be on any language.

--
Felipe Monteiro de Carvalho

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


{SPAM?} Re: {SPAM?} Re: {SPAM?} Re: [lazarus] System Information

2006-03-05 Thread Panagiotis Sidiropoulos
 Maybe your outgoing mail server adds it? Maybe your incoming mailserver 
 adds it?

I never think of it this way, I'll check it, thank you.

 P.S. It would be nice if you could adjust your clock / time zone 
 settings. Your last mail was sent two hours into the future. It helps 
 sorting my messages, especially since you don't start a new thread with 
 a new subject, but take an existing mail and change the subject, so sort 
 by threading doesn't really help then either.

My clock is properly adjusted for local time. Please advise on what I can 
do so to help readers abroad, properly sort their messages. I do usualy 
reply to an existing messages changing subject and body. Now I see this 
does help help sorting, even at mailing list archive, I did not know that.

Panagiotis 


Στις 05-03-2006, ημέρα Κυρ, και ώρα 19:29 +0100, ο/η Vincent Snijders
έγραψε:
 Panagiotis Sidiropoulos wrote:
  I had problems again receiving messages to the list since yesterday
  noon. Today I had to re-subscribe in order to get alive again. Now, a
  reply from me considered as potential SPAM. Does anyone know why? 
  
 
 Maybe your outgoing mail server adds it? Maybe your incoming mailserver 
 adds it?
 
 Vincent.
 
 P.S. It would be nice if you could adjust your clock / time zone 
 settings. Your last mail was sent two hours into the future. It helps 
 sorting my messages, especially since you don't start a new thread with 
 a new subject, but take an existing mail and change the subject, so sort 
 by threading doesn't really help then either.
 
 _
  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] Conversion Tool (Delphi - Lazarus): standalone or inside the IDE?

2006-03-05 Thread Felipe Monteiro de Carvalho
Hello,

Are there news on the Conversion Tool ? I need to convert a project,
so maybe I can help implementing it.

thanks,
--
Felipe Monteiro de Carvalho

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


[lazarus] Icon property of TTrayicon in win32 patch

2006-03-05 Thread Christian U.

This patch adds support for the Icon property in win32.
At time no Transparency works, but the Bitmap from the Icon Property is 
shown as Trayicon 
I havend tryed yet to generate the icon from TLazIntfImage, maybe this works 
better for getting Transparency


regards
Christian 


trayicon.dif
Description: Binary data


Re: {SPAM?} Re: [lazarus] System Information

2006-03-05 Thread Michael Van Canneyt


On Sun, 5 Mar 2006, Panagiotis Sidiropoulos wrote:

 Thanks a lot for information. Now I'm seeking for similar information
 under Linux and MacOS. Any help would be most appreciated.

You can use the fpuname call for this on linux/darwin. 
it's documented. (baseunix unit)

Michael.

 
 Panagiotis
 
 Στις 05-03-2006, ημέρα Κυρ, και ώρα 18:09 +0100, ο/η Darius Blaszijk
 έγραψε:
  There's no OS independent way to do this that I know of, but the getting the
  OS version on win32 goes like this;
  
  Darius
  
  function GetWin32Version: string;
  var
verInfo: TOSVersionInfo;
WinVersion: string;
  begin
verInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
  
if GetVersionEx(verInfo) then
begin
  WinVersion := 'Unknown Windows version';
  
  if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 2) then
WinVersion := 'Windows Server 2003';
  if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 1) then
WinVersion := 'Windows XP (2002)';
  if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 0) then
WinVersion := 'Windows 2000';
  if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion = 0) then
WinVersion := 'Windows NT';
  if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion  0) then
WinVersion := 'Windows 95/98/ME';
  
  with verInfo do
Result := WinVersion + #13#10 +
  Format('%d.%d (Build %d) %s',
[dwMajorVersion, dwMinorVersion, dwBuildNumber,
  string(verInfo.szCSDVersion)]);
end;
  end;
  
  
  - Original Message - 
  From: Panagiotis Sidiropoulos [EMAIL PROTECTED]
  To: lazarus@miraclec.com
  Sent: Sunday, March 05, 2006 7:27 PM
  Subject: [lazarus] System Information
  
  
   I need to get information regarding system, such as user login name, OS
   Version/Distribution, Hard drive serial number, etc. (OS indepented).
  
   Can anyone direct me where to find infomation and/or samples on this?
  
   Panagiotis
  
   _
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] Windows CE support on the IDE

2006-03-05 Thread Yury Sidorov

From: Vincent Snijders [EMAIL PROTECTED]

Felipe Monteiro de Carvalho wrote:

On 3/5/06, Yury Sidorov [EMAIL PROTECTED] wrote:


Rename ppcrossarm to ppcarm.


But ppcrossXXX is standard naming for cross compilers and ppcXXX is 
standard

for native compilers. So fpc should be changed to correspond current
namings.



I agree with Yury on this. Althought renaming could be a quick fix we
should look for definitive fixes.



It is supported by fpc now, (not yet tested). Implemented by Marco van de 
Voort.


Now all ok with fpc.
Need to make Lazarus pass -P parameter to fpc. Also by default fpc need to 
be set in environment options.


Yury Sidorov.


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


Re: [lazarus] Icon property of TTrayicon in win32 patch

2006-03-05 Thread Felipe Monteiro de Carvalho
On 3/5/06, Christian U. [EMAIL PROTECTED] wrote:
 This patch adds support for the Icon property in win32.

It is a good patch and probably should be applied, but what part of it
adds support for Icon property in win32??

That is already implemented. What isn´t working is the TIcon object
and not TrayIcon component.

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Icon property of TTrayicon in win32 patch

2006-03-05 Thread Christian U.

It is a good patch and probably should be applied, but what part of it
adds support for Icon property in win32??

That is already implemented. What isn´t working is the TIcon object
and not TrayIcon component.


TTrayicon needs an real Win32 icon handle to show an icon in win32.
This patch generates an HICON from TBitmap (Lazarus uses internaly TBitam as 
TIcon)


so until now you had to override Icon.handle to show an icon in win32.
now you musnt

Christian 


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


Re: {SPAM?} Re: [lazarus] System Information

2006-03-05 Thread Panagiotis Sidiropoulos
It works, returning some useful information. Here is a ready to use
function for anyone interest:

// Get sys information:
// - 1 = Domain
// - 2 = Machine
// - 3 = Nodename
// - 4 = Release
// - 5 = Sysname
// - 6 = Version
function GetSysInfo( const WHAT_TO_RETURN: integer ): string;
var
   ResultStru: TUTSName;
   
begin
 Result := '';
 FpUname( ResultStru );
 case WHAT_TO_RETURN of
  1 : Result := ResultStru.Domain;
  2 : Result := ResultStru.Machine;
  3 : Result := ResultStru.Nodename;
  4 : Result := ResultStru.Release;
  5 : Result := ResultStru.Sysname;
  6 : Result := ResultStru.Version;
 end;
end;

Panagiotis


Στις 05-03-2006, ημέρα Κυρ, και ώρα 21:30 +0100, ο/η Michael Van Canneyt
έγραψε:
 
 On Sun, 5 Mar 2006, Panagiotis Sidiropoulos wrote:
 
  Thanks a lot for information. Now I'm seeking for similar information
  under Linux and MacOS. Any help would be most appreciated.
 
 You can use the fpuname call for this on linux/darwin. 
 it's documented. (baseunix unit)
 
 Michael.
 
  
  Panagiotis
  
  Στις 05-03-2006, ημέρα Κυρ, και ώρα 18:09 +0100, ο/η Darius Blaszijk
  έγραψε:
   There's no OS independent way to do this that I know of, but the getting 
   the
   OS version on win32 goes like this;
   
   Darius
   
   function GetWin32Version: string;
   var
 verInfo: TOSVersionInfo;
 WinVersion: string;
   begin
 verInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
   
 if GetVersionEx(verInfo) then
 begin
   WinVersion := 'Unknown Windows version';
   
   if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 2) then
 WinVersion := 'Windows Server 2003';
   if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 1) then
 WinVersion := 'Windows XP (2002)';
   if (verInfo.dwMajorVersion = 5) and (verInfo.dwMinorVersion = 0) then
 WinVersion := 'Windows 2000';
   if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion = 0) then
 WinVersion := 'Windows NT';
   if (verInfo.dwMajorVersion = 4) and (verInfo.dwMinorVersion  0) then
 WinVersion := 'Windows 95/98/ME';
   
   with verInfo do
 Result := WinVersion + #13#10 +
   Format('%d.%d (Build %d) %s',
 [dwMajorVersion, dwMinorVersion, dwBuildNumber,
   string(verInfo.szCSDVersion)]);
 end;
   end;
   
   
   - Original Message - 
   From: Panagiotis Sidiropoulos [EMAIL PROTECTED]
   To: lazarus@miraclec.com
   Sent: Sunday, March 05, 2006 7:27 PM
   Subject: [lazarus] System Information
   
   
I need to get information regarding system, such as user login name, OS
Version/Distribution, Hard drive serial number, etc. (OS indepented).
   
Can anyone direct me where to find infomation and/or samples on this?
   
Panagiotis
   
_
 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] System Information

2006-03-05 Thread Panagiotis Sidiropoulos
 You should be able to get almost all of it from /proc normal users have 
 read-only privileges there, it's basically a case of reading files to get the 
 information you want.

This is a very simple and interesting approach.
I checked suggested folder and found alot of files most of them having
very promising names but no content, zero length. I only found
information regarding network card at /sys/class/net/eth0 or eth1.

Is there any way to unveil it's contents?
Is this folder structure common to all linux dstributions?

Regards, Panagiotis


Στις 05-03-2006, ημέρα Κυρ, και ώρα 20:31 +0200, ο/η A.J. Venter έγραψε:
 On Sunday 05 March 2006 22:29, Panagiotis Sidiropoulos wrote:
  I found Linux command hdparm at
  http://www.webmasterworld.com/forum40/957.htm. This command provides a
  part of information I need, as follows. Is it possible to retrieve this
  information from inside a Lazarus app but without root previledges?
 
 You should be able to get almost all of it from /proc normal users have 
 read-only privileges there, it's basically a case of reading files to get the 
 information you want.
 
 A.J.
 

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


[lazarus] System information

2006-03-05 Thread darekM

Hi
 How to obtain current codepage (UTF, 8859-?) under Linux


Darek

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


Re: [lazarus] Icon property of TTrayicon in win32 patch

2006-03-05 Thread Christian U.

Where in the patch is this code? I cannot find this 

Maybe you forgot to include modifications to wswin32tryicon.pas to the 
patch?


Also this kind of modification will have to be reverted when a real
TIcon is implemented.



1. a real TIcon will never be implemented becouse no os than win32 supports 
icons maybe someone can nclude those code in ticon to generate the handle 
there ...


2. all changes in this patch goes to wswin32trayicon or i need glasses ...

here an copy of thw patch :


Index: components/trayicon/wswin32trayicon.pas
===
--- components/trayicon/wswin32trayicon.pas (Revision 8867)
+++ components/trayicon/wswin32trayicon.pas (Arbeitskopie)
@@ -57,6 +57,48 @@
  szClassName = 'TTrayIconClass';
  szAppTitle = 'apptitle';

+function BitmapToIcon(Bitmap: TBitmap): HIcon;
+var
+  IconSizeX, IconSizeY : integer;
+  IconInfo: TIconInfo;
+  IconBitmap, MaskBitmap: TBitmap;
+  x, y: Integer;
+  TransparentColor: TColor;
+begin
+  IconSizeX := GetSystemMetrics(SM_CXSMICON);
+  IconSizeY := GetSystemMetrics(SM_CYSMICON);
+  IconBitmap:= TBitmap.Create;
+  IconBitmap.Width:= IconSizeX;
+  IconBitmap.Height:= IconSizeY;
+  IconBitmap.Canvas.StretchDraw(Rect(0, 0, IconSizeX, IconSizeY), Bitmap);
+  IconBitmap.TransparentColor:= Bitmap.TransparentColor;
+
+  IconBitmap.Transparent := True;
+  IconBitmap.TransparentMode := tmAuto;
+
+  TransparentColor:= IconBitmap.TransparentColor and $FF;
+  MaskBitmap:= TBitmap.Create;
+  MaskBitmap.Monochrome := True;
+  MaskBitmap.Width:= IconSizeX;
+  MaskBitmap.Height:= IconSizeY;
+  MaskBitmap.Canvas.Brush.Color := clNone;
+  MaskBitmap.Canvas.Rectangle(0,0,IconSizeX,IconSizeY);
+  for y:= 0 to IconSizeY - 1 do
+for x:= 0 to IconSizeX - 1 do
+  if IconBitmap.Canvas.Pixels[x, y] = TransparentColor then
+IconBitmap.Canvas.Pixels[x, y]:= clDontMask;
+  IconInfo.fIcon:= True;
+  IconInfo.xHotspot := 0;
+  IconInfo.yHotspot := 0;
+  IconInfo.hbmMask:= MaskBitmap.handle;
+  IconInfo.hbmColor:= IconBitmap.Handle;
+  Result := CreateIconIndirect(IconInfo);
+  MaskBitmap.Free;
+  IconBitmap.Free;
+end;
+
+
+
{***
*  TrayWndProc ()
*
@@ -270,7 +312,7 @@
  tnid.uFlags := NIF_MESSAGE or NIF_ICON;
  if ShowHint then tnid.uFlags := tnid.uFlags or NIF_TIP;
  tnid.uCallbackMessage := WM_USER + uID;
-  tnid.hIcon := Icon.Handle;
+  tnid.hIcon := BitmapToIcon(Icon);
  buffer := PChar(Hint);
  StrCopy(@tnid.szTip, buffer);


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


Re: [lazarus] System information

2006-03-05 Thread Panagiotis Sidiropoulos
What I learned working with Linux is that codepage cannot be anything
else but utf, am I wrong?

Panagiotis

Στις 05-03-2006, ημέρα Κυρ, και ώρα 22:32 +0100, ο/η darekM έγραψε:
 Hi
   How to obtain current codepage (UTF, 8859-?) under Linux
 
 
 Darek
 
 _
  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] delphi-lazarus Pointer vs. TObject

2006-03-05 Thread Vincent Snijders

Friedrich Hattendorf wrote:

Still trying to convert a delphi-Program to lazarus

I declared


type
  TListenStruktur = class (TObject)
private
  hListe: TList;
  AktuellePosition: Integer;
...

and a function

function TListenStruktur.GetElement: TObject;
begin
  if not IsEmpty then
GetElement := hListe.Items[AktuellePosition]
end;


in delphi: no problems
in lazarus: Error: Incompatible types: got Pointer expected TObject

is there a general Problem or is it only too lat to wriet programs ;-)
 


Use a type cast: it looks like what is described under You must 
typecast pointers to actual type when using with var or function of that 
type in 
http://wiki.lazarus.freepascal.org/index.php/Code_Conversion_Guide#Syntax_differences


Vincent

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


Re: [lazarus] Icon property of TTrayicon in win32 patch

2006-03-05 Thread Felipe Monteiro de Carvalho
On 3/5/06, Christian U. [EMAIL PROTECTED] wrote:
 1. a real TIcon will never be implemented becouse no os than win32 supports
 icons

I think this isn´t true. Qt supports icons, there is even a QIcon Qt
object, and Mac OS loves icons.

This is not a reason not to implement TIcon. The ideal world, probably
impossible, is that the LCL Interface will deal with whatever
incompatibilities and make everything work on all platforms.

 maybe someone can nclude those code in ticon to generate the handle
 there ...

Yes, this is what I was going to propose next. We can have a getter
funtion for TIcon.Handle and on windows this getter function converts
from HBITMAP to HICON. Probably there are more very elegant fixes, but
sure it is quick and could mean that finally TIcon is finished (or
something else is missing?)!!

 2. all changes in this patch goes to wswin32trayicon or i need glasses ...

Ops sorry ^_^

I had a file named trayicon.diff of a patch I created on my computer
and I was looking at this one

Thanks a lot for the patch. My position is that this should go to
TIcon, thought the final word isn´t mine.

sorry again for my confusion,
--
Felipe Monteiro de Carvalho

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


[lazarus] Second Windows CE Patch

2006-03-05 Thread Felipe Monteiro de Carvalho

Hello,

This patch implements very basically:

TApplication
TCustomWindow
TCustomButton

There are also 2 new files that need to be added to the widgetset.

Here is a nice screenshot of Lazarus+WinCE =) : 
http://wiki.lazarus.freepascal.org/index.php/Image:Second_laz_wince.PNG


thanks a lot,

Felipe Monteiro de Carvalho

Index: lcl/interfaces/wince/winceint.pp
===
--- lcl/interfaces/wince/winceint.pp(revision 8863)
+++ lcl/interfaces/wince/winceint.pp(working copy)
@@ -22,11 +22,11 @@
  *
 }
 
-Unit WinCEInt;
+unit WinCEInt;
 
 {$mode objfpc}{$H+}
 
-Interface
+interface
 
 {$IFDEF Trace}
 {$ASSERTIONS ON}
@@ -40,22 +40,22 @@
   When editing this unit list, be sure to keep Windows listed first to ensure
   successful compilation.
 }
-Uses
+uses
   Types, Classes, ComCtrls, Controls, Buttons, Dialogs, ExtCtrls, Forms,
   GraphMath, GraphType, InterfaceBase, LCLIntf, LCLType,
   LMessages, StdCtrls, SysUtils, Graphics, Menus, Windows;
 
-Type
+type
   { WinCE interface-object class }
 
   { TWinCEWidgetSet }
 
-  TWinCEWidgetSet = Class(TWidgetSet)
-  Public
+  TWinCEWidgetSet = class(TWidgetSet)
+  public
 { Constructor of the class }
-Constructor Create;
+constructor Create;
 { Destructor of the class }
-Destructor Destroy; Override;
+destructor Destroy; override;
 { Initialize the API }
 procedure AppInit(var ScreenInfo: TScreenInfo); override;
 procedure AppMinimize; override;
@@ -66,9 +66,10 @@
 procedure SetDesigning(AComponent: TComponent); override;
 procedure AppProcessMessages; override;
 procedure AppWaitMessage; override;
-Procedure AppTerminate; Override;
-Function  InitHintFont(HintFont: TObject): Boolean; Override;
-Procedure AttachMenuToWindow(AMenuObject: TComponent); Override;
+Procedure AppTerminate; override;
+Function  InitHintFont(HintFont: TObject): Boolean; override;
+Procedure AttachMenuToWindow(AMenuObject: TComponent); override;
+procedure AppRun(const ALoop: TApplicationMainLoop); override;
 
 // create and destroy
 function CreateComponent(Sender : TObject): THandle; override;
@@ -77,12 +78,28 @@
 
 {$I wincewinapih.inc}
 {$I wincelclintfh.inc}
-  End;
+  end;
 
 
-Implementation
+const
+  BOOL_RESULT: Array[Boolean] Of String = ('False', 'True');
+  ClsName: array[0..6] of WideChar = ('W','i','n','d','o','w',#0);
+//  EditClsName: array[0..4] of WideChar = 'Edit'#0;
+  ButtonClsName: array[0..6] of WideChar = ('B','U','T','T','O','N',#0);
+//  ComboboxClsName: array[0..8] of WideChar = 'ComboBox'#0;
+//  TabControlClsName: array[0..15] of WideChar = 'SysTabControl32'#0;
 
-Uses
+{ export for widgetset implementation }
+
+function WindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
+LParam: Windows.LParam): LResult; stdcall;
+
+var
+  WinCEWidgetSet: TWinCEWidgetSet;
+
+implementation
+
+uses
 
 // I M P O R T A N T
 
@@ -91,7 +108,7 @@
 
 // WinCEWSActnList,
 // WinCEWSArrow,
-// WinCEWSButtons,
+ WinCEWSButtons,
 // WinCEWSCalendar,
 // WinCEWSCheckLst,
 // WinCEWSCListBox,
@@ -105,7 +122,7 @@
 // WinCEWSExtCtrls,
 // WinCEWSExtDlgs,
 // WinCEWSFileCtrl,
-// WinCEWSForms,
+ WinCEWSForms,
 // WinCEWSGrids,
 // WinCEWSImgList,
 // WinCEWSMaskEdit,
@@ -117,6 +134,7 @@
 
   LCLProc;
 
+{$I wincecallback.inc}
 {$I winceobject.inc}
 {$I wincewinapi.inc}
 {$I wincelclintf.inc}
Index: lcl/interfaces/wince/winceobject.inc
===
--- lcl/interfaces/wince/winceobject.inc(revision 8863)
+++ lcl/interfaces/wince/winceobject.inc(working copy)
@@ -37,17 +37,48 @@
 begin
   Inherited Create;
 
+  WinCEWidgetSet := Self;
 end;
 
 destructor TWinCEWidgetSet.Destroy;
 begin
+  WinCEWidgetSet := nil;
 
   inherited Destroy;
 end;
 
 procedure TWinCEWidgetSet.AppInit(var ScreenInfo: TScreenInfo);
+var
+  WindowClass: WndClass;
 begin
+  {$ifdef VerboseWinCE}
+  WriteLn('TWinCEWidgetSet.AppInit');
+  {$endif}
 
+  FillChar(WindowClass, SizeOf(WindowClass), #0);
+
+  with WindowClass do
+  begin
+Style := CS_HREDRAW or CS_VREDRAW;
+LPFnWndProc := @WindowProc;
+CbClsExtra := 0;
+CbWndExtra := 0;
+hInstance := System.HInstance;
+hIcon := Windows.LoadIcon(System.hInstance, nil);
+hCursor := LoadCursor(0, IDC_ARROW);
+hbrBackground := GetSysColorBrush(Color_BtnFace);
+LPSzMenuName := nil;
+LPSzClassName := @ClsName;
+  end;
+  if Windows.RegisterClass(@WindowClass) = 0 then WriteLn('Register failed');
+
+  // initialize ScreenInfo
+{  Handle := GetDesktopWindow;
+  DC := Windows.GetDC(Handle);
+  ScreenInfo.PixelsPerInchX := 

Re: [lazarus] delphi-lazarus Pointer vs. TObject

2006-03-05 Thread Christian U.

type
 TListenStruktur = class (TObject)
   private
 hListe: TList;
 AktuellePosition: Integer;
...

and a function

function TListenStruktur.GetElement: TObject;
begin
 if not IsEmpty then
   GetElement := hListe.Items[AktuellePosition]
end;


hListe.Items^[AktuellePosition]

ist richtiger, Delphi findet selbst heraus ob n Zeiger oder Objekt benötigt 
wird.
FPC ist da etwas genauer :) 


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


Re: [lazarus] turboCASH on Lazarus proof of concept

2006-03-05 Thread Florian Klaempfl
Felipe Monteiro de Carvalho wrote:

Just to keep you informed: Mattias and me are working on that proof of concept.

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


[lazarus] Mozilla Plugin Panel component

2006-03-05 Thread Graeme Geldenhuys
Hi,

I developed a panel component that allows you to use Mozilla plugins
inside the panel.  The panel fools the plugin, to think it is running
inside the Mozilla browser.  I primarily developed it to allow us to
play Macromedia Flash files inside our product, but it works with the
Adobe PDF plugin as well. I am sure other plugins could be added as
well.

So far it is only working under Windows,  I haven't managed to get it
to work under Linux, which is the other platform I need it to work
under.  I am willing to release it as opensource and part of Lazarus
in exchange for some help in completing it.

Would the Lazarus community be interested in such a component?

The status and problem so far:
Under Windows it is able to do the basic functions with flash files:
play, rewind, stop, etc  I need more functionality though.  I need
to be able to call the other Flash Plugin functions exported. eg:
Return a Variable Value from flash. Goto a specific frame, Query the
number of frames in the flash file, etc.

Problem in more detail:
I call the GetProcAddress using the proc name exported. I then call
the function and get a access violation.  When I run it through gdb,
it shows I am getting the address for the correct function, but when I
call the function, it says I am trying to call a different function,
and throws the access violation.

Regards,
  - Graeme -

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