Re: [lazarus] TOpendialog.InitialDir

2007-05-30 Thread Graeme Geldenhuys

On 5/30/07, Alain Michaud [EMAIL PROTECTED] wrote:

the content is empty of course because it is not mounted!

Would anyone know how to mount the floppy from inside the lazarus
application?


Doesn't the Linux 'automount' take care of that for you?

Graeme.

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


Re: [lazarus] Reducing Flickeron a TImage component

2007-05-30 Thread A.J. Venter


It seems, gtk_pixmap is creating the disabled image on-the-fly on first
paint. So, the flickering is built-in. Because you change the image
often, you see it often.
Conclusion:
gtk1+TBitBtn+disabled = flicker

So the short version is - that GTK1 couldn't do what I needed (a
dynamically updated but often disabled set of buttons with pictures on
them) without creating a new component. It turned out to be far less
work to just port this part of the program to GTK2, the rest remains
GTK1 for now (there are three apps that make up the suite here) simply
because fixing all the layouts etc. for GTK2 would take a LONG time
(and worst of all GTK2 is still horrible with Z-order handling) but
this part works just fine under GTK2 - and as per your predictions,
the GTK2 version is completely flicker free.

For the next OutKafe release (which I will start on after I return
from this project on Friday) I will port it to GTK2 in it's entirety
(it can be done now that SetWindowFulScreen works for GTK2) however.
A.J.
--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] Reducing Flickeron a TImage component

2007-05-30 Thread Mattias Gaertner
On Wed, 30 May 2007 10:34:45 +0200
A.J. Venter [EMAIL PROTECTED] wrote:

 
  It seems, gtk_pixmap is creating the disabled image on-the-fly on
  first paint. So, the flickering is built-in. Because you change the
  image often, you see it often.
  Conclusion:
  gtk1+TBitBtn+disabled = flicker
 So the short version is - that GTK1 couldn't do what I needed (a
 dynamically updated but often disabled set of buttons with pictures on
 them) without creating a new component. 

Maybe you can try TSpeedButton instead of TBitBtn.

 It turned out to be far less
 work to just port this part of the program to GTK2, the rest remains
 GTK1 for now (there are three apps that make up the suite here) simply
 because fixing all the layouts etc. for GTK2 would take a LONG time
 (and worst of all GTK2 is still horrible with Z-order handling) but
 this part works just fine under GTK2 - and as per your predictions,
 the GTK2 version is completely flicker free.
 
 For the next OutKafe release (which I will start on after I return
 from this project on Friday) I will port it to GTK2 in it's entirety
 (it can be done now that SetWindowFulScreen works for GTK2) however.
 A.J.

The gtk2 intf is currently under heavy development. This can be good or
bad for your project.


Mattias

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


Re: [lazarus] Reducing Flickeron a TImage component

2007-05-30 Thread A.J. Venter

  gtk1+TBitBtn+disabled = flicker
 So the short version is - that GTK1 couldn't do what I needed (a
 dynamically updated but often disabled set of buttons with pictures on
 them) without creating a new component.

Maybe you can try TSpeedButton instead of TBitBtn.

That would only work if I painted the Caption myself would it not ? In
which case... it gets even MORE custom painting... not sure it's worth
it.

 For the next OutKafe release (which I will start on after I return
 from this project on Friday) I will port it to GTK2 in it's entirety
 (it can be done now that SetWindowFulScreen works for GTK2) however.
 A.J.

The gtk2 intf is currently under heavy development. This can be good or
bad for your project.

For OutKafe it's probably a good thing, for CAN it's less good as
stability is more important and this is just phase1 of a large
multiphase project that will take many more months if not years to
finish. That is the major reason I ONLY migrated the admin console
despite the fact that the client could work too, it reduces the impact
of unexpected changes in the gtk2 interface. Appart from the dynamic
bitbuttons, it's really a pretty simple interface so it works fine.

Ciao
A.J.
--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] Strange bug with SQLQuery.Close

2007-05-30 Thread fedorax
Selon Joost van der Sluis [EMAIL PROTECTED]:

 On Sat, 2007-05-26 at 15:00 +0200, fedorax wrote:

  I've a strange bug. In this fonction ( Which was worked perfectly from few
  months an never chage ).
  --
  procedure TFunc_Sql.List_TablesSelectionChange(Sender: TObject; User:
 boolean);
  begin
If List_Tables.ItemIndex0 then List_Tables.ItemIndex:=0;
T_Name:=List_Tables.Items[List_Tables.ItemIndex]; // The selected table
 name
If SQLQuery.Active Then SQLQuery.Close; // Close the precedent query
SQLQuery.SQL.Text:='Select * From '+ T_Name;
SQLQuery.Open;  //Open to list in DbGrid
  end;
  --
  The line   If SQLQuery.Active Then SQLQuery.Close; cause an access
 violation
  and close the application without visible cause.

 My guess is that you've destroyed/freed SQLQuery somewhere before this
 code is called.

 Joost

Not that, the SQLComponent is put on the form and no instruction exist for free
it. Is it possible that a bug free a component without programmer ask to it ?

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



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


