Re: [Lazarus] Working on big units

2015-10-21 Thread Philippe Lévi
If I don't want to split it in different units I split it in "logical" parts in 
files and use {$I ...}


but with several classes .. it looks like splitting classes in different units 
should be a way to make it easier!


De: Aradeonas 
Enviado: quarta-feira, 21 de outubro de 2015 16:45
Para: lazarus@lists.lazarus.freepascal.org
Assunto: [Lazarus] Working on big units

Hi,

I Just work on one of my units with about 10,000 line of code that have 7 class 
and it makes me crazy moving in it and adding procedure or editing and 
sometimes I get lost that where am I. Just want to ask you how you work with 
big units? how you move,browse and edit?

Regards,
Ara


--
http://www.fastmail.com - Same, same, but different...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Play video from memory

2015-03-06 Thread Philippe Lévi
xwininfo ... linux ! ...


I need a solution for windows ...


I tried

whndl := WindowFromDC(wglGetCurrentDC())

but MPLAYER does not seem to like it, either in decimal format or hex format ...


and I do not know how to check if I get the resquested value  ... the handle of 
the window launched by glutCreateWindow ...




De: aradeonas aradeo...@operamail.com
Enviado: sexta-feira, 6 de março de 2015 12:58
Para: lazarus@lists.lazarus.freepascal.org
Assunto: Re: [Lazarus] Play video from memory

Leonardo,

Im not familiar with Mplayer but take a look at here:
http://wiki.freepascal.org/TMPlayerControl
And in MPlayerCtrl unit line 665 it just pass handle.

Do you have opinion about how to pass memory stream?

Regards,
Ara

On Fri, Mar 6, 2015, at 07:41 AM, Leonardo M. Ramé wrote:
 To embed mplayer into a window you must know its ID. Window IDs have a
 relation with the WindowHandle, but that value must be somehow
 translated to be understood by X11 (or Windows). I don't know how to
 translate it :(.

 For example, If I use Format('%x', [Self.WindowHandle]) I get the Hex
 value BB5380, then, using the wininfo tool I can get the ID. Just run
 xwininfo and click on the window you want to embed mplayer into.

 In my example I got:

 xwininfo: Window id: 0x2800048 BB5380

 Absolute upper-left X: 662
 Absolute upper-left Y: 270
 Relative upper-left X: 1
 Relative upper-left Y: 24
 Width: 320
 Height: 240
 Depth: 24
 Visual: 0x20
 Visual Class: TrueColor
 Border width: 0
 Class: InputOutput
 Colormap: 0x22 (installed)
 Bit Gravity State: NorthWestGravity
 Window Gravity State: NorthWestGravity
 Backing Store State: NotUseful
 Save Under State: no
 Map State: IsViewable
 Override Redirect State: no
 Corners: +662+270 -1744+270 -1744-258 +662-258
 -geometry 320x240+661+246

 As you can see, the first line displays the same Hex number I get from
 Lazarus, and 0x2800048, this is the value mplayer expects.

 So, to embed a movie into a window, when you know the window Id, you
 just launch mplayer using this options:

 mplayer -wid 0x2800048
 /home/leonardo/Imágenes/Fotos/2009/11/21/mvi_0260.avi

 Please, if any you know how to translate BB5380 to 0x2800048 I'll be
 glad to learn.

 El 05/03/15 a las 18:51, Philippe Lévi escibió:
  and you know how to tell MPLAYER to show the video in a specific window? 
  (using WINDOWS, and glutCreateWindow).
 
  thanks
  Philippe
 
  
  De: Leonardo M. Ramé l.r...@griensu.com
  Enviado: quinta-feira, 5 de março de 2015 17:44
  Para: lazarus@lists.lazarus.freepascal.org
  Assunto: Re: [Lazarus] Play video from memory
 
  Yes, you can!.
 
  1) Load your Video to a TStream (TMemoryStream for example).
  2) Use TProcess to execute mplayer -, the - is the parameter.
  3) Send your stream to the standard input of the process.
 
 
  El 05/03/15 a las 16:45, aradeonas escibió:
  Thank you Leonardo,
 
  I saw it before but it doesn't seem there is a way to pass memory to it
  or I couldn't find out how.
  Do you know?
 
  Regards,
  Ara
 
  On Thu, Mar 5, 2015, at 11:40 AM, Leonardo M. Ramé wrote:
  It looks like MPlayer can do this:
  http://www.mplayerhq.hu/DOCS/HTML/en/streaming.html
 
  El 04/03/15 a las 13:29, aradeonas escibió:
  Hi,
 
  Any one know a library or way to buffer video file into memory and then
  pass it to player?
  Any simple player do the job but it should support a way to open file
  from memory.
 
  Regards,
  Ara
 
  --
  ___
  Lazarus mailing list
  Lazarus@lists.lazarus.freepascal.org
  http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
 
  --
  ___
  Lazarus mailing list
  Lazarus@lists.lazarus.freepascal.org
  http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
 
  --
  ___
  Lazarus mailing list
  Lazarus@lists.lazarus.freepascal.org
  http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
http://www.fastmail.com - Email service worth paying for. Try it for free

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Play video from memory

2015-03-05 Thread Philippe Lévi
and you know how to tell MPLAYER to show the video in a specific window? (using 
WINDOWS, and glutCreateWindow).

thanks
Philippe


De: Leonardo M. Ramé l.r...@griensu.com
Enviado: quinta-feira, 5 de março de 2015 17:44
Para: lazarus@lists.lazarus.freepascal.org
Assunto: Re: [Lazarus] Play video from memory

Yes, you can!.

1) Load your Video to a TStream (TMemoryStream for example).
2) Use TProcess to execute mplayer -, the - is the parameter.
3) Send your stream to the standard input of the process.


