[Lazarus] Personalize window menu

2010-01-08 Thread Kjow
Hi,

How can I personalize window menu of applications? I need to add some
voices in that menu, but I can't find a way... and is it possible to
remove the existing voices?

In attachment a screenshot of what I mean.

Thank you very much.
<>--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Personalize window menu

2010-01-08 Thread Kjow
2010/1/8 Paul Ishenin :
> There is no cross-platform way at the moment.

And for linux only? For my actual necessity is sufficient to know how
to do for linux...

Thank you!
Kjow

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


Re: [Lazarus] Personalize window menu

2010-01-08 Thread Kjow
2010/1/8 Hans-Peter Diettrich :
> In former times, when the menus resided in the Windows resources of an
> application, I did that with the Borland (or any other) resource editor.
>
> Nowadays, when menus are created from other resources or in code, or totally
> differently on other platforms, they cannot be changed any more so easily
> :-(
>
> DoDi

Ok, thank you all! :(

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


[Lazarus] GTK2 behaviors

2010-01-08 Thread Kjow
Hi all,

I need some GTK2 behaviors in my Lazarus application, so I added
"gtk2" unit to uses... but how to "link" (???) my form with
"PGtkWindow"?

e.g. new lazarus application with two buttons on the form:
_

unit main;

{$mode objfpc}{$H+}

interface

uses
   ..., ..., gtk2;

...
...
...

var
  Form1: TForm1;
  window :  PGtkWindow;

implementation

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
   window :=  gtk_window_new (GTK_WINDOW_TOPLEVEL); --> it returns
PGtkWidget, not PGtkWindow
   //I think I need something that link window to Form1, but I don't
know how/what...
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  gtk_window_fullscreen(window);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  gtk_window_unfullscreen(window);
end;

initialization
  {$I main.lrs}

end.

_


Thank you!

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


Re: [Lazarus] GTK2 behaviors

2010-01-09 Thread Kjow
2010/1/9 Paul Ishenin :
> All gtk_something_new() return PGtkWidget. Just typecast it:
> PGtkWindow(gtk_window_new())
>
> Best regards,
> Paul Ishenin.

Thanks, but how can I pass form to gtkwindow?

Kjow

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


Re: [Lazarus] GTK2 behaviors

2010-01-09 Thread Kjow
2010/1/9 Mattias Gaertner :
> If you want to make a form full screen under gtk, use:
> uses gtkproc;
>
> SetWindowFullScreen(Form1,true);
>
>
> Mattias

Thank you!
It works, but can I use gtk2 calls in lazzarus apps?


Kjow

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


Re: [Lazarus] GTK2 behaviors

2010-01-09 Thread Kjow
2010/1/9 Mattias Gaertner :
> It depends. They may conflict with the gtk2 interface of the LCL.
>
> Mattias

e.g. I need to use: gtk_widget_show (menu)

Where menu is a menu like TMainMenu, but I don't know how to create
the menu itself...

I'm sorry if I'm not using technical terms, but I'm starting to
develop with this things...


I need to use gtk calls because I'm trying to follow Maemo references here:

http://www.forum.nokia.com/info/sw.nokia.com/id/a3187f95-ad88-4233-b0ef-a182da3ec1c7/Hildon_2_2_Widget_UI_Specification_v1_0_en.pdf.html
In specific:
http://sw.nokia.com/id/a3187f95-ad88-4233-b0ef-a182da3ec1c7/Hildon_2_2_Widget_UI_Specification_v1_0_en.pdf

Kjow

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


[Lazarus] [Windows] Compiling from sources.

2010-01-13 Thread Kjow
Hi,

I'm on Windows 7 and I'm trying to compile fpc+lazarus from both trunk
svn, but I get some errors.

1) I downloaded both svn with tortoise and I moved sources to:

c:\Devel\fpc\2.5.1\source
c:\Devel\Lazarus

2) I installed official fpc 2.4.0 in:

c:\Devel\fpc\2.4.0

3) I compiled fpc 2.5.1 from "command prompt" (as administrator), with:

make all
make install PREFIX=c:\Develop\2.5.1

4) I downloaded SVN binw32 (
http://svn.freepascal.org/svn/fpcbuild/trunk/install/binw32 ) in:

C:\Devel\binw32

5) I modified PATH from

c:\Devel\fpc\2.4.0
to
c:\Devel\fpc\2.5.1

so typing in "command prompt":

c:\> fpc

I get the right fpc (it returns v2.5.1)

6) I added binw32 to path.

7) I tried to compile lazarus with:

make clean all

But this is the output:

C:\Devel\lazarus>make clean all
make -C ide cleanide
make[1]: Entering directory `C:/Devel/lazarus/ide'
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f
make[1]: Leaving directory `C:/Devel/lazarus/ide'
make -C lcl clean
make[1]: Entering directory `C:/Devel/lazarus/lcl'
C:/Devel/binw32/rm.exe -f units/i386-win32/alllclunits.ppu units/i386-win32/actn
list.ppu units/i386-win32/arrow.ppu units/i386-win32/avglvltree.ppu units/i386-w
in32/buttons.ppu units/i386-win32/calendar.ppu units/i386-win32/chart.ppu units/
i386-win32/checklst.ppu units/i386-win32/clipbrd.ppu units/i386-win32/clistbox.p
pu units/i386-win32/comctrls.ppu units/i386-win32/controls.ppu units/i386-win32/
dbactns.ppu units/i386-win32/dbctrls.ppu units/i386-win32/dbgrids.ppu units/i386
-win32/dialogs.ppu units/i386-win32/dynamicarray.ppu units/i386-win32/dynhasharr
ay.ppu units/i386-win32/editbtn.ppu units/i386-win32/extctrls.ppu units/i386-win
32/extdlgs.ppu units/i386-win32/extendedstrings.ppu units/i386-win32/extgraphics
.ppu units/i386-win32/filectrl.ppu units/i386-win32/forms.ppu units/i386-win32/f
pcadds.ppu units/i386-win32/graphics.ppu units/i386-win32/graphmath.ppu units/i3
86-win32/graphtype.ppu units/i386-win32/grids.ppu units/i386-win32/imglist.ppu u
nits/i386-win32/inipropstorage.ppu units/i386-win32/interfacebase.ppu units/i386
-win32/lazlinkedlist.ppu units/i386-win32/lclintf.ppu units/i386-win32/lclmemman
ager.ppu units/i386-win32/lclproc.ppu units/i386-win32/lclrescache.ppu units/i38
6-win32/lclstrconsts.ppu units/i386-win32/lcltype.ppu units/i386-win32/lclunicod
edata.ppu units/i386-win32/lconvencoding.ppu units/i386-win32/lmessages.ppu unit
s/i386-win32/lresources.ppu units/i386-win32/maskedit.ppu units/i386-win32/menus
.ppu units/i386-win32/pairsplitter.ppu units/i386-win32/popupnotifier.ppu units/
i386-win32/postscriptprinter.ppu units/i386-win32/printers.ppu units/i386-win32/
propertystorage.ppu units/i386-win32/spin.ppu units/i386-win32/stdactns.ppu unit
s/i386-win32/stdctrls.ppu units/i386-win32/stringhashlist.ppu units/i386-win32/t
extstrings.ppu units/i386-win32/toolwin.ppu units/i386-win32/utrace.ppu units/i3
86-win32/xmlpropstorage.ppu
C:/Devel/binw32/rm.exe -f units/i386-win32/lclstrconsts.rst
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f fpcmade.i386-win32 Package.fpc ppas.bat script.res lin
k.res
C:/Devel/binw32/rm.exe -f *.s *_ppas.bat
make -C interfaces clean
make[2]: Entering directory `C:/Devel/lazarus/lcl/interfaces'
make -C win32 clean
make[3]: Entering directory `C:/Devel/lazarus/lcl/interfaces/win32'
C:/Devel/binw32/rm.exe -f ../../units/i386-win32/win32/interfaces.ppu ../../unit
s/i386-win32/win32/winext.ppu ../../units/i386-win32/win32/win32def.ppu ../../un
its/i386-win32/win32/win32proc.ppu ../../units/i386-win32/win32/win32int.ppu
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f fpcmade.i386-win32 Package.fpc ppas.bat script.res lin
k.res
C:/Devel/binw32/rm.exe -f *.s *_ppas.bat
make[3]: Leaving directory `C:/Devel/lazarus/lcl/interfaces/win32'
make[2]: Leaving directory `C:/Devel/lazarus/lcl/interfaces'
make[1]: Leaving directory `C:/Devel/lazarus/lcl'
make -C components clean
make[1]: Entering directory `C:/Devel/lazarus/components'
C:/Devel/binw32/rm.exe -f
C:/Devel/binw32/rm.exe -f fpcmade.i386-win32 Package.fpc ppas.bat script.res lin
k.res
C:/Devel/binw32/rm.exe -f *.s *_ppas.bat
make -C synedit clean
make[2]: Entering directory `C:/Devel/lazarus/components/synedit'
C:/Devel/binw32/rm.exe -f units/i386-win32/allsyneditunits.ppu units/i386-win32/
synbeautifier.ppu units/i386-win32/syncompletion.ppu units/i386-win32/syndesigns
tringconstants.ppu units/i386-win32/synedit.ppu units/i386-win32/syneditautocomp
lete.ppu units/i386-win32/syneditexport.ppu units/i386-win32/syneditfoldedvi

Re: [Lazarus] [Windows] Compiling from sources.

