RE: [DUG] Best way to make this thread safe

2007-05-17 Thread Trevor Jones
In what way is this thread safe? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maurice Butler Sent: Thursday, 17 May 2007 10:48 p.m. To: 'NZ Borland Developers Group - Delphi List' Subject: RE: [DUG] Best way to make this thread safe May be of use - the

RE: [DUG] Best way to make this thread safe

2007-05-17 Thread Trevor Jones
If you're brave, you can use a helper thread to make the whole operation thread-safe. That fails the "use as little extra code as possible" requirement, but is a surprisingly powerful technique and not as difficult as you might think. Using synchronize methods in your worker threads can lead to d

RE: [DUG] Long running apps & weirdness

2007-05-13 Thread Trevor Jones
ing. 2. Running out of resources. Open the task manager and keep an eye on GDI objects (the worst), User Obects, Handles etc GDI is the worst. Windows goes crazy, you cant even shut down. Old version of Nero used to do this. And ODBC driver for MSSQL did/does it too. Trevor Jones wrote: Hell

RE: [DUG] Long running apps & weirdness

2007-05-13 Thread Trevor Jones
the problem or does windows need to be restarted? Rob Martin Software Engineer phone +64 03 377 0495 fax +64 03 377 0496 web www.chreos.com Wild Software Ltd Trevor Jones wrote: > Hello, > Just wondering if any of you have encountered really weird bugs and > support issues on

RE: [DUG] Long running apps & weirdness

2007-05-12 Thread Trevor Jones
List Subject: Re: [DUG] Long running apps & weirdness You havent explained the wierdness... Trevor Jones wrote: > Hello, > Just wondering if any of you have encountered really weird bugs and > support issues on machines that have been running for a long time (without a > reboot)

[DUG] Long running apps & weirdness

2007-05-11 Thread Trevor Jones
Hello, Just wondering if any of you have encountered really weird bugs and support issues on machines that have been running for a long time (without a reboot). Recently, I have noticed that we have been getting support calls for strange app behaviour. The kind of things that are being report

RE: [DUG] Memo files Lines

2007-04-19 Thread Trevor Jones
Memo.Lines.Count? _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marshland Engineering Sent: Friday, 20 April 2007 4:41 p.m. To: delphi@delphi.org.nz Subject: [DUG] Memo files Lines Hi I'm just starting with Delphi. I need to read a text file (G-Code for CNC)

Re: [DUG]: application shutdown

2003-11-11 Thread Trevor Jones
Title: Message You need to create a message handler for WM_QUERYENDSESSION and return true (I think - check the docs).   You can then also write a message handler for WM_ENDSESSION which you will get if no other program has vetoed the QUERYENDSESSION if you want to destroy objects etc when th

[DUG]: Taskbar, XP and Fast-user switching

2003-11-03 Thread Trevor Jones
Howdy, I have a number of service applications that use the TaskbarCreated message to bung an icon into the system tray when a user logs on. Under NT, Win2K and XP, if I log off, then log on again, my tray icon re-appears (which is good). The service starts without a user being logged on to

Re: [DUG]: Threads again

2003-10-15 Thread Trevor Jones
7;ll give it a go.   Cheers, Ross. - Original Message ----- From: Trevor Jones To: Multiple recipients of list delphi Sent: Thursday, October 16, 2003 2:01 PM Subject: Re: [DUG]: Threads again Ross,   My experience with compone

Re: [DUG]: Threads again

2003-10-15 Thread Trevor Jones
Ross,   My experience with components and threads is that you should be able to use the Indy Component within your thread without calling synchronize provided:     a) you manage form destruction well, so that the component can't be destroyed while the thread is working with it.   b) you do n

Re: [DUG]: URLEncode

2003-08-03 Thread Trevor Jones
Alistair, Thanks for providing us with this. - Original Message - From: "Alistair George" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Monday, August 04, 2003 4:29 PM Subject: [DUG]: URLEncode > Mailstring := 'mailto:' + '[EMAIL PROTECTED]';

Re: [DUG]: Coding music?

2003-07-16 Thread Trevor Jones
Big recommendation...   if your're old enough, and have the pre-requisities, buy your son an iPOD, then offer to load it up with ALL of his CDs.      You'll score points with your boy, and get a whole bunch of new music to listen to.     I'm not trying to be sexist here.  I only have a son,

Re: [DUG]: Interface Inheritance

2003-06-15 Thread Trevor Jones
Have you tried if Supports(aObject, IFirstInterface,oFirstInterface) Interface inheritance is different from object inheritance, and can seem odd until you get your head around it. But the supports function always will give you the answer you require providing you are using D6 or later. Trevor

Re: [DUG]: Memory usage

2003-01-14 Thread Trevor Jones
Ooops, sorry, the API function is SetProcessWorkingSetSize. Trevor - Original Message - From: "Trevor Jones" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 7:10 PM Subject: Re:

Re: [DUG]: Memory usage