Re: [lazarus] Zeos Lib Question

2007-05-30 Thread Charl van Jaarsveldt

Lee,

I had another look at this and found that Zeos is trying to use
libsqlite.soto connect to sqlite3. So, I thought I'd change the code
but then had
endless trouble to recompile :-( and in my efforts to recompile I changed it
back to what it was (lol).

Anyways, in the end it was easiest to create a link /usr/lib/libsqlite.so -
/usr/lib/sqlite3.so. It works like a charm. :-)

Mmm, I just saw you were on Windows. This means I am confused again since
the windows driver is specified as sqlite3.dll. Perhaps you could check that
the installation of sqlite3 has its dll called sqlite.dll or sqlite3.dll.
This is the only thing I can think of.

Charl

On 5/24/07, Charl van Jaarsveldt [EMAIL PROTECTED] wrote:


Hi,

I just tried it two days ago and had the same problem, though I am on
linux. The sqliteDataSet that comes with lazarus works fine, so I'd say the
library is installed correctly.

Charl

On 5/23/07, Lee Jenkins [EMAIL PROTECTED] wrote:

 dayat wrote:
  may be you can put the sqlite3.dll into C:\Windows\System32
 
  On 5/18/07, *Lee Jenkins* [EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] wrote:
 
 

 Tried that too.  Didn't work.


 --

 Warm Regards,

 Lee



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




--
I love deadlines. I especially love the whooshing sound they make as they
fly by. - Douglas Adams





--
I love deadlines. I especially love the whooshing sound they make as they
fly by. - Douglas Adams


[lazarus] Error: Undefined symbol

2007-05-30 Thread Roland Turcan
Hello lazarus project!

During compilation of Lazarus after adding new units into component
package I get this error message:

C:\lazarus\ide\lazarus.pp(117,1) Error: Undefined symbol:
RESOURCESTRINGLIST_MSGDLGS

MSGDLGS.pas is my unit and I have set the path to that file in
Package/Compiler Option/Paths/Other Unit Files and I also have added
it into package as unit without register unit flag.

Could somebody explain me, where to set path for compiler, which is
used for Lazarus compilation.

Compilation of my package goes fine, I have this error only during
Lazarus compilation.

-- 
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Felipe Monteiro de Carvalho

On 5/26/07, Tom Gregorovic [EMAIL PROTECTED] wrote:

I have encoutered the same problem. Debugging from IDE does not
function, because it's trying to debug the executable instead of app.
bundle. Manually via terminal (command: gdb project.app) there is no
problem.


I tryed to debug an application on the command line, and it seams that
gdb is confusing the fpc rtl source files with my own source files.
Just look at this:

(gdb) break fpc_raiseexception
Breakpoint 1 at 0x19bc06: file GR32_MicroTiles.pas, line 250.

of course this breakpoint should be going to an fpc rtl function.
There is nothing remotely related to exception handling on
GR32_MicroTiles

Has anyone seen this kind of problem before?

thanks,
--
Felipe Monteiro de Carvalho

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


[lazarus] Problem during build last release

2007-05-30 Thread Guadagnini David

During the build of the last release I have the follow error:

C:\lazarus\components\lazreport\source\LR_Class.pas(72,1) Fatal: 
Internal error 200310221


I try the compile with full build, clean and build but is the same

Computer: Windows 2000 Professional (Service Pack 4)
Lazarus in build: 0.9.23 beta (Revision SVN: 11226)
Current Lazarus version: 0.9.23 beta (Revision SVN: 11063)

Some Ideas?

begin:vcard
fn:David Guadagnini
n:Guadagnini;David
org:Biotecnica Instruments S.p.A.;RD
adr:;;Via Licenza 18;Roma;RM;00133;Italy
email;internet:[EMAIL PROTECTED]
title:Software architet
tel;work:+39064112616
x-mozilla-html:FALSE
version:2.1
end:vcard



Re: [lazarus] Strange bug with SQLQuery.Close

2007-05-30 Thread Bram Kuijvenhoven

fedorax wrote:

Selon Joost van der Sluis [EMAIL PROTECTED]:


On Sat, 2007-05-26 at 15:00 +0200, fedorax wrote:


I've a strange bug. In this fonction ( Which was worked perfectly from few
months an never chage ).
--
procedure TFunc_Sql.List_TablesSelectionChange(Sender: TObject; User:

boolean);

begin
  If List_Tables.ItemIndex0 then List_Tables.ItemIndex:=0;
  T_Name:=List_Tables.Items[List_Tables.ItemIndex]; // The selected table

name

  If SQLQuery.Active Then SQLQuery.Close; // Close the precedent query
  SQLQuery.SQL.Text:='Select * From '+ T_Name;
  SQLQuery.Open;  //Open to list in DbGrid
end;
--
The line   If SQLQuery.Active Then SQLQuery.Close; cause an access

violation

and close the application without visible cause.

My guess is that you've destroyed/freed SQLQuery somewhere before this
code is called.

Joost