El 05/03/15 a las 16:45, aradeonas escibió:
 Thank you Leonardo,

 I saw it before but it doesn't seem there is a way to pass memory to it
 or I couldn't find out how.
 Do you know?

 Regards,
 Ara

 On Thu, Mar 5, 2015, at 11:40 AM, Leonardo M. Ramé wrote:
 It looks like MPlayer can do this:
 http://www.mplayerhq.hu/DOCS/HTML/en/streaming.html

 El 04/03/15 a las 13:29, aradeonas escibió:
 Hi,

 Any one know a library or way to buffer video file into memory and then
 pass it to player?
 Any simple player do the job but it should support a way to open file
 from memory.

 Regards,
 Ara


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] android

2015-03-04 Thread Philippe Lévi
I am trying to follow http://wiki.freepascal.org/Android_tutorial


Which seems to be a bit obsolete ... but should work!


in

Compile the demo androidlcl

when doing

Now Run  Compile this will generate this library : 
C:\Android\Projects\androidlcl\android\libs\armeabi\liblclapp.so [5.073 kb]


I get


C:\android\laz4android\fpc\2.7.1\bin\i386-win32\arm-linux-androideabi-ld.exe: 
C:\Android\android-ndk-r9\platforms\android-8\arch-arm\usr\lib\crtbegin_so.o: 
Unknown mandatory EABI object attribute 44
C:\android\laz4android\fpc\2.7.1\bin\i386-win32\arm-linux-androideabi-ld.exe: 
failed to merge target specific data of file 
C:\Android\android-ndk-r9\platforms\android-8\arch-arm\usr\lib\crtbegin_so.o
C:\android\laz4android\fpc\2.7.1\bin\i386-win32\arm-linux-androideabi-ld.exe: 
C:\Android\android-ndk-r9\platforms\android-8\arch-arm\usr\lib\crtend_so.o: 
Unknown mandatory EABI object attribute 44
C:\android\laz4android\fpc\2.7.1\bin\i386-win32\arm-linux-androideabi-ld.exe: 
failed to merge target specific data of file 
C:\Android\android-ndk-r9\platforms\android-8\arch-arm\usr\lib\crtend_so.o
androidlcltest.lpr(24,36) Error: Error while linking


I'll appreciate any suggestion

Philippe
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Guide: Making Free Pascal and Lazarus from sources

2015-02-08 Thread Philippe Lévi
that is something I was looking for ! ... and the way I like it ... as it is 
the way need!!!


may be need some adjustment here (missing word):

Download the and unpack the required tools listed below. You can place them 
wherever you want, but for this guide we'll be using


Thanks a lot!

Philippe


De: Anthony Walter sys...@gmail.com
Enviado: domingo, 8 de fevereiro de 2015 07:15
Para: Lazarus mailing list
Assunto: [Lazarus] Guide: Making Free Pascal and Lazarus from sources

In an effort to be as open as possible, I've written up a Making it Yourself 
guide for to help anyone make test versions of Free Pascal 3.0 and Lazarus 1.4. 
The guide is available for those who want to use the most current versions of 
Free Pascal and Lazarus, but would prefer to obtain copies from the official 
subversion repository code, rather than trust pre-bundled binaries provided by 
third parties.

http://www.getlazarus.org/setup/making/

Enjoy
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Editor StrinGrid ...

2015-01-26 Thread philippe levi
Portuguese version of Lazarus ... small detail ... in the title of the
editor of TStringList appears StrinGrid ... missing g



---
Este email foi escaneado pelo Avast antivírus.
http://www.avast.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TMPlayerControl

2015-01-06 Thread Philippe
 

Em 05.01.2015 23:28, Michael Thompson escreveu: 

 G'day, 
 

-fs does not appear in parameters list ... correct? 
 
 Correct. -fs
does not appear when I call mplayer -input cmdlist. 
 
 I note it
does appear in the following page though: 

http://mplayerhq.hu/DOCS/man/en/mplayer.1.html#GENERAL%20OPTIONS [1] 


 Maybe they're more diligent on updating the web than the cmdlist? 


 I also note there is a get_vo_fullscreen property in the mplayer
-input cmdlist output, which implies a set_vo_fullscreen (though none
is listed) 
 
 And finally I note there's a caveat on the webpage
saying -fs doesn't work with all video drivers... 
 
 Using MPlayer on
Windows, despite no -fs appearing in the above, I can still play video
in full screen passing the -fs parameter. Which means this *should* work
in the Lazarus TMplayerControl control by simply adding -fs to
StartParam. 
 
 How this works in reality though I'm unsure :-) If you
get a chance to experiment, I'd love to know the results. From the
documentation I've found so far, I'm unsure how to toggle FullScreen,
and how to determine which monitor gets the video... 
 
 I also
suspect this conversation is going to veer more into the mplayer arena
than the Lazarus arena, so I'm happy for this continue as a personal
email chain (just reply to me, not to Lazarus). I'll update the wiki
with the outcome 
 
 http://wiki.freepascal.org/TMPlayerControl [2] 


 Mike

 May be I did not expressed me very well ...
 fs does not
appear in http://wiki.freepascal.org/TMPlayerControl And my question
is still about TMPlayerControl, not with MPlayer ... Using
lazaruscomponentsmplayerexamplesFullFeaturedmplay

 quote
 solid;
margin-left:5px; width:100%Philippe
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailma

 

 





Links:
--
[1]
http://mplayerhq.hu/DOCS/man/en/mplayer.1.html#GENERAL%20OPTIONS
[2]
http://wiki.freepascal.org/TMPlayerControl
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TMPlayerControl

2015-01-06 Thread Philippe
 