2010-01-13 Thread Kjow
2010/1/13 Kjow :
> Hi,
>
> I'm on Windows 7 and I'm trying to compile fpc+lazarus from both trunk
> svn, but I get some errors.

I'm sorry for mistake, I send this email in error.

I found the problem, I just need to add these rows at the end of fpc.cfg

-Fuc:\Devel\fpc/$fpcversion/units/$fpctarget
-Fuc:\Devel\fpc/$fpcversion/units/$fpctarget/rtl
-Fuc:\Devel\fpc/$fpcversion/units/$fpctarget/*


But now I have a question:


Do I need to do install sourceinstall? ( c:\Devel\fpc\2.5.1\source>
make install sourceinstall PREFIX=c:\Devel\fpc\2.5.1\source )

And if yes, with paths I used, do I need PREFIX?

Thanks!

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


[Lazarus] cross compile from windows

2010-01-13 Thread Kjow
Hi all,

I'm trying to make lazarus able to cross compile from Win32 to arm-linux.

FPC is ok, but lazarus won't compile for arm-linux.

I "crossinstalled" FPC by:

make crossinstall CPU_TARGET=arm OS_TARGET=linux
CROSSBINDIR=C:\Devel\binutils OPT=-dFPC_ARMEL
INSTALL_PREFIX=C:\Devel\fpc\2.5.1 BINUTILSPREFIX=arm-linux-

where in C:\Devel\binutils there are all arm-linux*.exe
and in C:\Devel\fpc\2.5.1 there are FPC bins.

It has compiled well, I think (e.g. now I have
C:\Devel\fpc\2.5.1\units\arm-linux )

I added to the end of C:\Devel\fpc\2.5.1\bin\i386-win32\fpc.cfg these rows:

#DEFINE LAZARUS

-Fuc:\Devel\fpc/$fpcversion/units/$fpctarget/*
-Flc:\Devel\fpc/$fpcversion/units/$fpctarget/rtl/

-a
-Sd
-Xd
-Xs

-O-

#IFDEF CPUARM
-XPC:\Devel\binutils
-XrC:\Devel\fpc\2.5.1\units\arm-linux\rtl\
-XrD:\Condivisa\Lazarus\libcross
-XRc:\Devel\fpc\
-darm
-Tlinux
#ENDIF

If I try to cross compile the LCL
(http://wiki.lazarus.freepascal.org/Cross_compiling#Cross_compiling_the_LCL),
I get this error:

C:\Devel\binw32\make.exe: Entering directory `C:/Devel/lazarus/lcl'
C:/Devel/binw32/rm.exe -f units/arm-linux/alllclunits.ppu
C:/Devel/fpc/2.5.1/bin/i386-win32/fpc.exe -Tlinux -Parm -XParm-linux-
-Xr -gl  -Fu. -Funonwin32 -Fuforms -Fuwidgetset -Fiinclude -FE.
-FUunits/arm-linux -darm  alllclunits.pp
Free Pascal Compiler version 2.5.1 [2010/01/13] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for ARMEL
Compiling alllclunits.pp
Compiling lclversion.pas
Assembling lclversion
C:\Devel\lazarus\lcl\lclversion.pas(40) Error: Assembler
arm-linux-as.exe not found, switching to external assembling
C:\Devel\lazarus\lcl\lclversion.pas(40) Fatal: There were 1 errors
compiling module, stopping

How to pass the path of binutils to lazarus? (c:\Develop\binutils )


Thanks!

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


Re: [Lazarus] Lazarus website is down

2010-01-14 Thread Kjow
2010/1/14 Graeme Geldenhuys :
> Hi,
>
> The URL:  http://www.lazarus.freepascal.org/
> is currently down - at least from South Africa. I just thought I would let
> you know.
>
>
> Regards,
>  - Graeme -

Here, in Italy, it is ok.

Kjow

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


[Lazarus] Build/Rebuild lazarus with components

2010-01-17 Thread Kjow
Hi all,

I need to compile lazarus in terminal (or command prompt) including
all components already installed.
I mean that I made a simple batch script on windows startup that
download fpc svn, lazarus svn, recompile fpc and finally recompile
lazarus, but every time I run Lazarus (after relative "make clean
all") I haven't any extra component. I need to click in "build" voice
in IDE menu.

How can I include all packages (extra and not) in command line compiling?

I noticed also that lazarus.exe hasn't the icon, how to associate it to the exe?

Finally, how to automatically strip lazarus.exe? It is 119Mb... :)

Many thanks!

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-18 Thread Kjow
2010/1/18 Mattias Gaertner :
> See
> http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling_and_running

Oh, OK.
So to upgrade svn revisions I need to do "make" instead "make clean all".

>> I noticed also that lazarus.exe hasn't the icon, how to associate it to the 
>> exe?
>
> It is already compiled in.
> Maybe Paul can answer this?

startlazarus.exe and lazbuild.exe have both the icon, but lazarus.exe hasn't.

>> Finally, how to automatically strip lazarus.exe? It is 119Mb... :)
>
> Add to your script:
> strip --strip-all lazarus.exe

Whops, I mean directly in "make" string... but it isn't a problem to
add a row in the script ;)

Thanks!

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-18 Thread Kjow
2010/1/18 Paul Ishenin :
> Windows uses built-in icon automatically. On linux you need to assign
> project ico file to desktop shortcut manually. I don't know if this can be
> automated since even kde and gnome requires different actions for that.
>
> On OSX we are thinking about the possibility to automatically generate a
> bundle with .icns inside - then OSX will show application using that icon.

As just worte, startlazarus.exe and lazbuild.exe have both the icon,
but lazarus.exe hasn't.

> There are other possibilities too. Compiler can strip if -Xs is passed but I
> remember some conflicts with -g options. You can also ask fpc to separate
> debug info from the executable using -Xg switch. I can be wrong but as I
> remember -Xg works correctly starting from fpc 2.4.0

So can I add -Xs or -Xg to the "make" for lazarus compile?
e.g. c:\develop\lazarus\> make -Xs

Thanks
Kjow

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-18 Thread Kjow
2010/1/18 Mattias Gaertner :
> I guess you mean you have to use
> "make clean all"

Umm... I do "make clean all", then it compile right, but without
installed extra packages.
Then if I try to do "lazbuild --build-all" or "lazbuild -B", I get:

c:\Develop\Lazarus>lazbuild --build-all
Error: missing file

lazbuild [options] 

Parametri:

--help or -?  questo messaggio di aiuto

-B or --build-all fai il build di tutti i file del progetto/pacchetto/ID
E
-r or --recursive apply build flags (-B) to dependencies too
-d or --skip-dependencies Non compilare le dipendenze
--build-ide= fai il build dell'IDE con i pacchetti
-v or --version   Mostra versione ed esci

--primary-config-path=
or --pcp=
  directory di configurazione primaria, dove Lazarus
  salva i suoi file di configurazione. Per default è C:\User
s\Kjow\AppData\Local\lazarus

--secondary-config-path=
or --scp=
  directory di configurazione secondaria, dove
  Lazarus cerca i modelli di file di configurazione.
  Per default è C:\Develop\Lazarus

--operating-system=
or --os=
  override the project operating system. e.g. win32
  linux. default: win32

--widgetset=
or --ws=
  override the project widgetset. e.g. gtk gtk2 qt
  win32 carbon. default: win32

--cpu=
  override the project cpu. e.g. i386 x86_64 powerpc
  powerpc_64 etc. default: i386

--compiler=
  override the default compiler. e.g. ppc386 ppcx64
  ppcppc etc. default is stored in
  environmentoptions.xml

--language=
  Override del linguaggo. Per esempio --language=de.
  Per i possibili valori vedi i files nella directory
  languages.

c:\Develop\Lazarus>

But If I click on Tools->build lazarus I get lazarus compiled with all
packages I installed before the re-build.
Other thing I just noticed is that making lazarus by command line I
lose language setting and it returns to system language, but building
lazarus by IDE it returns to english (language I choose to use).


> AFAIK this is not possible, because you can not disable the -g options
> that are always passed by the makefile.

Ok, thanks you!

Kjow

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-18 Thread Kjow
2010/1/18 Paul Ishenin :
> No idea. Lazarus.exe has the same icon as startlazarus and lazbuild here.

Can I force to link the icon? (e.g windres in my own script, but which syntax?)

Thanks,
Kjow

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-18 Thread Kjow
2010/1/18 Luca Olivetti :
> You need to specify the "--build-ide=" option as well

Do you mean "lazbuild --build-all --build-ide="?

Thanks,
Kjow

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-18 Thread Kjow
2010/1/18 Paul Ishenin :
> Can you tell me what lazarus version do you have?
>
> If 0.9.28 then look at lazarus.rc which must contain a manifest and an icon.
> If 0.9.29 then lazarus.res must be in the ide folder which contains an icon.

As I said on first message, I made a simple batch script on windows
startup that download fpc svn, lazarus svn, recompile fpc and finally
recompile lazarus, but every time I run Lazarus (after relative "make
clean all") I haven't any extra component. I need to click in "build"
voice in IDE menu."

So, I'm using latest revisions of SVN trunk (both lazarus and fpc)

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-19 Thread Kjow
2010/1/19 Paul Ishenin :
> Good to know - we have similar environment.
>
> Lazarus trunk has a lazarus.res file:
> http://svn.freepascal.org/svn/lazarus/trunk/ide/lazarus.res
> Do you have one?
>
> Ide using here: http://svn.freepascal.org/svn/lazarus/trunk/ide/lazarus.pp
>
> [part of lazarus.pp]
>  MainBase, compiler_conditionals_options;
>
> {$I revision.inc}
> {$R lazarus.res}
>
> begin
>
> [/part of lazarus.pp]
>
> This adds a manifest and an icon to the lazarus.exe. No idea why it is not
> so for you.

Oh! Now I understand, it is a my "mistake"... I edited lazarus.pp from
{$R lazarus.res} to { $R lazarus.res} because I use glscene that makes
a lot of graphical glitches with windows manifest, so I need to
disable this functions in lazarus IDE (otherwise, there is no way to
use design time editor).

How can I make my own lazarus.res that include all resources, but
without Windows manifest?

Thanks,
Kjow

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-19 Thread Kjow
2010/1/19 Paul Ishenin :
> You can open lazarus.lpi in lazarus and edit the project options.

Thank you very much, now it is almost perfect :)

I noticed that if I want associate lazarus to open .lpi file, the icon
in file exploer isn't beauty (the real icon is at the center of a
white "box"), so I searched for the regedit key and I found that when
I want to associate a program to open a file Windows (seven in my
case) doesn't create the right key after windows "association":

HKEY_CLASSES_ROOT\lpi_auto_file\DefaultIcon

then I edited the string value with:
C:\Develop\Lazarus\ide\lazarus.ico

Now it is ok, lpi files have the right and beautiful icon! In
attachment my exported .reg to doubleclick for future (editing with
right path needed).

It would be nice if will be in lazarus IDE a function to automatically
associate the right things in each OS (like with the installer
version).

Thank you very much for help,
Lazarus community is fantastic!

Regards,
Kjow


laz_icon.reg
Description: Binary data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] [script] Fpc+lazarus: SVNdownload + compile

2010-01-19 Thread Kjow
Hi all,

as I wrote in other emails these days, I made a simple script that
update fpc and lazarus svn from each trunk and compile everything, I
launch it at start of my pc, so everyday (and everytime I want in the
day) I have all things updated.

I want to share it with you this; it is just for those who need it (I
know that most of all don't have necessity of my words) :)

I used TorsoiseSVN and I put sources in:

C:\Develop\fpc\2.5.1\source\
C:\Develop\Lazarus\

First setup/compile here:
http://lists.lazarus.freepascal.org/pipermail/lazarus/2010-January/048231.html
http://lists.lazarus.freepascal.org/pipermail/lazarus/2010-January/048232.html

In "C:\Develop\" I create an "update.bat" file with this script inside:

"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update
/path:"C:\Develop\fpc\2.5.1\source\" /notempfile /closeonend:1
"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update
/path:"C:\Develop\Lazarus\" /notempfile /closeonend:1
cd C:\Develop\fpc\2.5.1\source\
make clean all
make install PREFIX=C:\Develop\fpc\2.5.1\
cd C:\Develop\Lazarus
make clean all
lazbuild --build-all --build-ide=
strip --strip-all lazarus.exe
strip --strip-all lazarus.new.exe
strip --strip-all lazbuild.exe
strip --strip-all startlazarus.exe
pause
exit

Regards,
Kjow

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


[Lazarus] contnrs.ppu - Invalid Version 112

2010-01-19 Thread Kjow
I updated FPC svn this morning, but when compiling Lazarus it returns
this error:
...
...
...
Compiling fileutil.pas
Compiling masks.pas
PPU Loading C:\Develop\fpc\2.5.1\units\i386-win32\fcl-base\contnrs.ppu
PPU Invalid Version 112
Fatal: Can't find unit Contnrs used by Masks
TExternalToolList.Run Exception: C:\Develop\Lazarus\lcl\masks.pas(1,1)
Fatal: Can't find unit Contnrs used by Masks
ERROR: tool reported error


Kjow

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


Re: [Lazarus] contnrs.ppu - Invalid Version 112

2010-01-19 Thread Kjow
2010/1/19 Aleksa Todorovic :
> Check paths in your C:\Develop\fpc\2.5.1\bin\i386-win32\fpc.cfg (if it
> exists at all).

it seems to be ok; this morning, on first pc start up, I updated svn
fpc and lazarus, recompiled all and it was ok... some hours after, I
tried to re-update/re-compile all and I got this error. No other
modifies...

Kjow

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


Re: [Lazarus] contnrs.ppu - Invalid Version 112

2010-01-19 Thread Kjow
2010/1/19 Paul Ishenin :
> Well, this means you have compiled the compiler but forgot to recompiler rtl
> and packages or maybe you are compiling lazarus with an old compiler.

Ummm... which is the command to recompile everything?
I'm using this script
http://lists.lazarus.freepascal.org/pipermail/lazarus/2010-January/048409.html
that worked until this morning... after an FPC svn update it returned
this error...

Kjow

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


Re: [Lazarus] contnrs.ppu - Invalid Version 112

2010-01-19 Thread Kjow
2010/1/19 Paul Ishenin :
> Yes, I increased ppu version because of change in the compiler I made. I
> have no idea what is wrong in the script - it looks ok. Try to remove all
> the ppu files manually.

Ok, so you are suggesting me to delete all 2206 *.ppu in fpc 2.51 dir/subdir?
It is advisable to do every time before to recompile?

Thanks,
Kjow

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


Re: [Lazarus] contnrs.ppu - Invalid Version 112

2010-01-19 Thread Kjow
2010/1/19 Paul Ishenin :
> Yes, I increased ppu version because of change in the compiler I made. I
> have no idea what is wrong in the script - it looks ok. Try to remove all
> the ppu files manually.

I deleted all ppu in fpc dir, and now I have this:

...
...
Compiling lclstrconsts.pas
Writing Resource String Table file: lclstrconsts.rst
Compiling fpcadds.pas
Compiling lazlinkedlist.pas
Compiling dynhasharray.pp
Compiling lclproc.pas
Compiling avglvltree.pas
Compiling fileutil.pas
Compiling masks.pas
Fatal: Can't find unit Contnrs used by Masks
TExternalToolList.Run Exception: C:\Develop\Lazarus\lcl\masks.pas(1,1)
Fatal: Can't find unit Contnrs used by Masks
ERROR: tool reported error

Kjow

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


Re: [Lazarus] contnrs.ppu - Invalid Version 112

2010-01-19 Thread Kjow
ILING
  -XP$FPCTARGET-
#ENDIF


# -
# Linking
# -

# generate always debugging information for GDB (slows down the compiling
# process)
#  -gcgenerate checks for pointers
#  -gduse dbx
#  -gguse gsym
#  -ghuse heap trace unit (for memory leak debugging)
#  -gluse line info unit to show more info for backtraces
#  -gvgenerates programs tracable with valgrind
#  -gwgenerate dwarf debugging info
#
# Enable debuginfo and use the line info unit by default
#-gl

# always pass an option to the linker
#-k-s

# Always strip debuginfo from the executable
-Xs


# -
# Miscellaneous
# -

# Write always a nice FPC logo ;)
-l

# Verbosity
#  e : Show errors (default)   d : Show debug info
#  w : Show warnings   u : Show unit info
#  n : Show notes  t : Show tried/used files
#  h : Show hints  m : Show defined macros
#  i : Show general info   p : Show compiled procedures
#  l : Show linenumbersc : Show conditionals
#  a : Show everything 0 : Show nothing (except errors)
#  b : Show all procedure  r : Rhide/GCC compatibility mode
#  declarations if an errorx : Executable info (Win32 only)
#  occurs
#
# Display Info, Warnings, Notes and Hints
-viwn
# If you don't want so much verbosity use
#-vw

-Fuc:\Develop\fpc/$fpcversion/units/$fpctarget
-Fuc:\Develop\fpc/$fpcversion/units/$fpctarget/rtl
-Fuc:\Develop\fpc/$fpcversion/units/$fpctarget/*

This fpc.cfg always worked before this morning update.

Thanks,
Kjow

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


Re: [Lazarus] contnrs.ppu - Invalid Version 112

2010-01-20 Thread Kjow
2010/1/19 Marco van de Voort :
> This happens only once or twice an year. I manually kill the 
> fpc\$FPCVERSION\units\
> dir if I notice it.
>
> A different reason to do the same is strange errors like linker errors, or
> wanting to recompile.
>
> This can happen because an unit switched dirs, and the old version is no
> longer overwritten, and found by the compiler first. Killing the units dir
> and install the snapshot overnew solves that too.

Perfect thank you!

I tried to delete fpc\$FPCVERSION\units\ only, but no luck.
So I deleted all fpc dirs, binaries and sources, so I restarted from
new svn download and all things are gone right!

Regards,
Kjow

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


Re: [Lazarus] Build/Rebuild lazarus with components

2010-01-20 Thread Kjow
2010/1/19 Mattias Gaertner :
> make bigide compiles an IDE as found in the windows installer.
> To compile an IDE with your current set of installed packages, use
>
> lazbuild --build-ide=

After an svn update, it is better to do:

make clean all
lazbuild --build-all --build-ide=

or just:

lazbuild --build-all --build-ide=

Thanks!
Kjow

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


[Lazarus] Error: illegal qualifier [ found

2010-01-20 Thread Kjow
Hi,

I updated Lazarus svn to revision 23510, but from some revs (at least
from some hours ago), when I press ctrl+space at the end of an array
to open the menu I get the error:

Error: illegal qualifier [ found

Is it a bug or a my problem?

Thanks,
Kjow

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


Re: [Lazarus] Error: illegal qualifier [ found

2010-01-20 Thread Kjow
2010/1/20 Mattias Gaertner :
> Can you give a more complete example?
>
> Mattias

e.g. If I add to a form a listview or a memo or a combobox and in the
source code I put this:

ListBox1.items[0].
or
Memo1.Lines[0].
or
combobox1.items[0].

If I press CRTL+Space I got this error:

\lcl\stdctrls.pp(909,19) Error: identifier expected, but  found

OR

more complete example:

...
...
Type
  TCustomRecord = record
...
DummyCubeList : array [1..10] of TGLDummyCube;
...
  end;

...
...
...

function init(Form: TForm): byte;
var
  example: TCustomRecord ;
begin
  ...
  example.DummyCubeList[i]. //CTRL+Space error -> Error: illegal
qualifier [ found


Regards,
Kjow

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


Re: [Lazarus] Error: illegal qualifier [ found

2010-01-21 Thread Kjow
2010/1/21 Mattias Gaertner :
> fixed
...
> Fixed.

Thank you!
I can confirm that now it is ok!

Best regards,
Kjow

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


Re: [Lazarus] GTK2 EraseBackgound

2010-02-05 Thread Kjow
2010/2/5 Felipe Monteiro de Carvalho :
> Yes, you need to mess with Gtk to do it. I would however recommend
> that you try it with Qt instead. The Qt API is much easier to use and
> the Qt interface is also much better organized. The downside is that
> you need the Pascal binding library if you use it.
>
> --
> Felipe Monteiro de Carvalho

What about licenses using of QT in commercial projects?

Kjow

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


Re: [Lazarus] GTK2 EraseBackgound

2010-02-06 Thread Kjow
2010/2/6 Graeme Geldenhuys :
> On 6 February 2010 00:31, Kjow  wrote:
>>
>> What about licenses using of QT in commercial projects?
>
> You need to purchase a commercial license. $2500 US per developer -
> starting price (if I remember correctly).
>
>
> --
> Regards,
>  - Graeme -

WOW... really too much for me.
Well,  I'll develop with QT only if I'll be a milionaire :(


Kjow

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


Re: [Lazarus] GTK2 EraseBackgound

2010-02-06 Thread Kjow
2010/2/6 zeljko :
> No, Graeme is wrong. Qt is LGPL-ed so you can create commercial apps without
> buying Qt commercial licenses.
>
> zeljko

Oh, well this reevaluates the question. So if I use QT in my Lazarus
projects I don't have to pay nothing to Nokia. And what about sources?
Do I need to release it?

So, the difference between LGPL and commercial licenses is the
official support? ( I found this:
http://qt.nokia.com/products/licensing )

Thanks,
Kjow

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


[Lazarus] Server down/error?

2010-02-12 Thread Kjow
Hi all,

I just entered on: http://bugs.freepascal.org/

but there is a MySQL error:

"SYSTEM WARNING: mysql_connect() [function.mysql-connect]: Can't
connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)

APPLICATION ERROR #400

Database connection failed. Error received from database was #2002:
Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)

Please use the "Back" button in your web browser to return to the
previous page. There you can correct whatever problems were identified
in this error or select another action. You can also click an option
from the menu bar to go directly to a new section."



SVN also returns error:

"svn: Can't find a temporary directory: Internal error"



Thanks,
Kjow

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


Re: [Lazarus] Server down/error?

2010-02-12 Thread Kjow
2010/2/12 Andrew Brunner :
> Hi,  you know it was strange... I did a few Ubuntu upgrades on my x64
> distro'd laptop and encountered these issues too.  I also had Lazarus
> crashing ever few seconds... I've never had such issues before.  I
> just rebooted this morning and did an svn update and at least that
> worked.
>
> In general, when you get socket errors and strange errors like that
> and you see stuff like "internal" errors it would be best to try to
> reboot before submitting bug reports...

Hi, I think there is a misunderstood :)
Is not a my project to crash, but it was the site
http://bugs.freepascal.org/ and the svn system.

Now it is ok ;)

Regards,
Kjow

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


[Lazarus] [OT] GLScene newsgroups

2010-02-21 Thread Kjow
Hi all,

please excuse me about this OT, but I don't know where to ask...

Are there anyone here that follow GLScene newsgroups?

news://forums.talkto.net/glscene.general
news://forums.talkto.net/glscene.support

These newsgroups don't work from some days for me... can you give me
your feedback?

Thank you,
Kjow

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


[Lazarus] QT: installaton error.

2010-02-22 Thread Kjow
Hi all,

I'm trying to use QT on Windows 7, so I downloaded WIN "Libray Binary"
V2.1 from here:
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html

and I replaced the file C:\Develop\Lazarus\lcl\interfaces\qt\qt45.pas

When I try to rebuild LCL for QT by IDE, I get this error:

C:\Develop\binw32\make.exe: Entering directory `C:/Develop/Lazarus/lcl'
C:/Develop/binw32/rm.exe -f units/i386-win32/alllclunits.ppu
C:/Develop/fpc/2.5.1/bin/i386-Win32/fpc.exe -gl  -Fu. -Fuforms
-Fuwidgetset -Fiinclude -FE. -FUunits/i386-win32 -di386 alllclunits.pp
Free Pascal Compiler version 2.5.1 [2010/02/22] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Win32 for i386
Compiling alllclunits.pp
73 lines compiled, 0.2 sec
C:/Develop/binw32/make.exe -C interfaces all
make.exe[1]: Entering directory `C:/Develop/Lazarus/lcl/interfaces'
C:/Develop/binw32/make.exe -C qt all
make.exe[2]: Entering directory `C:/Develop/Lazarus/lcl/interfaces/qt'
C:/Develop/binw32/rm.exe -f ../../units/i386-win32/qt/interfaces.ppu \
../../units/i386-win32/qt/interfaces.o
C:/Develop/fpc/2.5.1/bin/i386-Win32/fpc.exe -gl -dqt
-Fu../../units/i386-win32 -Fu. -FE. -FU../../units/i386-win32/qt
-di386 interfaces.pp
Free Pascal Compiler version 2.5.1 [2010/02/22] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Win32 for i386
Compiling interfaces.pp
Compiling qtint.pp
C:\Develop\Lazarus\lcl\interfaces\qt\qtwinapi.inc(1181,7) Error: Can't
determine which overloaded function to call
C:\Develop\Lazarus\lcl\interfaces\qt\qtwinapi.inc(1485,5) Note: User
defined: implement EnumFontFamiliesEx for other than default
C:\Develop\Lazarus\lcl\interfaces\qt\qtint.pp(259) Fatal: There were 1
errors compiling module, stopping

or by command line "make clean all LCL_PLATFORM=qt" :

...
...
...
Compiling qtwsforms.pp
Compiling qtwsmenus.pp
Compiling qtwsspin.pp
Compiling qtwsstdctrls.pp
qtwsstdctrls.pp(508,4) Note: User defined: implement TQtWSCustomListBox.SetColum
nCount
qtwsstdctrls.pp(1257,4) Note: User defined: implement TQtWSCustomComboBox.SetArr
owKeysTraverseList
Compiling qtwsdesigner.pp
Compiling qtthemes.pas
qtwinapi.inc(1181,7) Error: Can't determine which overloaded function to call
qtwinapi.inc(1485,5) Note: User defined: implement EnumFontFamiliesEx for other
than default
qtint.pp(259) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[3]: *** [interfaces.ppu] Error 1
make[3]: Leaving directory `c:/Develop/Lazarus/lcl/interfaces/qt'
make[2]: *** [qt_all] Error 2
make[2]: Leaving directory `c:/Develop/Lazarus/lcl/interfaces'
make[1]: *** [interfaces] Error 2
make[1]: Leaving directory `c:/Develop/Lazarus/lcl'
make: *** [lcl] Error 2

Can you help me?

Thanks,
Kjow

PS If I try to compile a QT demo, it is ok:

D:\Downloads\Lazarus\QT\Win\win_demos-V2.1_Qt4.5.3\demos-V2.1_Qt4.5.3\circles>fpc
circles.pas
Free Pascal Compiler version 2.5.1 [2010/02/22] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Win32 for i386
Compiling circles.pas
Compiling qt4.pas
Linking circles.exe
14170 lines compiled, 0.4 sec , 132768 bytes code, 27464 bytes data

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


Re: [Lazarus] QT: installaton error.

2010-02-23 Thread Kjow
2010/2/23 Den Jean :
> On Monday 22 February 2010 23:38:50 Kjow wrote:
>> qtwinapi.inc(1181,7) Error: Can't determine which overloaded function to
> call
>
> see patch here:
> http://lists.lazarus.freepascal.org/pipermail/qt/2010-February/001475.html
> and explanation here:
> http://lists.lazarus.freepascal.org/pipermail/qt/2010-February/001477.html
>
> the necessary update to lazarus trunk is in progress.

Thank you!

I tried to make the modify, and LCL builds ok, but when I try to
compile and run a project, I have this error:

"The procedure entry point _Z5qFreePv could not be located in the
dynamic link libaray QtCore4.dll"

I copied in the same dir of the exe builded, these files:

Qt4Pas5.dll
QtCore4.dll
mingwm10.dll

Thanks!
Kjow

PS I downloaded and installed: "Qt SDK for Windows* (287 MB)" from:
http://qt.nokia.com/downloads

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


Re: [Lazarus] QT: installaton error.

2010-02-23 Thread Kjow
2010/2/23 Kjow :
> "The procedure entry point _Z5qFreePv could not be located in the
> dynamic link libaray QtCore4.dll"

Solved.
I added to path:

C:\Program Files\QT\qt\bin

(the directory which contains "mingwm10.dll")
Now It seems to work well.

Bye :)

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


Re: [Lazarus] QT: installaton error.

2010-02-23 Thread Kjow
2010/2/23 Den Jean :
> Copying dlls around is a recipe for disaster. In the end
> after upgrading things, the wrong library will get loaded
> and you will not understand. Leave the Qt dlls in the
> Qt installation dir e.g. c:\Qt\4.5.3\bin, leave mingw dlls
> in e.g. c:\MinGW\bin. Both paths should be in the path
> env. variable. This way it is clear what gets called when.

I simply added to system path the qt's bin path, no file/dll copied.
I don't know how was the "old" 4.5.x path structure, but I simply
installed the latest qt v4.6.2 from Nokia site and added the path to
system variables.

But, now I have a little problem... A new project works well, but if I
change the widget from win32/64 from qt of an existing project Lazarus
returns this error:

Hint: Start of reading config file C:\Develop\fpc\2.5.1\bin\i386-Win32\fpc.cfg
Hint: End of reading config file C:\Develop\fpc\2.5.1\bin\i386-Win32\fpc.cfg
Free Pascal Compiler version 2.5.1 [2010/02/23] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Win32 for i386
Compiling fuel.lpr
PPU Loading C:\Develop\Lazarus\lcl\units\i386-win32\qt\qtint.ppu
PPU Source: qtint.pp not found
PPU Source: qtdefines.inc not found
PPU Source: qtwinapih.inc not found
PPU Source: qtlclintfh.inc not found
PPU Source: qtobject.inc not found
PPU Source: qtwinapi.inc not found
PPU Source: qtlclintf.inc not found
Recompiling qtint, checksum changed for qt4
qtint.pp(11,35) Fatal: Can't find unit qtint used by interfaces

How to solve this?

Thanks!
Kjow

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


Re: [Lazarus] QT: installaton error.

2010-02-23 Thread Kjow
2010/2/23 Kjow :
> How to solve this?

Solved.

I just removed lib directory in project folder.

Regards,
Kjow

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


[Lazarus] ComboBox height

2010-03-01 Thread Kjow
Hi all,

is it possible to modify combobox height? I tried to set autosize to
false, but I can't change the height.

Thanks,
Kjow

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


Re: [Lazarus] ComboBox height

2010-03-01 Thread Kjow

Il 01/03/2010 16:46, Vincent Snijders ha scritto:

Kjow schreef:

Hi all,

is it possible to modify combobox height? I tried to set autosize to
false, but I can't change the height.


That depends on the widget set and the style:
http://wiki.lazarus.freepascal.org/Lazarus_known_issues_%28things_that_will_never_be_fixed%29#TComboBox.Height 



Vincent

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


Thank you, Vincent!

Kjow

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


[Lazarus] Sdf Data Set

2010-03-01 Thread Kjow
Hi All,

I have a SdfDataSet component in my project. It works well, but I
can't load a file at designtime without an absolute path.
I need to specify (on "FileName" property) the full path e.g.:
c:\mypath\build\file.txt and change it at runtime e.g.
SdfDataSet1.FileName:= Application.Location+'file.txt';

How can I use relative path at designtime? (I build the project in a
sub-dir of lpi file)

It is nasty, because I'm developing it on two pc with different paths.


Thanks,
Kjow

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


[Lazarus] Division by Zero with latest svn

2010-03-12 Thread Kjow
Hi all,

I just updated fpc + lazarus with latest svn and now when I open any
of my already existing glscene projects I get "Division by Zero" error
on running the build... no problems with yesterday svn. Latest SVN of
GLScene is dated by 03/09/2010, so it is a lazarus/fpc problem.

No problems with old "standard" projects.

Thanks!
Kjow

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


[Lazarus] Run two build simultaneously

2010-03-13 Thread Kjow
Hi all,

is it possible to run two build of Lazarus simultaneously?

I mean that I would have two directory both with a different build, e.g.:

C:\Develop\lazarus-latest\
C:\Develop\lazarus-stable\

I have two nasty bugs with latest release:
http://mantis.freepascal.org/view.php?id=15971
http://bugs.freepascal.org/view.php?id=15972

so to make it working I need to run build 23932, but I want to stay
updated to know when bugs will be fixed. More generally I would have a
stable installation and a latest one.
But if I try to have two installations both will point everytime (in
options->lazarus directory) the same path.

Thanks,
Kjow

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


Re: [Lazarus] Run two build simultaneously

2010-03-13 Thread Kjow
2010/3/13 Paul van Helden :
> I create a config directory for each build and start them like this:
>
> c:\lazarus-latest\lazarus.exe --primary-config-path=c:\lazarus-latest\config
>
> c:\lazarus-stable\lazarus.exe --primary-config-path=c:\lazarus-stable\config
>
> Regards,
>
> Paul.

What do I need to put on each config dir? There aren't config
directory and I don't know if/where is a file (or just in regedit).

Thanks,
Kjow

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


Re: [Lazarus] Run two build simultaneously

2010-03-14 Thread Kjow
2010/3/13 Bart :
> c:\lazarus-latest\lazarus.exe --pcp=c:\lazarus-latest
> c:\lazarus-stable\lazarus.exe --pcp=c:\lazarus-stable

Thank you all,

This worked for me like a charm. Both lazarus dir have now their config files.

Regards,
Kjow

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


Re: [Lazarus] Run two build simultaneously

2010-03-15 Thread Kjow
2010/3/15 Vincent Snijders :
> What I usually do in such cases (assume c:\lazarus contains my lazarus 
> sources).
>
> svn up -r23932
> make clean bigide
> copy lazarus.exe lazarus.good.exe
> svn up
> lazarus.good.exe
> Then I have a stable lazarus executable, but can test the latest source.
>
> Vincent

Cause this bug (http://mantis.freepascal.org/view.php?id=15971) the
same config cause to resize everytime the IDE when using stable after
the latest svn...


Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-15 Thread Kjow
2010/3/13 ik :
> Hello,
>
> I've built lazarus today from few weeks ago to r23973. I had an open project
> while compiled Lazarus again.
> When Lazarus arrive back from compilation, it was unable to open the
> project. When I try to force it to open it, it just hangs until I'll kill
> it.
>
> I'm using Linux x86_64 with fpc 2.5.1
>
> What should I be looking for, before calling it a bug ?
>
> Thanks,
> Ido

I have a similar problem from ~r23957:
http://mantis.freepascal.org/view.php?id=15972

Try with r23932, it worked for me:
http://snapshots.lazarus.shikami.org/files/lazarus-0.9.29-23932-20100311-src.zip

Regards,
Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-15 Thread Kjow
2010/3/15 zeljko :
> Probably newautosize bug. Try to rebuild lazarus with -dOldAutoSize and then
> try again to open your project.
>
> zeljko

Building IDE with -dOldAutoSize option solves both these bug:

http://mantis.freepascal.org/view.php?id=15971
http://mantis.freepascal.org/view.php?id=15972

Thanks!
Kjow

PS what is the "newautosize function"?

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-15 Thread Kjow
2010/3/15 zeljko :
> Probably newautosize bug. Try to rebuild lazarus with -dOldAutoSize and then
> try again to open your project.
>
> zeljko

How to recompile from "command prompt" with -dOldAutoSize option?
I tried, but it doesn't like it...

>From "IDE->Advanced Build Option->options" No problems.


Thanks,
Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-15 Thread Kjow
2010/3/15 ik :
> On menu tools choose "Configure Build Lazarus"
> Then there use the tab "Advance build options"
> And there on the "Options" TEdit place your option (-dOldAutoSize)
>
> And then build Lazarus from there :)

Yes I know :)

>>> From "IDE->Advanced Build Option->options" No problems.

But I need to include this option on a script that update everyday my
lazarus revision to the latest, so I need a way to build lazarus IDE
by command prompt / terminal with this option :)


Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-15 Thread Kjow
2010/3/15 Vincent Snijders :
> If you did previously:
> make clean bigide
> now do:
> make clean bigide OPT="-dOldAutoSize"
>
> Vincent

Thanks, but now I have a question:

> make clean bigide (and so: make clean bigide OPT="-dOldAutoSize" )

is the command above the equivalent to this below?

lazbuild --build-ide=
(so, without option -dOldAutoSize)

Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-15 Thread Kjow
2010/3/15 Kjow :
>> make clean bigide (and so: make clean bigide OPT="-dOldAutoSize" )

I have an other question:

Can "make clean bigide" replace "make clean all" after an svn update?

Thanks,
Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-16 Thread Kjow
2010/3/16 Paul Ishenin :
> "make bigideclean bigide" installs just more packages than "make clean all"
> so you can use the first command after an svn update.
>
> Best regards,
> Paul Ishenin.

Thanks!

So I'm going to replace this:

...
cd C:\Develop\Lazarus
svn up
make clean all
lazbuild --build-ide=
strip --strip-all lazarus.exe
strip --strip-all lazbuild.exe
strip --strip-all startlazarus.exe
pause
exit

With this:

...
cd C:\Develop\Lazarus
svn up
make clean bigide OPT="-dOldAutoSize"
strip --strip-all lazarus.exe
strip --strip-all lazbuild.exe
strip --strip-all startlazarus.exe
pause
exit

Thank you,
Kjow

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


[Lazarus] make clean bigide

2010-03-16 Thread Kjow
Hi all,

I noticed that if I build Lazarus svn with "make clean bigide" or
"make clean all", it makes Lazarus without any extra packages (like
glscene).

There is a way/an option to build a lazarus svn update mantaining all
packages already installed? (e.g. like >> make clean bigide
OPT="-dOldAutoSize -allPackages")


As wrote in others email these days, I need to build Lazarus svn updates with:

make clean bigide OPT="-dOldAutoSize"

cause the bug newautosize.

Thanks,
Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-16 Thread Kjow
2010/3/16 Flávio Etrusco :
> Yes. You may also try to add FPCOPT="-Xg" to 'make', so you don't have
> to run strip ;-)
> Also, please note that this "OldAutoSize" is not "a solution", it's a
> temporary work-around to the new AutoSize code, which was introduced
> to resolve some fundamental issues. Mattias is very busy, but I'm sure
> he'll fix these soon :-)
>
> Best regards,
> Flávio

Thank you very much, your help is very apprecciated :)

Kjow

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


Re: [Lazarus] make clean bigide

2010-03-16 Thread Kjow
2010/3/16 Flávio Etrusco :
> "make clean" doesn't clean "bigide" files. You need to use "make bigideclean".
> "make all" is the same as "make", so it doesn't build additional components.

ok, so it will be:

make bigideclean bigide OPT="-dOldAutoSize" FPCOPT="-Xg"

> If you search the list you'll find about this command:
> ./lazbuild --build-all --build-ide=
>
> But maybe bigide should (be changed to) build with _all_ packages?
> Just wondering...

Umm... but if I run:

./lazbuild --build-all --build-ide=

after:

make bigideclean bigide OPT="-dOldAutoSize" FPCOPT="-Xg"

I will lose the -dOldAutoSize option... right?

Kjow

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


Re: [Lazarus] make clean bigide

2010-03-16 Thread Kjow
2010/3/16 waldo kitty :
> i would suspect so...
>
> since lazbuild works for you, your actual problem/question is
>
>   "how to pass -dOldAutoSize to/thru lazbuild?"
>
> /that/ is the question that needs to be answered for you to use lazbuild and
> get everything the way you want/need it...

Yes, it is!
Everytime I need to rebuild from IDE...

Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-16 Thread Kjow
2010/3/16 Paul Ishenin :
> make bigideclean bigide OPT="-dOldAutoSize -Xg"
> del lazarus.dbg
> del startlazarus.dbg
> del lazbuild.dbg
>
> Best regards,
> Paul Ishenin.

Ok, thank you so much.
Now I there is the problem how to compile every extra packages already
installed without lose -dOldAutoSize option.
(see latest email with topic: "make clean bigide")

Regards,
Kjow

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


Re: [Lazarus] make clean bigide

2010-03-16 Thread Kjow
2010/3/16 waldo kitty :
> actually, i think it has been given... after i wrote the above, there were
> several more in the thread... i had forgotten that you were doing a make
> before the lazbuild... vincent seems to have given the answer with the
> following??
>
> cd C:\Develop\Lazarus
> svn up
> make clean all OPT="-dOldAutoSize"
> lazbuild --build-ide=
> strip --strip-all lazarus.exe
> strip --strip-all lazbuild.exe
> strip --strip-all startlazarus.exe
> pause
> exit

This is my old script, now Paul and Vincent helped me and they wrote
this script:

> cd C:\Develop\Lazarus
> svn up
make bigideclean bigide OPT="-dOldAutoSize -Xg"
del lazarus.dbg
del startlazarus.dbg
del lazbuild.dbg
> pause
> exit

It works, but it doesn't add extra packages... I need to rebuild from
IDE to have extra packages...

> the only other question may be where to add the "-Xg" so you don't have to
> run "strip" or have you already danced that dance? ;)

The new script includes it and it works, but if I had to rebuild from
IDE to add extra packages it become useless...

> i like what you have there... can you tell what svn package that is? i'm on
> w2k on this machine so hopefully there's a version for it?

Umm... I'm sorry but I don't understand, what do you mean? I'm using
latest svn of Lazarus, FPC and GLScene on Windows7 and on Ubuntu 9.10

Regards,
Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-16 Thread Kjow
2010/3/16 Vincent Snijders :
> You don't need it, unless your packages implement different behavior
> depending on that define. You do need the -Xg.
>
> Vincent

Umm... Do you mean that depends by the package if there isn't between
the components after the build?
I'm writing about GLScene and if I build with:

make bigideclean bigide OPT="-dOldAutoSize -Xg"

I have all I need, but no GLScene.

The only way to have GLScene in the IDE is to build from ide.

Kjow

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


Re: [Lazarus] svn r23973 unable to open old projects

2010-03-16 Thread Kjow
2010/3/16 Vincent Snijders :
> What happens if you just do what I told you?
> http://lists.lazarus.freepascal.org/pipermail/lazarus/2010-March/050400.html

I'm sorry... but I did it and it didn't work for me... otherwise I
would not have asked again.
I'm a simple user of Lazarus, not a developer of it, so I don't know
what there is at the base.
I'm sorry to bother you all with my unknowledge (not sarcastic).

However, no way to include GLScene by command prompt building.

No problems, I'll wait a more stable "autosize" function to reuse my old script.

Thank you for help and the time spent with me,
Kjow :)

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


Re: [Lazarus] make clean bigide

2010-03-16 Thread Kjow
2010/3/17 waldo kitty :
> your script has "C:\blah" in it... that indicates a windows machine... you
> are doing a "svn up" in your script... i was asking what svn client you are
> using on your windows machine ;) it is probably a stupid question, though :?
>
> in all my years of coding, since at least 1975 or so, i've never used any
> type of version control programs... i've been curious about them but have
> just never figured out how they would fit into my workflow... i can guess
> that at least i'd have two more steps added... a checkout and a checkin but
> other than that ??? :?
>
> thanks for your responses... i enjoy reading and learning and hope to one
> day move on away from my ancient TP/BP 6/7 stuff and into the real world
> with all the GUI happenings...
>

Oh no... is not stupid question. I'm sorry, but I'm not
english/american, so sometime I don't understard clearly some nuances.

initially I used TortoiseSVN, but its functions are cendered on GUI,
so is it difficult to use by command prompt, then I discovered this:

http://subversion.tigris.org/ds/viewForumSummary.do?dsForumId=445

It has the same functions of linux svn client and it can be used
easily in scripts :)

I hope this was usefull :)
Best Regards,
Kjow

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


Re: [Lazarus] $500 of bounty

2010-03-17 Thread Kjow
2010/3/17 Antônio :
> There is a bounty of %500 fot "To setup Lazarus/FPC for arm-linux cross
> compiling" ( http://www.lazarus.freepascal.org/index.php/topic,8084.0.html )
> on the Wiki (
> http://wiki.lazarus.freepascal.org/Bounties#LAZARUS_RUNING_IN_A_LINUX_MACHINE_COMPILING_TO_ARM.2FLINUX_.24500_US_.3D.3D
> ).
>
> Good luck.

I wrote the tutorial and it works.
If you follow the instructions here:
http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM

you can cross compile from linux-i386 to linux-arm, only you need are
the destination library. I can build apps for Nokia N900 (that is an
arm-linux machine, it use Maemo5 a debian (arm) based distro).

Regards,
Kjow

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


Re: [Lazarus] $500 of bounty

2010-03-17 Thread Kjow
2010/3/18 Antônio :
> Should I interpret this as meaning that you do not want the $ 500?
>
> Antônio

No, I want simply tell you that there is already a way to build for
arm-linux with latest lazarus/fpc svn :)

Regards,
Kjow

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


Re: [Lazarus] $500 of bounty

2010-03-17 Thread Kjow
2010/3/18 Antônio :
> The advertiser is from a brazilian software company,
> http://www.mobilitysistemas.com.br/ .
>
> Antônio

Oh, I'm sorry. I thought that was you the one that wrote this bounty :)

Regards,
Kjow

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


Re: [Lazarus] $500 of bounty

2010-03-18 Thread Kjow
2010/3/18 Antônio :
> If you do not know how to receive international payment, or if you need some
> local support to do the task, let me know.
>
> Antônio

Hi :)
I don't understand if the turorial helped them to cross compile for
arm-linux or they need more help I tried to contact them, but no
replies.
They can contact me through lazarus forum, clicking my nick and
reading my email address in the profile or sending me a private
message in the forum:
http://forum.lazarus.freepascal.org/index.php/topic,8084.0.html

Best Regards,
Kjow

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


Re: [Lazarus] $500 of bounty

2010-03-18 Thread Kjow
2010/3/18 Antônio :
> >From what I understood, he read the tutorial but can not apply it properly.
>
> The reply shall come soon. Now it is 5h30 am in Brazil.
>
> Antônio

Ok, thank you very much!

I need to do some modify to it (I received some hints), so this can be
the right time to do this.

Best Regards,
Kjow

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


Re: [Lazarus] $500 of bounty

2010-03-18 Thread Kjow
2010/3/18 Silvio Clecio :
> Interestingly, he had asked me to do this. I prepared my environment to
> be able to help you, I lost my time with it. ¬¬
>
> I definitely do not understand people, especially the rushed.

Do you refer to me?

Kjow

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


[Lazarus] Webcam

2010-03-26 Thread Kjow
Hi all,

Do you know if there is a multiplatform component to view (and manage)
a webcam (Win, Linux, Mac)?

Thanks!

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


[Lazarus] Source code rows count

2010-04-03 Thread Kjow
Hi all,

Is there a way to know how many rows of source code there are on a project?
I mean a way to know some things:

1) Full lines count (all units + all comments)

2) Only "custom" units with comments

3) Only "custom" units without comments (this is the most important for me)

Thank you!
Kjow

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


[Lazarus] libQt4Pas.so for ARM

2010-04-07 Thread Kjow
Hi all,

is it possible to have a precompiled binary libQt4Pas.so for ARM (like
the one for X11 i386) downloadable from here
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html ?

I tried to make it myself, but I don't understand what to do...

Thanks!

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


[Lazarus] TMouseButton

2010-04-07 Thread Kjow
Hi all,

I need to create an "advanced" function that manages mouse events, so
I need to know when/which a button is pressed and so, when no button
is pressed.
I saw that in TMouseButton (row 142 of Controls unit) there isn't
mbNone, so I simply edited that row:

TMouseButton = (mbNone, mbLeft, mbRight, mbMiddle, mbExtra1, mbExtra2);

Now I can see when no buttons are pressed; I simply manage it with

MouseButtonPressed:=Button; //OnMouseDown

MouseButtonPressed:=mbNone; //OnMouseUp

Now the question: there is a better way to do this whitout modify the
Lazarus source code? It is a bug/missing feature or this is a feature?


Regards,
Kjow

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


Re: [Lazarus] TMouseButton

2010-04-07 Thread Kjow
2010/4/7 Paul Ishenin :
> As result you don't need mbNone. Just use [] to indicate that no button is
> pressed.

2010/4/7 Martin :
> I wouldn't recommend that change. Some units define
>  const  Foo = Array [TMouseButton] of String = (list of names for values);
>
> Those will break, because the count of the enum changed.
>
> Create a set
>
> type
>  TMouseButtons = set of  TMouseButton ;
> var
>  MouseButtonPressed: TMouseButtons;
>
> MouseButtonPressed := [];
> MouseButtonPressed := [mbLeft];
> MouseButtonPressed := [mbLeft, mbRight];
>
> and so on


Oh! Thank you both very much!

I searched for this, but nothing found!

:-)

Best regards,
Kjow

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


Re: [Lazarus] TMouseButton

2010-04-07 Thread Kjow
2010/4/7 Kjow :
>> As result you don't need mbNone. Just use [] to indicate that no button is
>> pressed.

> 2010/4/7 Martin :
>> Create a set

Other question... how to pass/read [] "vaule" to/in a function?

e.g.

function ButtonPress(Button: TMouseButton): string;
begin
  case Button of
   []: Result:='Nothing Pressed'; //e.g.
   mbLeft: Result:='mbLeft';
   mbRight: Result:='mbRight';
   mbMiddle: Result:='mbMiddle';
  end;
end;

and somewhere:

showmessage(ButtonPress([])); // [] -> e.g.

Thanks,
Kjow

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


Re: [Lazarus] TMouseButton

2010-04-07 Thread Kjow
2010/4/7 Vincent Snijders :
> What about:
>
> type
>  TMouseButtons = set of TMouseButton; // if it doesn't exist yet
>
> var
>  MouseButtonPressed: TMouseButtons;
>
>
>> MouseButtonPressed:=MouseButtonPressed + Button; //OnMouseDown
>
> Your mbNone becomes:
>> MouseButtonPressed:=[];
>
> Vincent

Thank you Vincent,

I tried, but

MouseButtonPressed:=[];

returns:

Error: Incompatible types: got "Empty Set" expected "TMouseButton"


and I don't know how to add Button to MouseButtonPressed...



Thanks,
Kjow

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


Re: [Lazarus] TMouseButton

2010-04-07 Thread Kjow
2010/4/7 Kjow :
> Error: Incompatible types: got "Empty Set" expected "TMouseButton"

Whops, I've mistyped, it works!
But how to read the values from a function?

e.g.

function ButtonPress(Button: TMouseButtons): string;
begin
  case Button of
...: Result:= 'you pressed' ;
  end;
end;

regards,
Kjow

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


Re: [Lazarus] TMouseButton

2010-04-07 Thread Kjow
2010/4/7 Kjow :
> 2010/4/7 Kjow :
>> Error: Incompatible types: got "Empty Set" expected "TMouseButton"
>
> Whops, I've mistyped, it works!
> But how to read the values from a function?
>
> e.g.
>
> function ButtonPress(Button: TMouseButtons): string;
> begin
>  case Button of
>    ...: Result:= 'you pressed' ;
>  end;
> end;

Ok, today is not my day :)
I'm sorry for this flooding :(

with

if mbLeft in Button then Result:='left';

I can manage the buttons, but what for nothing?

e.g.

 if [] in Button then Result:='nothing';

Thanks,
Kjow

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


Re: [Lazarus] TMouseButton

2010-04-07 Thread Kjow
2010/4/7 Martin :
> Case will not work.
>
> but
> mbleft, or mbLeft + any other button
>  if mbLeft in Buttons then xxx;
>
> for only mbLeft, no other button:
>  if Buttons = [mbLeft] then xxx;
>
> to add / remove ...
> Buttons := Buttons + mbLeft;
> Include(Buttons, mbLeft);
> Buttons := Buttons - mbLeft;
> Exclude(Buttons, mbLeft);

Thank you!

Now I understood that for 'nothing' I need to do:

if Button=[] then Result:='nothing';

And if I want a combination I need to provide any case

e.g. if Buttons = [mbLeft,mbRight] then xxx

Thank you very much to all,
you are great :)

Best Regards,
Kjow

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


Re: [Lazarus] libQt4Pas.so for ARM

2010-04-07 Thread Kjow
2010/4/7 Den Jean :
> On Wednesday 07 April 2010 11:13:16 Kjow wrote:
>> I tried to make it myself, but I don't understand what to do...
>
> An arm binary is too dependent of the arm target platform characteristics.
> What is the target arm platform ?

I need Maemo 5 / MeeGo target.

The first is a debian based distro, the 2nd will be compatible with Maemo.

Thanks!
Kjow

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


Re: [Lazarus] libQt4Pas.so for ARM

2010-04-08 Thread Kjow
2010/4/8 Den Jean :
> On Wednesday 07 April 2010 22:06:34 Kjow wrote:
>> I need Maemo 5 / MeeGo target.
> and I need a N900 :-)
>
> Created using scratchbox:
> http://users.telenet.be/Jan.Van.hijfte/qtforfpc/maemo5_bin-qt4pas-V2.2_Qt4.5.3.tar.gz
> You may want to strip the lib.
> New platform MAEMO5 was defined
> if you compile a fpc qt4 app or lazarus/qt, define MAEMO5.
>
> Not tested because no H/W available
> and also Maemo scratchbox arm graphics do not work yet.
>
> regards,
>
> Den Jean

Thank you very much! :)

libQT4.Pas.so is accepted by linker, but now... do you know where can
I found the other libraries requested by ld? (like libQtWebKit.so etc)
I can't find these in my device, and on the web I found "only" the sources...

Thanks!
Kjow

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


[Lazarus] FPC 2.4.0 svn

2010-04-09 Thread Kjow
Hi all,

I can't find the SVN of stable FPC 2.4.0, can you give me it?

Thanks,
Kjow

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


Re: [Lazarus] FPC 2.4.0 svn

2010-04-09 Thread Kjow
2010/4/9 Michael Van Canneyt :
> It is at
>
> http://svn.freepascal.org/svn/fpc/branches/fixes_2_4/
>
> Michael.

Oh thank you!
I was in confusion, cause "fixes"; so downloading from this svn is the
same thing that download the FPC 2.4.0 snapshot here:
http://www.hu.freepascal.org/lazarus/
Is it right?

Thanks,
Kjow

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


[Lazarus] FPC 2.4.0 vs 2.5.1

2010-04-09 Thread Kjow
Hi again :)

which are the real differences between FPC 2.4.0 and FPC 2.5.1?
I know that to develop for arm, FPC 2.5.1 is better, but some
components (like GLScene CVS doesn't work with FPC 2.5.1)... so, which
differences between FPC 2.4.0 and 2.5.1? And which is the best for
general purpose?

Thanks,
Kjow

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


Re: [Lazarus] FPC 2.4.0 vs 2.5.1

2010-04-09 Thread Kjow
2010/4/9 Michael Van Canneyt :
> There are too many to say. 2.5.1 is a development version, and
> can in theory be very unstable.

Umm.. what I mean is that FPC 2.5.1 has only more functions or if it
generates code more speeder, etc... so something in general :)

> I would recommend 2.4.0
>
> If you want to develop for arm, maybe you can request merging of some
> arm-related fixes from 2.5.1 to 2.4.0.

Ok, at moment I'm using 2.5.1 only, so I can make two different
config: a general purpose with 2.4.0 (major project/pc) and an arm
specific platform with 2.5.1 (arm device only).

Thank you very much, Michael!
Best Regards,
Kjow

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


Re: [Lazarus] FPC 2.4.0 svn

2010-04-09 Thread Kjow
2010/4/9 Vincent Snijders :
> http://svn.freepascal.org/svn/fpc/tags/release_2_4_0/

Thank you Vincent!

Best Regards,
Kjow

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


Re: [Lazarus] libQt4Pas.so for ARM

2010-04-09 Thread Kjow
2010/4/9 Den Jean :
> learn about apt-get, apt-cache search and google :-)
> http://talk.maemo.org/showthread.php?t=46785
> at first glance it probably is:
> apt-get update
> apt-get install libqt4-maemo5-*

Thank you!
This thread is very useful, I installed the libraries and I copied
them on the same dir of other libs, but still not working:

Hint: Start of reading config file /home/kjow/.fpc.cfg
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Hint: End of reading config file /home/kjow/.fpc.cfg
Free Pascal Compiler version 2.5.1 [2010/04/06] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for ARMEL
Compiling TestQT.lpr
Assembling testqt
Compiling resource /mnt/Condivisa/Progetti/TestQT/lib/arm-linux/TestQT.or
Linking TestQT
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtWebKit.so.4, needed
by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtGui.so.4, needed by
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtNetwork.so.4, needed
by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtCore.so.4, needed by
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libpthread.so.0, needed
by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libstdc++.so.6, needed by
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libm.so.6, needed by
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libgcc_s.so.1, needed by
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using
-rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: ld-linux.so.3, needed by
/mnt/Condivisa/Lazarus/libcross/libc.so, not found (try using -rpath
or -rpath-link)
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to
`QPlainTextEdit::setReadOnly(bool)'
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to
`QPlainTextEdit::setTextInteractionFlags(QFlags)'
...
a lot of similar rows after
...
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to
`QMimeData::hasHtml() const'
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to
`QString::replace(QLatin1String const&, QLatin1String const&,
Qt::CaseSensitivity)'
TestQT.lpr(21) Error: Error while linking
TestQT.lpr(21) Fatal: There were 1 errors compiling module, stopping


where do I need to use " (try using -rpath or -rpath-link)"?

Thanks!
Kjow

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


Re: [Lazarus] libQt4Pas.so for ARM

2010-04-09 Thread Kjow
2010/4/9 Den Jean :
> on your device you need the libs (libqt4-maemo5*)
> on the cross development platform you also need the devel libs
> (links named .so to actual libs)
> apt-get install libqt4-dev or something like that
> (search with apt-cache search qt4)
>
> general info about libMyLibName.so.X.Y... :
> http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html

Umm... but I have the files in the path (e.g. libQtWebKit.so.4)
I installed by apt-get all libQt* for maemo-arm:

I added the repos:

deb http://repository.maemo.org/extras/ fremantle free non-free
deb-src http://repository.maemo.org/extras/ fremantle free
deb http://repository.maemo.org/extras-devel/ fremantle free non-free
deb-src http://repository.maemo.org/extras-devel/ fremantle free

And typed:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libqt4-maemo5-*

than I copied all libQt* from /usr/lib/debug/opt/qt4-maemo5/lib/libQt*
to the path where I have all other target libraries:

cp /usr/lib/debug/opt/qt4-maemo5/lib/libQt* /mnt/Condivisa/Lazarus/libcross/

and I renamed from *.4.6.2 to *.4

so now I have all libQt*.so.4 in the path.

I noticied that generally when ld doesn't find a compatble target
library, it advise me writing that the file (e.g. libQtWebKit.so.4) is
not compatible, but now it doesn't find it (e.g. it ask for
libQtWebKit.so.4, but libQtWebKit.so.4 is in the project path:
see: 
http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM#Add_target_libs_to_your_project
)

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


Re: [Lazarus] libQt4Pas.so for ARM

2010-04-10 Thread Kjow
2010/4/9 Den Jean :
> On Friday 09 April 2010 21:46:39 Kjow wrote:

Too often things are taken for granted by experts.
Too often things are too cryptic and not enough explained.
Almost always, who doesn't know certain arguments will learn it
himself, and if there isn't a clear explaination, will be used many
useless words.

>> 2010/4/9 Den Jean :
>> > on your device you need the libs (libqt4-maemo5*)
>> > on the cross development platform you also need the devel libs
>> > (links named .so to actual libs)
> read this ?!

Yes, but...

>> > apt-get install libqt4-dev or something like that
>> > (search with apt-cache search qt4)
>> >
>> > general info about libMyLibName.so.X.Y... :
>> > http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-librarie
>> >s.html
> read this ?!

Yes, but...

> that was dangerous, do not do this unless
> you understand what you do, especially after adding repositories.

I know what these commands mean.
However... it is wrote in the link you posted:
http://talk.maemo.org/showpost.php?p=561366&postcount=5

>> and I renamed from *.4.6.2 to *.4
>ahum

ehm...

> http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM#Add_target_libs_to_your_project
> didn't read all of this wiki, but please fix the thing about renaming files:
> quote:"...and you have a file called libX11.so.6.2.0 you need to rename it.."
> you should only add links

I simply found a way that works, no one told me it before that was
wrong... so what you suggest to write?

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


Re: [Lazarus] libQt4Pas.so for ARM

2010-04-13 Thread Kjow
2010/4/10 Den Jean :
> Above should have been clear after reading the provided url, I hope it is 
> less cryptic now.
> So if you are in a situation that you miss a .so and only have a .so.6, you
> should not start renaming things, but just add file links or install the 
> devel package for that library.

Thank you very much; I'll read all with more calm later, unfortunately
these days I have no time.

Best Regards,
Kjow

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


[Lazarus] OOP basics

2010-04-14 Thread Kjow
Hi all,

I need to pass a my custom TMainForm to a function on other unit, e.g.

main unit:

...
uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, test;

type

TMainForm

  TMainForm = class(TForm)
...
procedure FormCreate(Sender: TObject);
  private
{ private declarations }
x:integer;
...
  public
{ public declarations }
y: integer;
...
  end;

___

Other unit "test.pas":

unit test;

{$mode objfpc}{$H+}

interface

uses
  third;

procedure init(...; ...; var Form: TMainForm);

implementation

procedure init(...; ...; var Form: TMainForm);
begin
...
Form.y:=0;
end;

___

Is it possible?

PS I'm sorry for this example, maybe it is not perfect, I wrote it on the fly.

Thanks,
Kjow

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


[Lazarus] unit not found: Unit1

2010-04-14 Thread Kjow
Hi,

I started a new project and I saved to a folder renaming (Save as...)
the default "Unit1.pas" to "main.pas".

When I try to create a new event (double click on event, like Form
OnCreate) I get this error:

main.pas(8,49) Error: unit not found: Unit1

NOTE: the project compiles, builds and runs well and I can create all
events I want of components (like buttons "OnClick")

If I save the project leaving the default "uni1.pas" there are not problems.


I'm using Lazarus' r24617.

Regards,
Kjow

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


[Lazarus] unit not found: Unit1

2010-04-14 Thread Kjow
Hi,

I started a new project and I saved to a folder renaming (Save as...)
the default "Unit1.pas" to "main.pas".

When I try to create a new event (double click on event, like Form
OnCreate) I get this error:

main.pas(8,49) Error: unit not found: Unit1

NOTE: the project compiles, builds and runs well and I can create all
events I want of components (like buttons "OnClick")

If I save the project leaving the default "uni1.pas" there are not problems.


I'm using Lazarus' r24617.

Regards,
Kjow

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


[Lazarus] OOP basics - 2

2010-04-14 Thread Kjow
I'm sorry for the first email, it was a bit confusing.

Now, I created a project to make more clear what I mean. Take it as a
stupid example, I need this to make more "advanced" things:



unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  unit2, unit3;

type

  { TForm1 }

  TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
  private
{ private declarations }
  public
{ public declarations }
x,y: integer;
tester1: TTest;
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
  init(1,2);
  ShowMessage('Result: '+IntToStr(tester1.test(x,y)));
end;

end.



unit Unit2;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, unit1, unit3;

procedure init(a,b: integer; MainForm: TForm1);

implementation

var
  tester2: TTest;

procedure init(a,b: integer; MainForm: TForm1);
begin
  MainForm.x:=tester2.test(a,b);
  MainForm.y:=tester2.test(a,-b);
end;

end.



unit Unit3;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils;

Type
 TTest = class
  a: byte;
  b: byte;
  function test(x,y: integer): integer;
 end;

implementation

function TTest.test(x,y: integer): integer;
begin
 Result:=x+y;
end;

end.



Obviously I can't declare unit1 on unit2's "uses", because:

unit2.pas(8,27) Fatal: Circular unit reference between Unit2 and Unit1


So, how I can make it?

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


Re: [Lazarus] OOP basics - 2

2010-04-14 Thread Kjow
2010/4/14 Paul Ishenin :
> Why not to move init to the TForm1?
>
> Such problems are often happen when either you don't own a piece of code and
> therefore can't modify it or your code is designed bad.

It is simply a trivial example :)

It is at the base of an idea to make a "general" unit that can be used
between more projects, so I want avoid to make copy/paste everytime
the same functions. Often I forgot something... with a "generic" unit
that initialize some "standard things" I can do it easily.

Best Regards,
Kjow

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


Re: [Lazarus] OOP basics - 2

2010-04-14 Thread Kjow
2010/4/14 Michael Van Canneyt :
> Put unit2 in the implementation uses list of unit1. Then it should work.
>
> Michael.

Ohh, thank you!
It works :)

I have an other question (just to know if it is possible and how):

if I want to implement the function:

function TTest.test(x,y: integer): integer;
begin
 Result:=x+y;
end;

on Unit2, so I want to leave all things at the same place, but copy
this function on Unit2: is it possible to declare methods and
implement its on different unit?

Thanks,
Kjow

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


  1   2   3   4   5   >