Not that, the SQLComponent is put on the form and no instruction exist for free
it. Is it possible that a bug free a component without programmer ask to it ?


A component is freed when its Owner is destroyed (in this case the form), so as 
long as you don't free the form or SQLQuery by hand, all should be ok.

To track the cause of the exception, you probably need to get a stacktrace; 
e.g. use GDB or Lazarus itself. Hint for GDB:

break FPC_RAISEEXCEPTION
run
...
bt

You can insert ShowMessage of DebugLn statements to find out what your 
application is doing.

Regards,

Bram

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Felipe Monteiro de Carvalho

On 5/26/07, Marc Weustink [EMAIL PROTECTED] wrote:

A way to work around this is:
Create an app bundle in your project dir and symlink the exe inside the
bundle to the compiled exe in the project dir. Then for debugging set
Run parameters - host application to yourbundle.app


The work around doesn't seam to work. When pressing F9 (actually
control+F9 on mac), Lazarus will complain that myboundle.app isn't an
executable

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Error: Undefined symbol

2007-05-30 Thread Mattias Gaertner
On Wed, 30 May 2007 14:56:39 +0200
Roland Turcan [EMAIL PROTECTED] wrote:

 Hello lazarus project!
 
 During compilation of Lazarus after adding new units into component
 package I get this error message:
 
 C:\lazarus\ide\lazarus.pp(117,1) Error: Undefined symbol:
 RESOURCESTRINGLIST_MSGDLGS

Looks like a linker error or a compiler bug.

 
 MSGDLGS.pas is my unit and I have set the path to that file in
 Package/Compiler Option/Paths/Other Unit Files and I also have added
 it into package as unit without register unit flag.

FPC can find the sources, otherwise there would be another error.

 
 Could somebody explain me, where to set path for compiler, which is
 used for Lazarus compilation.

It uses the default compiler (%PATH% environment variable).

 
 Compilation of my package goes fine, I have this error only during
 Lazarus compilation.

Did you try the released compiler fpc 2.0.4?

Mattias
 

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


[lazarus] Event Click on Form

2007-05-30 Thread Darmawan Sugiarto
Hello 
I want to detect when my mouse click on my form then I can drag It. In Delphi 
programming I can used this code.

procedure TLoginForm.NCHitTest(var _Msg:TMessage);
begin
  inherited;
  if _Msg.Result=HTCLIENT then _Msg.Result:=HTCAPTION;
end;

But in Lazarus I can find HTCLIENT and HTCAPTION

Please help me...


=INTOSOFT
   ALEXIO CHAOS
   [EMAIL PROTECTED]   
  Yahoo Messager
=
   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. 

Re: [lazarus] Reducing Flickeron a TImage component

2007-05-30 Thread Mattias Gaertner
On Wed, 30 May 2007 13:56:55 +0200
A.J. Venter [EMAIL PROTECTED] wrote:

gtk1+TBitBtn+disabled = flicker
   So the short version is - that GTK1 couldn't do what I needed (a
   dynamically updated but often disabled set of buttons with
   pictures on them) without creating a new component.
 
  Maybe you can try TSpeedButton instead of TBitBtn.
 That would only work if I painted the Caption myself would it not ? 

TSpeedButton has a Caption. Default is ''.


 In
 which case... it gets even MORE custom painting... not sure it's worth
 it.

Did you try?


   For the next OutKafe release (which I will start on after I return
   from this project on Friday) I will port it to GTK2 in it's
   entirety (it can be done now that SetWindowFulScreen works for
   GTK2) however. A.J.
 
  The gtk2 intf is currently under heavy development. This can be
  good or bad for your project.
 For OutKafe it's probably a good thing, for CAN it's less good as
 stability is more important and this is just phase1 of a large
 multiphase project that will take many more months if not years to
 finish. That is the major reason I ONLY migrated the admin console
 despite the fact that the client could work too, it reduces the impact
 of unexpected changes in the gtk2 interface. Appart from the dynamic
 bitbuttons, it's really a pretty simple interface so it works fine.


Mattias

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


Re: [lazarus] Problem during build last release

2007-05-30 Thread Vincent Snijders

Guadagnini David schreef:

During the build of the last release I have the follow error:

C:\lazarus\components\lazreport\source\LR_Class.pas(72,1) Fatal: 
Internal error 200310221


I try the compile with full build, clean and build but is the same

Computer: Windows 2000 Professional (Service Pack 4)
Lazarus in build: 0.9.23 beta (Revision SVN: 11226)
Current Lazarus version: 0.9.23 beta (Revision SVN: 11063)

Some Ideas?



What fpc version did you use?

Vincent

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Tom Gregorovic

Felipe Monteiro de Carvalho napsal(a):


On 5/26/07, Marc Weustink [EMAIL PROTECTED] wrote:


A way to work around this is:
Create an app bundle in your project dir and symlink the exe inside the
bundle to the compiled exe in the project dir. Then for debugging set
Run parameters - host application to yourbundle.app



The work around doesn't seam to work. When pressing F9 (actually
control+F9 on mac), Lazarus will complain that myboundle.app isn't an
executable