Em 06.01.2015 11:35, Michael Thompson escreveu: 

 On 6 January
2015 at 17:48, Philippe phili...@quarta.com.br wrote: 
 
 fs does
not appear in http://wiki.freepascal.org/TMPlayerControl [1] 
 

Correct. -fs is an input parameter to mplayer. These aren't explicitly
covered in the wiki as mplayer documentation covers them elsewhere. 


 And my question is still about TMPlayerControl, not with MPlayer
... 
 
 Well, TMPlayerControl is only a thin wrapper over mplayer, so
there's significant overlap. 
 
 However, to be clear TMPlayerControl
does not support fullscreen. I've now confirmed your results, and simply
adding -fs to StartParam is not sufficient. 
 
 If you're interested,
it looks like the issue is down to the -wid parameter (which sets the
display window handle). If I comment out the two -wid lines in
MPlayerCtrl.pas (line 665, 666), and insert -fs instead, then fullscreen
works. 
 
 No easy workaround available I'm afraid. Looks like a code
change in MPlayerCtrl is required implementing a .FullScreen property.
However, I still can't see how we'd toggle fullscreen, I can only see
how to either start in FullScreen or in a Window. And that caveat from
the mplayer documentation would still hold - not all drivers are
supported. 
 
 Patches welcome :-) 
 
 Mike

 I'll comment the 2
lines ... and it should be enough for me!
 thanks a lot Philippe


--
___
Lazarus mailing
list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[2]

 

 

 


Links:
--
[1]
http://wiki.freepascal.org/TMPlayerControl
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TMPlayerControl

2015-01-05 Thread Philippe
 

Em 05.01.2015 20:58, Michael Thompson escreveu: 

 G'day, 
 
 On
5 January 2015 at 23:24, Philippe phili...@quarta.com.br wrote:
 

someone may confirm: 
 
 TMPlayerControl does not allow fullscreen
option.
 
 When I extended the control last year I did not test full
screen - in fact I didn't even consider it. So long as MPlayer supports
this though, I can't see that there should be a problem. I will play
with this later today and get back to you. 
 
 Are you on Linux or
Windows? Short term, I'll only have Windows to test on... 
 
 Mike


Windows.
 -fs does not appear in parameters list ... correct?


--
___
Lazarus mailing
list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/list


 
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] TMPlayerControl

2015-01-05 Thread Philippe
 

someone may confirm: 

TMPlayerControl does not allow fullscreen
option. 

Philippe --
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] font.name=default

2014-08-25 Thread Philippe
 

nice. I´ll try it. 

(my recursive procedure worked well, not a big
deal!). 

I had some difficulty to find informations about controls,
components ... if you about them you can find the reference ... but it
does not help much! ... any hint? 

P. 

Em 24.08.2014 21:48, Hans-Peter
Diettrich escreveu: 

 Philippe schrieb:
 
 just for information ...
I tried to use your suggestion ... it works ... but ... I am using
TGroupBox in TGroupBox in TGroupBox ... your example just loops on the
top level controls of the form ... needing to use recursive function to
go through contained group boxes ... what I´ll do later.
 
 Then use
Components[] instead of Controls[].
 
 DoDi
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] font.name=default

2014-08-25 Thread Philippe
 

thank you for these informations ... it helps! 

Philippe 

Em
25.08.2014 11:02, Hans-Peter Diettrich escreveu: 

 Philippe schrieb:


 nice. I´ll try it. (my recursive procedure worked well, not a big
deal!).
 
 That's what I use, too, sometimes :-)
 
 I had some
difficulty to find informations about controls, components ... if you
about them you can find the reference ... but it does not help much! ...
any hint?
 
 I only know from Delphi that obj.Components contains all
components 
 owned by obj, while obj.Controls contains the child
controls of obj, 
 whose Parent is obj. A TForm typically owns all its
contained components 
 (flat view), while nested (visual) controls
reside in their Parent 
 TWinControl (tree view).
 
 DoDi
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] font.name=default

2014-08-24 Thread Philippe
 

just for information ... 

I tried to use your suggestion ... it
works ... but ... I am using TGroupBox in TGroupBox in TGroupBox ...


your example just loops on the top level controls of the form ...
needing to use recursive function to go through contained group boxes
... what I´ll do later. 

Philippe 

Em 22.08.2014 10:26, Salvatore
Coppola escreveu: 

 You can choose the controls you want this way 


 var i: integer; 
 begin 
 for i:=0 to ControlCount-1 do 
 if
Controls[i] is TButton then 
 ShowMessage(Controls[i].Name); 
 end; 

Ciao 
 
 2014-08-21 13:09 GMT+02:00 Philippe
phili...@quarta.com.br:
 
 I wrote about a suggestion ... a Lazarus
default font ... 
 
 may be, as far as I understand, using Parent
Font property is the way ... I´ll try it! 
 
 Philippe 
 
 Em
20.08.2014 19:54, Philippe escreveu: 
 
 thank for your answer.

 
 I found the default font on my machine/windows 8 is Segoe UI.
I´ll check if it is avalaible under other version of Windows ... 


 your suggestion (looping controls) is interesting, I didn´t know
it, but will change all the controls of the form ... and that is not
what I need ... I just want to change the Lazarus default. So it will
change the font of controls using font.name [1]='Default' in the
configuration/object inspector. 
 
 Philippe 
 
 Em
20.08.2014 12:58, Salvatore Coppola escreveu: 
 
 2014-08-16
12:40 GMT+02:00 Philippe phili...@quarta.com.br:
 
 I wrote a
program, used font.name [1]=default for allmost everything ... it was
looking as Arial font. Fine. 
 
 It was on a Windows 8