2003-01-14 Thread Trevor Jones
Hi David, If you are working on any ot the NT based OSes (NT, Windows 2000, XP), this is normal behaviour. If your Delphi app has allocated and freed the memory, and the delphi memory manager has done the appropriate stuff, then you are llooking at the effects of the OS memory manager. Lots o

Re: [DUG]: Strange TTimer/ShowModal behaviour (kylix)

2002-08-20 Thread Trevor Jones
The AutoCreate business probably set the visible property of the form to true. Try setting it to false, then your showmodal should work. - Original Message - From: "Mark Derricutt" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Tuesday, August 20,

Re: [DUG]: 64 bit ints

2002-08-18 Thread Trevor Jones
Steve: surely if you have just the one function function IntToStr(Value: Int64): string; and it's not overloaded, then the compiler still won't complain. That's why I was wondering what I had missed Trevor - Original Message - From: "Steve Peacocke" <[EMAIL PROTECTED]> To: "Multip

[DUG]: 64 bit ints

2002-08-16 Thread Trevor Jones
I use quite a lot of these in my code, and from time to time need to convert them to striings, so I use IntToStr in SysUtils. I've noticed that there are two versions (overloaded) in sysUtils: { IntToStr converts the given value to its decimal string representation. } function IntToStr(Value: I

Re: [DUG]: More thread questions

2002-08-13 Thread Trevor Jones
Check out the WaitForMultipleObjects windows API call. It works with an array of "Waitable" handles and you can specify a timeout. If the component you use doesn't provide you with any "Waitable" handles, you can easily create one of your own with the CreateEvent API call and get your component

Re: [DUG]: first error fixed, now for the second

2001-10-05 Thread Trevor Jones
- Original Message - From: <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Tuesday, October 02, 2001 3:40 PM Subject: [DUG]: first error fixed, now for the second ok i managed to fix the first error i must have had a ctrl character in there but the

Re: [DUG]: Missing unit ??

2001-10-01 Thread Trevor Jones
There is need to recompile DesignInfo.pas. Any references to "DsgnIntf" should be changed to "DesignIntf" and DesignIDE should be added to the list of required packages in an package using DesignIntf. The DesignIntf and DesignEditors units are for design-time use only. They shouldn't be used

Re: [DUG]: Paradox SQL - Group totals as % of Grand total

2001-10-01 Thread Trevor Jones
- Original Message - From: "Mark Howard" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Monday, October 01, 2001 5:14 PM Subject: Re: [DUG]: Paradox SQL - Group totals as % of Grand total > Thanks for the reply Cheng > (nothing at all wrong with y

Re: [DUG]: help with search string

2001-10-01 Thread Trevor Jones
I think I've spotted it! The syntax highlighting should have shown you what was going on The problem is that you are not terminating the strings correctly (as if you didn't already know that). inputbox( 'Name Search', // string is terminated correctly 'Enter the name you''re looking for', /

Re: [DUG]: Help with searching a .dat file

2001-09-26 Thread Trevor Jones
the data is unsorted and the file is opened when the program is ran. so i type in your function and then call it by find in the bitbutton1.click procedure? ... Brendon Toogood Pretty much yeah. eg: TMyForm.BitButton1.click( sender : TObject ) var SearchText : string; tmp : address

Re: [DUG]: Help with searching a .dat file

2001-09-26 Thread Trevor Jones
> > You don't say whether the data in your .dat file is sorted, or how many > > entries you are likely to be expecting, or whether you're developing for > > Win32 or Win16. > > Win16?Yikes. > > -ns Nello, Storing data in an unsorted .dat file doesn't also make you go yikes? --

Re: [DUG]: Help with searching a .dat file

2001-09-26 Thread Trevor Jones
Brendon, You don't say whether the data in your .dat file is sorted, or how many entries you are likely to be expecting, or whether you're developing for Win32 or Win16. However: If the records in the .dat file are unsorted and you don't want to lad the entire file into memory, you are going

Re: [DUG]: Paradox SQL - Group totals as % of Grand total

2001-09-25 Thread Trevor Jones
I know this comment is way of the mark in helping you out for this situation,but this sort of problem is why I ditched Quick Reports quite some time ago and switched to using FastReport.    Grouping is where it really stands out..sub-totals are no problem at all - even as percentages.  Its a

[DUG]: Interbase, Stored Procs, Computed Fields, UDFs and Performance

2001-09-07 Thread Trevor Jones
Just a question really. Do you use Interbase? Do you also spend a bunch of time trying to figure out which indicies to create? and are they only to support performance in your stored procs? Do you wish you could use cursors in your stored procs? Would you like to be able to use a stored proc or

Re: [DUG]: AVI in Resource Files

2001-08-30 Thread Trevor Jones
> How do I compile an AVI file into the exe. I see that the TAnimate > component allows me to load the AVI from a resource... So I gather I > need a resource editor, which Delphi doesn't seem to supply... (I had a > look at the very (very very) old Resource Workshop that came with one or > other v

Re: [DUG]: [Q] "Unable to expand" in object inspector....

2001-08-27 Thread Trevor Jones
When you register the TADSVenue entity component (with registerComponents), also call registerClass for TBaseAttributeProperties.  The Object Inspector should then be able to understand (and expand) it. - Original Message - From: Donovan J. Edye To: Multiple recipients

Re: D6 Timestamp Error: was [DUG]: Delphi 5 & 6...

2001-07-20 Thread Trevor Jones
tampToDateTime will raise an EConvertError on the returned TimeStamp. ..."   Perhaps a Borland staff member can elaborate? One would guess Borland will issue a  caution and workaround soon.   Regards   Russell - Original Message - From: Trevor

Re: [DUG]: Delphi 5 & 6...

2001-07-19 Thread Trevor Jones
I have 4, 5, and 6 all installed on the same machine.   The only problem I have is with D6 itself: BEWARE if you use TTimeFields in your database you may run into problems.  Certainly with IBXpress TTimeFields are currently broken.  There is a workaround but not if you use packages. -

Re: [DUG]: Best Practice, sorry that should read

2001-05-02 Thread Trevor Jones
> then instead of > var > MyForm : TMyForm; > > delete the IDE created variable and add > > type > TCreateMyForm = function( aOwner : TComponent ) : TMyForm; > > var > CreateMyForm : TCreateMyForm; > and if you think they shouldn't be called virtual constructors, what about constructor fu

Re: [DUG]: Best Practice

2001-05-02 Thread Trevor Jones
>Global variables means non-object-oriented, non-reusable, >non-understandable, non-maintainable code. Try building a large project >with everything global and find out! Your friend and mine, the Delphi IDE automatically creates a global variable for each form you design. If they're that bad, wh

Re: [DUG]: Report component/s

2001-04-18 Thread Trevor Jones
I'm not sure about the excel stuff, but its worth having a look at Fast Report www.fastreport.ru It is good, cheap and, well, FAST, has a good designer, and supports dialogs for parameter entry as part of the report itself - Original Message - From: "Sergei Stenkov" <[EMAIL PROTECTED]> T

Re: [DUG]: Help WIth Setting Properties

2001-01-30 Thread Trevor Jones
The problem is simply that TPoint is a record, not an object, and the language does not allow comparison operators or records. You'll need to do comparisons on the fields of the records i.e if (value.x <> fCenter.x) or value.Y <> fCenter.Y ) and so on... - Original Message - From: "Chris

Re: [DUG]: Bitmap transparency

2000-11-30 Thread Trevor Jones
If you're especially lazy and want something else to do all the work, try using an imagelist (I'm assuming your four little bitmaps are the sime size and shape) The in your OnDrawCell event you can use ImageList.Draw( Canvas, Rect.Left, Rect.Top, ImageIndex ) Be sure to set your imagelist maske