Hi,
I am working on running/debugging Application bundles under Carbon 
option for Lazarus IDE.

I will test it tomorrow and if it succeeds, I commit it.

Tom

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


Re[2]: [lazarus] Error: Undefined symbol

2007-05-30 Thread Roland Turcan
 30.5.2007 19:29 - Mattias Gaertner [EMAIL PROTECTED] 
MG On Wed, 30 May 2007 14:56:39 +0200
MG Roland Turcan [EMAIL PROTECTED] wrote:

 Hello lazarus project!
 
 During compilation of Lazarus after adding new units into component
 package I get this error message:
 
 C:\lazarus\ide\lazarus.pp(117,1) Error: Undefined symbol:
 RESOURCESTRINGLIST_MSGDLGS

MG Looks like a linker error or a compiler bug.

Then it is second I have found since I started to use it three weeks
ago. :-|

MG  
 MSGDLGS.pas is my unit and I have set the path to that file in
 Package/Compiler Option/Paths/Other Unit Files and I also have added
 it into package as unit without register unit flag.

MG FPC can find the sources, otherwise there would be another error.

:-|

MG  
 Could somebody explain me, where to set path for compiler, which is
 used for Lazarus compilation.

MG It uses the default compiler (%PATH% environment variable).

 Compilation of my package goes fine, I have this error only during
 Lazarus compilation.

MG Did you try the released compiler fpc 2.0.4?

After reading this email I have checked what I had set in environment
and I have found out, that PATH contained value to old FPC 2.0.2. But
during compilation I have seen, that fpc 2.1.5 directory from Lazarus
is called, because I use SVN from 15.5.2007.

Settings in Lazarus point to c:\lazarus\fpc\2.1.5\... directories.

How can I report it in more details, what exactly happens?

This is complete messages window:

 Compile IDE (without linking) completed
 Compiling package rotursoft 0.1.1 completed
 C:\lazarus\ide\lazarus.pp(117,1) Error: Undefined symbol: 
 RESOURCESTRINGLIST_MSGDLGS
 C:\lazarus\ide\lazarus.pp(117,1) Fatal: There were 1 errors compiling module, 
 stopping

MG Mattias

-- 
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Vincent Snijders

Tom Gregorovic schreef:

Hi,
I am working on running/debugging Application bundles under Carbon 
option for Lazarus IDE.

I will test it tomorrow and if it succeeds, I commit it.


Tom, I was wondering how far are you from running the IDE based on the 
carbon widgetset? Or do you already run a carbon based IDE?


Vincent

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


Re: [lazarus] Reducing Flickeron a TImage component

2007-05-30 Thread A.J. Venter

  Maybe you can try TSpeedButton instead of TBitBtn.
 That would only work if I painted the Caption myself would it not ?

TSpeedButton has a Caption. Default is ''.


 In
 which case... it gets even MORE custom painting... not sure it's worth
 it.

Did you try?

Heh, point made :)
Question then: so what IS the difference between TBitBtn and
TSpeedButton ? In general, but also specifially before it's worth
trying, it's worth knowing if their disabled paint code are in fact
different.

A.J.
--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] TOpendialog.InitialDir

2007-05-30 Thread A.J. Venter

Hey Alain, let me try to help/

On 5/30/07, Alain Michaud [EMAIL PROTECTED] wrote:

Hi,

 thank you all for the answers. I have many hints now: enough to keep me
busy for many hours:

--- My fstab does not say anything about .../floppy... That does not
seem normal?

It is in fact normal with many modern distro's (I don't know what you
are running), there is no requirement even on older ones, but NOT
having it there would mean there is no way to make the device user
mountable (by default only root could run mount $DEVICE $MOUNTPOINT)


--- My code does not have to be portable, but the users are Microsoft
oriented and I find it very difficult to sell my Linux/FPC/Lazarus
code. For me, opening the floppy before I run the application is easy,
but for my users, it seems like an impossible task... Their next step
would be to press the reset button !