machine. 
 
 Then I copied the program to a Windows XP machine
to check. 
 
 Where static text and others are written with
something looking as a New Times Roman ...
 and sometimes not
fitting in the field width ... and be splitted! 
 
 I
undestood there is something about windows default font. Googled ... ...
... 
 
 On the my W8 machine default font (from registers) are
Microsoft Sans Serif and Tahoma ... diferent. 
 
 I made a
test. In the attached image, the first text is with default, the second
with Arial, both with bold mode. Arial was the closest font from default
I found ... but still a bit diferent. 
 
 Question 1): which
default font is used with Lazarus ?
 
 the theme fonts 


 Question 2): is there a way I can set the default font in
Lazarus?
 
 I don't know if is possible in RAD way, but you can
set the font you want in on create event for each controls you want.

 
 procedure TForm1.FormCreate(Sender: TObject); 
 var i:
integer; 
 begin 
 for i:=0 to ControlCount-1 do 

Controls[i].Font:=YOURFONT; 
 end; 
 
 Thank for your help

 
 Philippe 
 
 PS. F1 in
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]


 --
 ___
 Lazarus
mailing list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[3]
http://webmail.quarta.com.br/div

gt;nbsp;lto:Lazarus@lists.lazarus.freepascal.orgquot;gt;Lazarus@lists.lazarus.freepascal.org
gt;nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarusnbsp;[2]
gt;nbsp;
gt;nbsp;--nbsp;___nbsp;Lazarusnbsp;mailingnbsp;listnbsp;Lazarus@lists.lazarus.freepascal.org
/divepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] font.name=default

2014-08-22 Thread Philippe
 

nice. it may help some day! 

I already made the changes using
parent font and so one ... a bit work! ... but it is done and it has
been usefull to check a all the user´s interface !!! 

thanks 

Philippe


Em 22.08.2014 10:26, Salvatore Coppola escreveu: 

 You can choose
the controls you want this way 
 
 var i: integer; 
 begin 
 for
i:=0 to ControlCount-1 do 
 if Controls[i] is TButton then 

ShowMessage(Controls[i].Name); 
 end; 
 Ciao 
 
 2014-08-21 13:09
GMT+02:00 Philippe phili...@quarta.com.br:
 
 I wrote about a
suggestion ... a Lazarus default font ... 
 
 may be, as far as I
understand, using Parent Font property is the way ... I´ll try it! 


 Philippe 
 
 Em 20.08.2014 19:54, Philippe escreveu: 
 

thank for your answer. 
 
 I found the default font on my
machine/windows 8 is Segoe UI. I´ll check if it is avalaible under other
version of Windows ... 
 
 your suggestion (looping controls) is
interesting, I didn´t know it, but will change all the controls of the
form ... and that is not what I need ... I just want to change the
Lazarus default. So it will change the font of controls using font.name
[1]='Default' in the configuration/object inspector. 
 
 Philippe

 
 Em 20.08.2014 12:58, Salvatore Coppola escreveu: 
 

2014-08-16 12:40 GMT+02:00 Philippe phili...@quarta.com.br:


 I wrote a program, used font.name [1]=default for allmost
everything ... it was looking as Arial font. Fine. 
 
 It was
on a Windows 8 machine. 
 
 Then I copied the program to a
Windows XP machine to check. 
 
 Where static text and others
are written with something looking as a New Times Roman ...
 and
sometimes not fitting in the field width ... and be splitted! 


 I undestood there is something about windows default font.
Googled ... ... ... 
 
 On the my W8 machine default font
(from registers) are Microsoft Sans Serif and Tahoma ... diferent.

 
 I made a test. In the attached image, the first text is
with default, the second with Arial, both with bold mode. Arial was the
closest font from default I found ... but still a bit diferent. 


 Question 1): which default font is used with Lazarus ?
 

the theme fonts 
 
 Question 2): is there a way I can set the
default font in Lazarus?
 
 I don't know if is possible in RAD
way, but you can set the font you want in on create event for each
controls you want. 
 
 procedure TForm1.FormCreate(Sender:
TObject); 
 var i: integer; 
 begin 
 for i:=0 to
ControlCount-1 do 
 Controls[i].Font:=YOURFONT; 
 end; 


 Thank for your help 
 
 Philippe 
 
 PS. F1 in
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]


 --
 ___
 Lazarus
mailing list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[3]
http://webmail.quarta.com.br/div

gt;nbsp;lto:Lazarus@lists.lazarus.freepascal.orgquot;gt;Lazarus@lists.lazarus.freepascal.org
gt;nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarusnbsp;[2]
gt;nbsp;
gt;nbsp;--nbsp;___nbsp;Lazarusnbsp;mailingnbsp;listnbsp;Lazarus@lists.lazarus.freepascal.org
/divepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] font.name=default

2014-08-21 Thread Philippe
 

I wrote about a suggestion ... a Lazarus default font ... 

may be,
as far as I understand, using Parent Font property is the way ... I´ll
try it! 

Philippe 

Em 20.08.2014 19:54, Philippe escreveu: 

 thank
for your answer. 
 
 I found the default font on my machine/windows 8
is Segoe UI. I´ll check if it is avalaible under other version of
Windows ... 
 
 your suggestion (looping controls) is interesting, I
didn´t know it, but will change all the controls of the form ... and
that is not what I need ... I just want to change the Lazarus default.
So it will change the font of controls using font.name='Default' in the
configuration/object inspector. 
 
 Philippe 
 
 Em 20.08.2014
12:58, Salvatore Coppola escreveu: 
 
 2014-08-16 12:40 GMT+02:00
Philippe phili...@quarta.com.br:
 
 I wrote a program, used