Re: [DUG]: TMemos & StringGrids

2000-10-16 Thread Trevor Jones
- Original Message - From: Weston Bell <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Sent: Tuesday, October 17, 2000 8:34 AM Subject: [DUG]: TMemos & StringGrids > Hi, > Can anyone help me with placing a schedule of items and amounts > in a memo

Re: [DUG]: Interbase

2000-05-23 Thread Trevor Jones
Are you using a Version 6 Beta? if so your license may have expired yesterday. Visit then interbase site to get an extension of your beta license -Original Message- From: Tony Sinclair <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Date: Wednesday, May 24,

Re: [DUG]: I've had it up to here with TEdit descendants

1999-12-21 Thread Trevor Jones
- Original Message - From: Max Nilson <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Sent: Monday, December 20, 1999 3:20 PM Subject: RE: [DUG]: I've had it up to here with TEdit descendants > Trevor asked: > > > ...and I'm sure that I'm not the only one.

Re: [DUG]: I've had it up to here with TEdit descendants

1999-12-21 Thread Trevor Jones
- Original Message - From: Neven MacEwan <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Sent: Monday, December 20, 1999 4:25 PM Subject: Re: [DUG]: I've had it up to here with TEdit descendants > Trevor > > Funny but I've just been contemplating the same

[DUG]: I've had it up to here with TEdit descendants

1999-12-17 Thread Trevor Jones
...and I'm sure that I'm not the only one. Problem: I need a really good numeric entry field which can be set to accept either integral values or non-integral values with a specified precision Potential solutions: Scan the Net for TCurrencyEdit kinda things, try each, discover HUGE shortcomings,

Re: [DUG]: Barcodes

1999-03-19 Thread Trevor Jones
Aaron: after many years of dealing with many different types of barcode readers, may I share with you some recommendations? 1) If at all possible, use a serial barcode reader. These typically operate at 9600bps whereas the keyboard usually runs at 300bps. The higher serial speed will make your

Re: [DUG]: OLE and hiding the main form

1999-03-03 Thread Trevor Jones
in your project source file, after application.initialize put if Comserver.StartMode = smAutomation then Application.Showmainform := false; You will need to add ComServ to the uses list in the project source -Original Message- From: Peter Harrison IT <[EMAIL PROTECTED]> To: Multiple