I hear you, I often used to face the same issues, on most modern
distros the floppy would open itself when inserted, I'm guessing this
is NOT one of those. Assuming you can mount it with a simple command,
I think the easiest is to just call the command from your app before
running the dialog, another way would be to use the kernel automouter
(there's a howto) which will mount the device whenever the mountpoint
is accessed, and unmount it after X seconds inactivity.


--- One colleague told me about mtools utility that will access the
floppy without going through the file system. I do not know if there is
a library or some programing interface?

Mtools does exist, it is specific to dos floppies, it accesses them in
a different way though. It can do things like copy files etc.
Konqueror has a kpart which uses it so either it DOES have an API of
some sort or you can read disks and manage their content pretty
completely with the commandline tools it includes - if you wish to try
this, I would suggest reading up on the mtools howto.


--- Now I year all the laughs because I still use floppy disks:

We still have an old network analyser (model 8510C) from Hewlet Packard:
It is very old (1990), but very expensive to replace. It has a 720 kB
flopy drive built in it. Any upgrade will be difficult because of
compatibilty issue. I already feel very lucky that it will write on DOS
formatted floppys.

That explains it  - no worries.
If you let me know which distro you're using, I could possibly give
more specific advice.

A.J.


Thank you all any way

Alain

On Wed, 2007-05-30 at 08:58 +0200, A.J. Venter wrote:
 As far as I know, the only way is to fire up a tprocess and launch the
 actual mount command.
 Of course if you want your program to be truly portable it should be
 configurable where it opens (many distro's mount removeable stuff
 under /media these days - and many of them  don't use traditional
 mounting anymore [think hal+dbus+solid etc.])
 The norm in fact is to just open the mount point and leave it to the
 user/distro to make sure it's mounted.

 I would make these things options in your program try to mount floppy
 before opening and floppy mount point

 A.J.
 PS. You still use floppies ?

 On 5/30/07, Alain Michaud [EMAIL PROTECTED] wrote:
  Hi,
 
   this is not really a lazarus/FPC question, but it would help me if
  anyone would know about this:
 
  I set the TOpenDialog.InitialDir property to /mnt/floppy but when I
  execute:
 
  MyOpendialog.execute
 
  the content is empty of course because it is not mounted!
 
  Would anyone know how to mount the floppy from inside the lazarus
  application?
 
 
  Thank you.
 
  Alain
 
 
 
  _
   To unsubscribe: mail [EMAIL PROTECTED] with
  unsubscribe as the Subject
 archives at http://www.lazarus.freepascal.org/mailarchives
 







--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

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


Re: [lazarus] Error: Undefined symbol

2007-05-30 Thread Mattias Gaertner
On Wed, 30 May 2007 21:33:54 +0200
Roland Turcan [EMAIL PROTECTED] wrote:

  30.5.2007 19:29 - Mattias Gaertner [EMAIL PROTECTED] 
 MG On Wed, 30 May 2007 14:56:39 +0200
 MG Roland Turcan [EMAIL PROTECTED] wrote:
 
  Hello lazarus project!
  
  During compilation of Lazarus after adding new units into component
  package I get this error message:
  
  C:\lazarus\ide\lazarus.pp(117,1) Error: Undefined symbol:
  RESOURCESTRINGLIST_MSGDLGS
 
 MG Looks like a linker error or a compiler bug.
 
 Then it is second I have found since I started to use it three weeks
 ago. :-|
 
 MG  
  MSGDLGS.pas is my unit and I have set the path to that file in
  Package/Compiler Option/Paths/Other Unit Files and I also have
  added it into package as unit without register unit flag.
 
 MG FPC can find the sources, otherwise there would be another error.
 
 :-|
 
 MG  
  Could somebody explain me, where to set path for compiler, which is
  used for Lazarus compilation.
 
 MG It uses the default compiler (%PATH% environment variable).
 
  Compilation of my package goes fine, I have this error only during
  Lazarus compilation.
 
 MG Did you try the released compiler fpc 2.0.4?
 
 After reading this email I have checked what I had set in environment
 and I have found out, that PATH contained value to old FPC 2.0.2. But
 during compilation I have seen, that fpc 2.1.5 directory from Lazarus
 is called, because I use SVN from 15.5.2007.
 
 Settings in Lazarus point to c:\lazarus\fpc\2.1.5\... directories.
 
 How can I report it in more details, what exactly happens?

Show all used paths:
-vt
Show everything:
-va

see also
http://wiki.lazarus.freepascal.org/Installing_Lazarus#Installing_from_source_2

 
 This is complete messages window:
 
  Compile IDE (without linking) completed
  Compiling package rotursoft 0.1.1 completed
  C:\lazarus\ide\lazarus.pp(117,1) Error: Undefined symbol:
  RESOURCESTRINGLIST_MSGDLGS C:\lazarus\ide\lazarus.pp(117,1) Fatal:
  There were 1 errors compiling module, stopping

Did you try the popup menu of the messages window?


Mattias

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


Re: [lazarus] Event Click on Form

2007-05-30 Thread Felipe Monteiro de Carvalho

This code looks *very* windows specific. To detect mouse clicks there
is already a cross-platform OnClick event for TForm. There are also
OnMouseDown, OnMouseMove, OnMouseUp, etc, which may be better then
OnClick to implement dragdrop

I think there are also some drag  drop specific events, but I never
got time to study them.

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Reducing Flickeron a TImage component

2007-05-30 Thread Mattias Gaertner
On Wed, 30 May 2007 22:17:57 +0200
A.J. Venter [EMAIL PROTECTED] wrote:

Maybe you can try TSpeedButton instead of TBitBtn.
   That would only work if I painted the Caption myself would it
   not ?
 
  TSpeedButton has a Caption. Default is ''.
 
 
   In
   which case... it gets even MORE custom painting... not sure it's
   worth it.
 
  Did you try?
 Heh, point made :)
 Question then: so what IS the difference between TBitBtn and
 TSpeedButton ? In general, but also specifially before it's worth
 trying, it's worth knowing if their disabled paint code are in fact
 different.

The disabled TBitBtn flickers, because the grayed image is created
during paint. TSpeedButton does not gray the image, but paints delayed
(gtk1 intf). So it might flicker less for small buttons.


Mattias

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


Re: [lazarus] Error: Undefined symbol

2007-05-30 Thread Vincent Snijders

Roland Turcan schreef:

Hello lazarus project!

During compilation of Lazarus after adding new units into component
package I get this error message:

C:\lazarus\ide\lazarus.pp(117,1) Error: Undefined symbol:
RESOURCESTRINGLIST_MSGDLGS

MSGDLGS.pas is my unit and I have set the path to that file in
Package/Compiler Option/Paths/Other Unit Files and I also have added
it into package as unit without register unit flag.


This looks like:
http://www.freepascal.org/mantis/view.php?id=8372

Try to update your fpc version.

Vincent

P.S. please, remove the reply to header.

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Felipe Monteiro de Carvalho

On 5/30/07, Vincent Snijders [EMAIL PROTECTED] wrote:

Tom, I was wondering how far are you from running the IDE based on the
carbon widgetset? Or do you already run a carbon based IDE?


I just tested it. One must compile with:

make clean all LCL_PLATFORM=carbon OPT=-k-framework -kcarbon

And also create a app bundle, and then run the bundle. The results:

* Looks interresting. It loads and runs. The menus and the object
inspector seam to be all in the correct place. The toolbar buttons
seam to be a little small and without enouth space between them

* The greatest problem is that SynEdit doesn't work. It seams to
identify the line and collum where I click, but there is no output for
synedit on screen. The code editor is a form with a tabbed control and
grey contents. On the console I can see lot's and lot's of font
related error messages

* I just tested one menu command and it crashed. (Show forms).
Obviously quite a lot of others will probably crash too.

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Felipe Monteiro de Carvalho

On 5/30/07, Tom Gregorovic [EMAIL PROTECTED] wrote:

I am working on running/debugging Application bundles under Carbon
option for Lazarus IDE.
I will test it tomorrow and if it succeeds, I commit it.


Thanks. Indeed it would be nice to have a better working IDE on mac os x.

I have some suggestions to make the macintosh ide work better (I am
posting here to see what others think and mature the idea a bit):

* Identify when something is being compiled for carbon and
automatically add the framework linker option.

* Identify when something is being compiled for carbon, and when this
is an application, automatically create the app bundle. To create the
app bundle we could either add code to do this on the IDE or use the
already existing createmacapplication. If we use this, then we would
probably want to make it's executable always be compiled for mac and
be positioned at a more noble position, just as the base lazarus dir

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Павел Ишенин

Felipe Monteiro de Carvalho wrote:

On 5/30/07, Tom Gregorovic [EMAIL PROTECTED] wrote:

I am working on running/debugging Application bundles under Carbon
option for Lazarus IDE.
I will test it tomorrow and if it succeeds, I commit it.


Thanks. Indeed it would be nice to have a better working IDE on mac os x.

I have some suggestions to make the macintosh ide work better (I am
posting here to see what others think and mature the idea a bit):

* Identify when something is being compiled for carbon and
automatically add the framework linker option.

* Identify when something is being compiled for carbon, and when this
is an application, automatically create the app bundle. To create the
app bundle we could either add code to do this on the IDE or use the
already existing createmacapplication. If we use this, then we would
probably want to make it's executable always be compiled for mac and
be positioned at a more noble position, just as the base lazarus dir
Last can be extended. When something compiled for specific platform 
execute some platform specific code:

- for cabon - create app bundle
- for windows - add manifest into exe
..

Best regards,
Paul Ishenin.

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


Re: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Mattias Gaertner
On Wed, 30 May 2007 19:00:23 -0400
Hess, Philip J [EMAIL PROTECTED] wrote:

 Felipe,
 
 I think you can set Pass Options To The Linker to this:
 
 -framework carbon -framework Qt4Intf -lobjc
 
 for each new project and then just forget about it. You can then
 change the widget type to gtk, qt or carbon as needed and compile. I
 don't believe the extra linker switches make any difference if not
 needed to resolve references for a particular widget set.

AFAIK this will only work under MacOSX.
We need conditional compiler options. There is already a feature
request in mantis.

 
 Regarding your 2nd suggestion: It's absolutely critical that the IDE
 not create a new app bundle each time it compiles. Remember that an
 app bundle is rarely the barebones folder that createmacapplication
 creates. It may contain dozens or hundreds of other files -
 resources, icons, private frameworks, etc. These will likely need to
 be copied in manually by the developer, but once he's done that the
 IDE shouldn't delete the app bundle - rather, it should just compile
 to replace the executable (which is either inside the bundle or
 outside the bundle and symlinked to it from within the bundle as
 createmacapplication does it).

Agreed.

 
 It would be nice if there were a way to set the bundle's Info.plist
 settings from within the IDE, but this might be asking too much. I
 believe I wrote up some suggestions related to this and the IDE's
 Project Options | Version Info about a year ago but don't recall if I
 posted them on the forum or what.

What info is stored in the Info.plist?

 
 Currently I use a script file something like my create_app_mac.sh
 that I run to create the initial app bundle and copy everything
 needed into the bundle folder (can also do this anytime I need to
 start over with the bundle). Something like this will probably
 always be needed for non-trivial projects.


Mattias

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


Re: [lazarus] Strange bug with SQLQuery.Close

2007-05-30 Thread fedorax
Selon Bram Kuijvenhoven [EMAIL PROTECTED]:

 fedorax wrote:
  Selon Joost van der Sluis [EMAIL PROTECTED]:
 
  On Sat, 2007-05-26 at 15:00 +0200, fedorax wrote:
 
  I've a strange bug. In this fonction ( Which was worked perfectly from
 few
  months an never chage ).
  --
  procedure TFunc_Sql.List_TablesSelectionChange(Sender: TObject; User:
  boolean);
  begin
If List_Tables.ItemIndex0 then List_Tables.ItemIndex:=0;
T_Name:=List_Tables.Items[List_Tables.ItemIndex]; // The selected table
  name
If SQLQuery.Active Then SQLQuery.Close; // Close the precedent query
SQLQuery.SQL.Text:='Select * From '+ T_Name;
SQLQuery.Open;  //Open to list in DbGrid
  end;
  --
  The line   If SQLQuery.Active Then SQLQuery.Close; cause an access
  violation
  and close the application without visible cause.
  My guess is that you've destroyed/freed SQLQuery somewhere before this
  code is called.
 
  Joost
 
  Not that, the SQLComponent is put on the form and no instruction exist for
 free
  it. Is it possible that a bug free a component without programmer ask to it
 ?

 A component is freed when its Owner is destroyed (in this case the form), so
 as long as you don't free the form or SQLQuery by hand, all should be ok.

 To track the cause of the exception, you probably need to get a stacktrace;
 e.g. use GDB or Lazarus itself. Hint for GDB:

  break FPC_RAISEEXCEPTION
  run
  ...
  bt

 You can insert ShowMessage of DebugLn statements to find out what your
 application is doing.

 Regards,

 Bram


I do as you say and i put here the firts part of ( very long ) bakctrace. may be
somebody can understand this ? For me i just see a problem with a memory pointer
and i'm remember that memory pointer system ha'd changed few day's ago ( Lazarus
won't compile and stop in this fonction ). May be a bug was introduced at this
time ?

I'ts apear ever on the same line of code but never at the same time. Sometime i
can move move in list a long time before crash, sometime just two clicks in list
 are sufficient to crash. And never on a specific location in the list.
I forget to specify: The message 'access violation' and others appears  only if
the program is compiled with gdb active in options. Without gdb no message. The
program freeze and nothing is displayed.

-
Breakpoint 1, 0x080607e6 in fpc_raiseexception ()
(gdb) backtrace
#0  0x080607e6 in fpc_raiseexception ()
#1  0x080a471e in SYSUTILS_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER ()
#2  0x080634e7 in SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER ()
#3  0xbfef4a54 in ?? ()
#4  0x0012b000 in ?? ()
#5  0x00cc in ?? ()
#6  0xbfef49f4 in ?? ()
#7  0xbfef4a54 in ?? ()
#8  0x006ff220 in ?? ()
#9  0x0806358d in SYSTEM_HANDLEERRORFRAME$LONGINT$POINTER ()
#10 0x00cd9000 in ?? ()
#11 0x0002 in ?? ()
#12 0x00cd901c in ?? ()
---Type return to continue, or q return to quit---
#13 0x08064d46 in SYSTEM_TRY_CONCAT_FREE_CHUNK$PMEMCHUNK_VAR$$PMEMCHUNK_VAR ()
#14 0x080635aa in SYSTEM_HANDLEERROR$LONGINT ()
#15 0x08065509 in SYSTEM_SYSFREEMEM_FIXED$PMEMCHUNK_FIXED$$LONGINT ()
#16 0x00cd9000 in ?? ()
#17 0x00f0 in ?? ()
#18 0x00cd901c in ?? ()
#19 0x0002 in ?? ()
#20 0x006ff020 in ?? ()
#21 0x0001 in ?? ()
#22 0x08065626 in SYSTEM_SYSFREEMEM$POINTER$$LONGINT ()
#23 0x00cd9020 in ?? ()
#24 0x0002 in ?? ()
#25 0x0806575c in SYSTEM_SYSFREEMEMSIZE$POINTER$LONGINT$$LONGINT ()
---Type return to continue, or q return to quit---
#26 0x001135e0 in ?? ()
#27 0x0002 in ?? ()
#28 0x08064758 in SYSTEM_FREEMEM$POINTER$LONGINT ()
#29 0x0824227a in BUFDATASET_TBUFDATASET_$__FREEBLOBBUFFER$PBLOBBUFFER ()
#30 0x0009 in ?? ()
#31 0x082407cd in BUFDATASET_TBUFDATASET_$__INTERNALCLOSE ()
#32 0x082179c4 in SQLDB_TCUSTOMSQLQUERY_$__INTERNALCLOSE ()
#33 0x006ff020 in ?? ()
#34 0x0821c613 in DB_TDATASET_$__CLOSECURSOR ()
#35 0x006ff000 in ?? ()
#36 0x0821dc59 in DB_TDATASET_$__SETACTIVE$BOOLEAN ()
#37 0x08217443 in SQLDB_TCUSTOMSQLQUERY_$__SETACTIVE$BOOLEAN ()
#38 0x006ff020 in ?? ()
---Type return to continue, or q return to quit---

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



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


Re: [lazarus] TOpendialog.InitialDir

2007-05-30 Thread Marc Santhoff
Am Mittwoch, den 30.05.2007, 16:23 -0400 schrieb Alain Michaud:
 --- My fstab does not say anything about .../floppy... That does not
 seem normal?

Yes, that's pretty normal. Although many linux distros come with some
preparation: the automounter daemon. Open an xterm an type man amd,
that should show you the way. If linux does mount any disk or media
automatically, it uses amd.

 --- My code does not have to be portable, but the users are Microsoft
 oriented and I find it very difficult to sell my Linux/FPC/Lazarus
 code. For me, opening the floppy before I run the application is easy,
 but for my users, it seems like an impossible task... Their next step
 would be to press the reset button !

Given you're using network analyzer hardware your users seem to be
trained professionals. So I'd suggest you to train them some more to get
their fingers of that nasty reset button ans learn how to mount a
floppy.

Anyways, if users should be allowed to do so, the opsys has to be
prepared (at least by setting the the mount points owner and rights).
But that's a FAQ and the internet is full of answers ...

HTH,
Marc
-- 
Who cares if it doesn't do anything?  It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS process ...


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


RE: [lazarus] Debugger on Mac OS X

2007-05-30 Thread Hess, Philip J
Good point. But if the linker on other platforms complains about the OS X 
specific switches, you should be able to uncheck Pass Options To Linker box, 
correct?

Here's the reference for what can go into the app bundle's Info.plist file:

http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html

Some of the settings in Info.plist kind of overlap with Windows-type version 
resource info, hence the idea that maybe some of them could be set in Project 
Options | Version Info, although this would require a way to define any sort of 
string the way you can in Delphi, not just the limited version strings that it 
allows now.

Thanks.

-Phil



-Original Message-
From: Mattias Gaertner [mailto:[EMAIL PROTECTED]
Sent: Wed 5/30/2007 6:44 PM
To: lazarus@miraclec.com
Subject: Re: [lazarus] Debugger on Mac OS X
 
On Wed, 30 May 2007 19:00:23 -0400
Hess, Philip J [EMAIL PROTECTED] wrote:

 Felipe,
 
 I think you can set Pass Options To The Linker to this:
 
 -framework carbon -framework Qt4Intf -lobjc
 
 for each new project and then just forget about it. You can then
 change the widget type to gtk, qt or carbon as needed and compile. I
 don't believe the extra linker switches make any difference if not
 needed to resolve references for a particular widget set.

AFAIK this will only work under MacOSX.
We need conditional compiler options. There is already a feature
request in mantis.

 
 Regarding your 2nd suggestion: It's absolutely critical that the IDE
 not create a new app bundle each time it compiles. Remember that an
 app bundle is rarely the barebones folder that createmacapplication
 creates. It may contain dozens or hundreds of other files -
 resources, icons, private frameworks, etc. These will likely need to
 be copied in manually by the developer, but once he's done that the
 IDE shouldn't delete the app bundle - rather, it should just compile
 to replace the executable (which is either inside the bundle or
 outside the bundle and symlinked to it from within the bundle as
 createmacapplication does it).

Agreed.

 
 It would be nice if there were a way to set the bundle's Info.plist
 settings from within the IDE, but this might be asking too much. I
 believe I wrote up some suggestions related to this and the IDE's
 Project Options | Version Info about a year ago but don't recall if I
 posted them on the forum or what.

What info is stored in the Info.plist?

 
 Currently I use a script file something like my create_app_mac.sh
 that I run to create the initial app bundle and copy everything
 needed into the bundle folder (can also do this anytime I need to
 start over with the bundle). Something like this will probably
 always be needed for non-trivial projects.


Mattias

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

winmail.dat

[lazarus] Accepting Input on controls which don't have focus

2007-05-30 Thread Dave Coventry

Hi,

I have a form with a TScrollBox and a TMemo. The TScrollBox has a TImage 
within it.


The Purpose of the TScrollBox is to capture MouseWheel events (And also, 
it's painted black, the same colour as the TImage to reduce flicker).


What I want is for the user's keyboard input to be reflected in the TMemo.

However, if the Focus is set onto the TImage, the TMemo doesn't take the 
keyboard input, and visa versa, if the TMemo has focus, the Mousewheel 
events are discarded. Any solutions?


Many Thanks,

--
Dave Coventry
Tel   (home):  +27(0)31 3092301
Tel (office):  +27(0)31 2058448

Cell: +27(0)82 9000179

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