font.name [1]=default for allmost everything ... it was looking as Arial
font. Fine. 
 
 It was on a Windows 8 machine. 
 
 Then I
copied the program to a Windows XP machine to check. 
 
 Where
static text and others are written with something looking as a New Times
Roman ...
 and sometimes not fitting in the field width ... and be
splitted! 
 
 I undestood there is something about windows default
font. Googled ... ... ... 
 
 On the my W8 machine default font
(from registers) are Microsoft Sans Serif and Tahoma ... diferent. 


 I made a test. In the attached image, the first text is with
default, the second with Arial, both with bold mode. Arial was the
closest font from default I found ... but still a bit diferent. 


 Question 1): which default font is used with Lazarus ?
 
 the
theme fonts 
 
 Question 2): is there a way I can set the default
font in Lazarus?
 
 I don't know if is possible in RAD way, but you
can set the font you want in on create event for each controls you want.

 
 procedure TForm1.FormCreate(Sender: TObject); 
 var i:
integer; 
 begin 
 for i:=0 to ControlCount-1 do 

Controls[i].Font:=YOURFONT; 
 end; 
 
 Thank for your help 
 

Philippe 
 
 PS. F1 in
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[3]
http://webmail.quarta.com.br/div

gt;nbsp;:Lazarus@lists.lazarus.freepascal.orgquot;gt;Lazarus@lists.lazarus.freepascal.org
gt;nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarusnbsp;[2]
gt;nbsp;
gt;nbsp;--nbsp;___nbsp;Lazarusnbsp;mailingnbsp;listnbsp;Lazarus@lists.lazarus.freepascal.org
/divscal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] font.name=default

2014-08-20 Thread Philippe
 

thank for your answer. 

I found the default font on my
machine/windows 8 is Segoe UI. I´ll check if it is avalaible under other
version of Windows ... 

your suggestion (looping controls) is
interesting, I didn´t know it, but will change all the controls of the
form ... and that is not what I need ... I just want to change the
Lazarus default. So it will change the font of controls using
font.name='Default' in the configuration/object inspector. 

Philippe


Em 20.08.2014 12:58, Salvatore Coppola escreveu: 

 2014-08-16 12:40
GMT+02:00 Philippe phili...@quarta.com.br:
 
 I wrote a program,
used font.name [1]=default for allmost everything ... it was looking as
Arial font. Fine. 
 
 It was on a Windows 8 machine. 
 
 Then I
copied the program to a Windows XP machine to check. 
 
 Where
static text and others are written with something looking as a New Times
Roman ...
 and sometimes not fitting in the field width ... and be
splitted! 
 
 I undestood there is something about windows default
font. Googled ... ... ... 
 
 On the my W8 machine default font
(from registers) are Microsoft Sans Serif and Tahoma ... diferent. 


 I made a test. In the attached image, the first text is with
default, the second with Arial, both with bold mode. Arial was the
closest font from default I found ... but still a bit diferent. 
 

Question 1): which default font is used with Lazarus ?
 
 the theme
fonts 
 
 Question 2): is there a way I can set the default font in
Lazarus?
 
 I don't know if is possible in RAD way, but you can set
the font you want in on create event for each controls you want. 
 

procedure TForm1.FormCreate(Sender: TObject); 
 var i: integer; 

begin 
 for i:=0 to ControlCount-1 do 
 Controls[i].Font:=YOURFONT; 

end; 
 
 Thank for your help 
 
 Philippe 
 
 PS. F1 in
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]




Links:
--
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[3]
http://webmail.quarta.com.br/div

gt;nbsp;lto:Lazarus@lists.lazarus.freepascal.orgquot;gt;Lazarus@lists.lazarus.freepascal.org
gt;nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarusnbsp;[2]
gt;nbsp;
gt;nbsp;--nbsp;___nbsp;Lazarusnbsp;mailingnbsp;listnbsp;Lazarus@lists.lazarus.freepascal.org
/divepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] font.name=default

2014-08-20 Thread Philippe
 

default for font.name does not sound very clear for me. I thought
it was a Lazarus default. 

may be a suggestion: using OS default ...


and it should be nice to be able to use a Lazarus default which
could be configurated ... 

especialy when developing for a unique OS
... 

Philippe 

Em 20.08.2014 19:54, Philippe escreveu: 

 thank for
your answer. 
 
 I found the default font on my machine/windows 8 is
Segoe UI. I´ll check if it is avalaible under other version of Windows
... 
 
 your suggestion (looping controls) is interesting, I didn´t
know it, but will change all the controls of the form ... and that is
not what I need ... I just want to change the Lazarus default. So it
will change the font of controls using font.name='Default' in the
configuration/object inspector. 
 
 Philippe 
 
 Em 20.08.2014
12:58, Salvatore Coppola escreveu: 
 
 2014-08-16 12:40 GMT+02:00
Philippe phili...@quarta.com.br:
 
 I wrote a program, used
font.name [1]=default for allmost everything ... it was looking as Arial
font. Fine. 
 
 It was on a Windows 8 machine. 
 
 Then I
copied the program to a Windows XP machine to check. 
 
 Where
static text and others are written with something looking as a New Times
Roman ...
 and sometimes not fitting in the field width ... and be
splitted! 
 
 I undestood there is something about windows default
font. Googled ... ... ... 
 
 On the my W8 machine default font
(from registers) are Microsoft Sans Serif and Tahoma ... diferent. 


 I made a test. In the attached image, the first text is with
default, the second with Arial, both with bold mode. Arial was the
closest font from default I found ... but still a bit diferent. 


 Question 1): which default font is used with Lazarus ?
 
 the
theme fonts 
 
 Question 2): is there a way I can set the default
font in Lazarus?
 
 I don't know if is possible in RAD way, but you
can set the font you want in on create event for each controls you want.

 
 procedure TForm1.FormCreate(Sender: TObject); 
 var i:
integer; 
 begin 
 for i:=0 to ControlCount-1 do 

Controls[i].Font:=YOURFONT; 
 end; 
 
 Thank for your help 
 

Philippe 
 
 PS. F1 in
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[3]
http://webmail.quarta.com.br/div

gt;nbsp;:Lazarus@lists.lazarus.freepascal.orgquot;gt;Lazarus@lists.lazarus.freepascal.org
gt;nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarusnbsp;[2]
gt;nbsp;
gt;nbsp;--nbsp;___nbsp;Lazarusnbsp;mailingnbsp;listnbsp;Lazarus@lists.lazarus.freepascal.org
/divscal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] font.name=default

2014-08-16 Thread Philippe
 

I wrote a program, used font.name=default for allmost everything ...
it was looking as Arial font. Fine. 

It was on a Windows 8 machine.


Then I copied the program to a Windows XP machine to check. 

Where
static text and others are written with something looking as a New Times
Roman ...
 and sometimes not fitting in the field width ... and be
splitted! 

I undestood there is something about windows default font.
Googled ... ... ... 

On the my W8 machine default font (from registers)
are Microsoft Sans Serif and Tahoma ... diferent. 

I made a test. In
the attached image, the first text is with default, the second with
Arial, both with bold mode. Arial was the closest font from default I
found ... but still a bit diferent. 

Question 1): which default font is
used with Lazarus ? 

Question 2): is there a way I can set the default
font in Lazarus? 

Thank for your help 

Philippe 

PS. F1 in font.name
... error 404. 

default font test.png
Description: Binary data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] formatfloat negative zero (-0)

2014-07-07 Thread Philippe
 

if (Result'') and (Result[1]='-1') then begin 

maybe ( '-1' -
'-' ) 

if (Result'') and (Result[1]='-') then begin 

? 

Em
07.07.2014 10:48, Dmitry Boyarintsev escreveu: 

 Will straight forward
solution work? how about this: 
 
 unit MySysUtils; 
 
 interface 


 uss SysUtils; 
 
 // the function will cut heading - if all
digits in the number are zeros. 
 // it will leave the result unchanged
otherwise. 
 
 function FormatFloat(const fmt: string; num: double):
string; 
 var 
 i : integer; 
 begin 
 Result:=
SysUtils.FormatFloat(fmt, num); 
 if (Result'') and (Result[1]='-1')
then begin 
 for i:=2 to length(Result) do 
 if Result[i] in
['1'..'9'] then Exit; 
 Result:=Copy(Result, 2, length(Result)-1); 

end; 
 
 end; 
  
 in your program. Put MySysUtils as the last
unit in the uses section (so your working unit would use MySysUtils
FormatFloat, instead of the implementation at SysUtils) 
 
 thanks, 

Dmitry 
 
 On Mon, Jul 7, 2014 at 5:00 PM, Andrea Mauri
andrea.mauri...@gmail.com wrote:
 
 using formatfloat function I
got an unexpected behaviour.
 If I round negative numbers I can get
as result of formatfloat = '-0'.
 I think it is a bug, since -0 has
no meaning, zero is zero.
 How can I make a workaround?

e.g.
 label1.Caption:= FormatFloat('0.###',
strtofloat(edit1.Text));
 if in edit1.text I have -0.01 I got -0
as result while I would like to get 0.
 
 Is it a bug, what can
I do?
 
 Minus-zero is a recognized computational 'feature' of
floats on computers, not a bug (AFAIK).
 
 The float variable
value of StrToFloat(edit1.text) is still -0.01 though;
 (try
assigning it to a float type variable and watch it)
 OK, I understand
that computationally -0 has meaning (since as you said the float
variable value of StrToFloat(edit1.text) is still -0.01).
 Anyway
It has no meaning for the final user of the application (at least for
any standard user of an application).
 The final user does not care
that -0 has meaning for the computer.
 e.g. I would like to represent
a float value with 3 decimal digits. I don't care of the remaining
digits, -0.000 has no meaning, it just means that there are some digits
(somewhere after the third decimal digits) that are not equal to zero
and that if they are considered the value is negative (but I don't want
to consider any digit after the third decimal one!).
 Try to do it in
excel or libreoffice:
 - write in a cell -0.1 and set to 3 the
decimal digits, you got -0.000 or 0.000?
 And you got the same results
using any software that deals with numbers.. 
 
 Does the same
happen if you Round() it to integer?
 e.g.
 label1.caption :=
Format('%d',[Round(strtofloat(edit1.text))]);
 (I know this isn't
what you're after
 In this way I got 0.
 Anyway I used as example
formatfloat since it has the same behaviour of
TFloatField.DisplayFormat, additionally DisplayFormat is a property that
is used to represent a formatted value to the final user (a human being
not a pc) for whom -0 has no meaning.
 
 A.
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Saving an array to a string

2014-07-01 Thread Philippe
 

you can use


http://www.freepascal.org/docs-html/rtl/classes/tstringlist.html 

var
lStrings : TStringList; 

begin 

 

 lStrings :=
TStringList.Create;
 with lStrings do
 begin
 delimiter :=
yourdelimiter; // don´t know if you can use lineending

strictdelimiter := true;
 DelimitedText := textfromyourfield;

 for n :=
0 to count - 1 do 

 myarray[ n] := strings[ n ]; 

 end; 


lStrings.free; 

Philippe 

Em 01.07.2014 12:04, Richard Mace escreveu:


 Thanks Michael. And reading it back? 
 On 1 Jul 2014 15:57,
Michael Thompson mike.cornfl...@gmail.com wrote:
 
 Is it
possible to save an array of string to a single string for storing in a
string field within a database?
 
 Suspect it'll be something like

 MyString := ''; 
 For i := Low(MyArray) to High(MyArray) Do 

MyString := MyString + MyArray[i] + LineEnding; 
 

MyStringField.AsString := MyString; 
 
 On 1 July 2014 16:49,
Richard Mace richard.m...@gmail.com wrote:
 
 Hi All,
 Is it
possible to save an array of string to a single string for storing in a
string field within a database? 
 If so, could anyone give me any
pointers please?
 
 Thanks
 
 Richard
 
 --

___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] TBitmap and pixel format

2014-06-18 Thread Philippe
 

I am trying to get raw data of image to use it as texture.
(Lazarus/windows 32 bits) 

basically I wrote some stuff like that 


pict := TPicture.create;

 try
 pict.loadFromFile( ExpandFileNameUTF8(
arqname));
 bm := pict.bitmap;

 // getting widht and height from bitmap
(working fine!) 

  

 // pixels from bitmap
 pbarq :=
bm.rawimage.Data;

 // copy to my texture object  

 . 

 except


// some message 

 end; 

the problem is that sometimes raw data are
in a RGBA format, sometimes in a RGB format ! 

in both case pixelFormat
gives me pf24bit !!! 

is there a simple way to distinguish the
cases? 

if there a better list to post this, just tell me! 

thanks


Philippe 

 --
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TBitmap and pixel format

2014-06-18 Thread Philippe
 

I am trying to undestand better ... I got now an pf32bit
pixelformat!! I need to check several cases ... 

Em 18.06.2014
11:10, Philippe escreveu: 

 I am trying to get raw data of image to
use it as texture. (Lazarus/windows 32 bits) 
 
 basically I wrote
some stuff like that 
 
 pict := TPicture.create;
 
 try

pict.loadFromFile( ExpandFileNameUTF8( arqname));
 bm := pict.bitmap;


 // getting widht and height from bitmap (working fine!) 
 
  


 // pixels from bitmap
 pbarq := bm.rawimage.Data;
 
 // copy to my
texture object  
 
 . 
 
 except 
 
 // some message 
 

end; 
 
 the problem is that sometimes raw data are in a RGBA format,
sometimes in a RGB format ! 
 
 in both case pixelFormat gives me
pf24bit !!! 
 
 is there a simple way to distinguish the cases?

 
 if there a better list to post this, just tell me! 
 
 thanks 


 Philippe 
 
 --
 ___

Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TBitmap and pixel format

2014-06-18 Thread Philippe
 

checked! ... 

pixelFormat seems doing well  (better than I do!)


doing ok with bmp, jpg and png I checked. 

but if someone got another
idea ... I appreciate! 

but this item can be close 

Philippe 

Em
18.06.2014 11:45, Philippe escreveu: 

 I am trying to undestand better
... I got now an pf32bit pixelformat!! I need to check several cases
... 
 
 Em 18.06.2014 11:10, Philippe escreveu: 
 
 I am trying to
get raw data of image to use it as texture. (Lazarus/windows 32 bits)

 
 basically I wrote some stuff like that 
 
 pict :=
TPicture.create;
 
 try
 pict.loadFromFile( ExpandFileNameUTF8(
arqname));
 bm := pict.bitmap;
 
 // getting widht and height from
bitmap (working fine!) 
 
  
 
 // pixels from bitmap

pbarq := bm.rawimage.Data;
 
 // copy to my texture object  


 . 
 
 except 
 
 // some message 
 
 end; 
 

the problem is that sometimes raw data are in a RGBA format, sometimes
in a RGB format ! 
 
 in both case pixelFormat gives me pf24bit
!!! 
 
 is there a simple way to distinguish the cases? 
 

if there a better list to post this, just tell me! 
 
 thanks 


 Philippe 
 
 --

___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TBitmap and pixel format

2014-06-18 Thread Philippe
 

I tried to get TRawImage.Description ... I tried 

I saw that
document ... but got lost rapidly!! dificult to find the way to do
simple things reading it! 

Now what I wanted to do seems to work ok
... I´ll be back to that document later ... lot of stuff I could take
advantage for sure!!! 

Thanks a lot for your help! 

Philippe 

Em
18.06.2014 12:46, Mattias Gaertner escreveu: 

 On Wed, 18 Jun 2014
12:02:44 -0300
 Philippe phili...@quarta.com.br wrote:
 
 checked!
... pixelFormat seems doing well  (better than I do!) doing ok with
bmp, jpg and png I checked. but if someone got another idea ... I
appreciate!
 
 RGB and RGBA is only the tip of the ice berg.
 See
TRawImage.Description.
 
 Have you read

http://wiki.lazarus.freepascal.org/Developing_with_Graphics [1]
 ?
 

Mattias
 
 --
 ___

Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1]
http://wiki.lazarus.freepascal.org/Developing_with_Graphics
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Problem rounding values at post

2014-06-03 Thread Philippe
 

generally, if one needs accurate values he does not use real values
... use integer (or word, longint, longword etc) ... then when needed
make the conversion or formating (for computing or printing) ... 

(it
may exists another solution ... someone else may help better for that!)


Philippe 

Em 03.06.2014 17:39, Daniel Erles escreveu: 

 Hello. 
 I
have this problem: 
 
 My database (Firebird) has a table with the
following fields: 
 ... 
 rTitle DECIMAL(8,4) not null, 
 rDiameter
DECIMAL(10,6) not null, 
 ... 
 
 In my program I have a Form with a
a TZTable object (ZEOS) called zData, bound to that table. 
 In a
routine I have the following code: 
 
 zData.Insert; 
 ... 

zData.FieldByName('rTitle').AsFloat := 0.12; 

zData.FieldByName('rDiameter').AsFloat := 0.12; 
 ... 
 zData.Post; 


 Then, at the table, I see that the values ​​are stored as follows: 


 rTitle = 0.1199 
 rDiameter = 0.12 
 
 Do not know why rTitle is
0.1199 instead of 0.12 
 I need the saved values ​​are accurate. 

I've tried AsFloat, AsCurrency, Value, always with the same result. 


 Any idea? 
 
 Tks. 
 Daniel. 
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Problem rounding values at post

2014-06-03 Thread Philippe
 

depending of the needs and the tool you may use string fields as
well. (for example, Java will make the conversion in a numerical
expression) 

Philippe 

Em 03.06.2014 17:39, Daniel Erles escreveu: 


Hello. 
 I have this problem: 
 
 My database (Firebird) has a table
with the following fields: 
 ... 
 rTitle DECIMAL(8,4) not null, 

rDiameter DECIMAL(10,6) not null, 
 ... 
 
 In my program I have a
Form with a a TZTable object (ZEOS) called zData, bound to that table.

 In a routine I have the following code: 
 
 zData.Insert; 
 ... 

zData.FieldByName('rTitle').AsFloat := 0.12; 

zData.FieldByName('rDiameter').AsFloat := 0.12; 
 ... 
 zData.Post; 


 Then, at the table, I see that the values ​​are stored as follows: 


 rTitle = 0.1199 
 rDiameter = 0.12 
 
 Do not know why rTitle is
0.1199 instead of 0.12 
 I need the saved values ​​are accurate. 

I've tried AsFloat, AsCurrency, Value, always with the same result. 


 Any idea? 
 
 Tks. 
 Daniel. 
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenGL

2014-05-29 Thread Philippe
 

I am using FREEGLUT under LAZARUS/FPC. No problem. Not very
complicate!! 

If it fits to your purpose, I do not have a big
experience, bug I may help you to start, even in french if better! 

Em
28.05.2014 12:34, Chavoux Luyt escreveu: 

 Hi Lazarati 
 
 I have
two questions: 
 1. Have there ever been a Free Pascal implementation
of OpenGL? I would like to learn OpenGL and was wondering if I will be
forced to use C++/C or if there are other options. 
 2. I know there
are (or have been) various OpenGL Lazarus components (e.g. GLScene, NX
etc) and game engines? (JEDI SDL != OpenGL?). Which would you advice me
to install/use for learning OpenGL and why? I am not asking for a
flame-war, so please state when it is just your opinion or else give a
reason. 
 3. Ultimately I would like to be able to write and use a game
engine based on OpenGL (in Pascal if possible) including sound etc. 


 Thanks 
 Chavoux 
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
--
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] GLUT vs windows 64 bits

2014-04-10 Thread Philippe
 

I made an application with GLUT. I did not have any problem to run
under windows 32. 

Under windows 64 bits, the program does not
recognize the glut32.dll properly and returns a message. 

I made a test
with example program openglcontrol_demo. Just added GLU, GLUT in a unit,
no other change to the project. I got: 

Object openglcontrol_demo
raised exception class `Exception` with message:
Could not load Glut
from glut32.dll 

I tried with GLUT32.DLL in windows32, in syswow64 and
in both. 

When I try to registrer the dll in either directory I got a
message which tells me that the DLL was found but 

dllRegisterServer
not found 

And this is the very same file GLUT32.DLL I am using with XP
e Windows 8 32 bits ... 

Well ... may be there is better mail list for
this kind of problem!!! 

I appreciate any help. Even suggestion of
other compatible package (I have visited lists ... but some packages
are quite as old as GLUT himself, or example does not work, or very
different and I may not be able to move to ...) 

Philippe 

 --
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GLUT vs windows 64 bits

2014-04-10 Thread Philippe
 

I read some confuse documentation ... and get in trouble!!!


thanks. I´ll try first with freeglut ... seems to be the laziest way!
may be latter with openGl Control ... I´ll read
http://wiki.freepascal.org/OpenGL_Tutorial next ... 

thanks again


Philippe 

Em 10.04.2014 16:01, Sven Barth escreveu: 

 On 10.04.2014
18:43, Philippe wrote:
 
 I made an application with GLUT. I did not
have any problem to run under windows 32. Under windows 64 bits, the
program does not recognize the glut32.dll properly and returns a
message.
 
 Note: I would suggest you to use FreeGLUT if you want to
keep the API. 
 It's a drop in replacement for the original GLUT, but
also provides 
 64-Bit libraries. See here:
http://freeglut.sourceforge.net/ [1] (at 
 Prepackaged Releases you can
find a link for Windows binaries)
 
 Regards,
 Sven
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1] http://freeglut.sourceforge.net/
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GLUT vs windows 64 bits

2014-04-10 Thread Philippe
 

my program worked with freeglut ... 

I just noted some differences
on windows 7 64 bits ... may be because it is on notebook 

thanks a
lot for your help! 

Philippe 

Em 10.04.2014 16:01, Sven Barth
escreveu: 

 On 10.04.2014 18:43, Philippe wrote:
 
 I made an
application with GLUT. I did not have any problem to run under windows
32. Under windows 64 bits, the program does not recognize the glut32.dll
properly and returns a message.
 
 Note: I would suggest you to use
FreeGLUT if you want to keep the API. 
 It's a drop in replacement for
the original GLUT, but also provides 
 64-Bit libraries. See here:
http://freeglut.sourceforge.net/ [1] (at 
 Prepackaged Releases you can
find a link for Windows binaries)
 
 Regards,
 Sven
 
 --

___
 Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1] http://freeglut.sourceforge.net/
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus