Re: [DUG] [computing] Sizeof record gives error

2011-08-28 Thread David Moorhouse (DUG)
I believe it is a compiler error and will raise a QA ticket

Thanks for your  help


D


On 26/08/11 08:17, Peter Ingham wrote:
 Try filling LogData with binary zeros after the Getmem  before the assign.

 FillChar (LogData^, sizeof(TLogData), 0);

 I believe the uninitialized memory is messing up the compiler magic
 associated with the dynamic array.


 Any reason the local Tlogdata record is referenced via a pointer?

 I suspect the following will also work:
 procedure TUserClass.Log(const LogType: TLogType; const Args: array of
 const );
var
   LogData: TLogData;
 begin
   LogData.LogType := LogType;
   LogData.LogArgs := CreateConstArray(Args);
   //  ... do some other stuff with the LogData item finally calling
 end;

 Cheers

 On 26/08/2011 1:49 a.m., David Moorhouse wrote:
 Hi Peter

 Been there done that :)

 The function call is fine.  It is the assignment that causes the AV -
 because the bucket is too small.
 Assigning it with 16 bytes fixes the problem, regardless of how many
 items the array holds.

 I smell compiler magic in the background.

 Cheers

 D

 On 25/08/11 17:29, Peter Ingham wrote:
 Another attempt to reply...

 First thing to do is determine if the crash occurs in the procedure call,
 on the subsequent assign, or in between.

 Give this a try:
procedure TUserClass.Log(const LogType: TLogType; const Args: array of
const );
var
  LogData: PLogData;
 TempArgs : TConstArray;
begin
// size of record TLogData does not work
GetMem(LogData, sizeof(TLogData));
LogData.LogType := LogType;
// blows up on one of these lines
TempArgs  := CreateConstArray(Args);
LogData.LogArgs := TempArgs;
//  ... do some other stuff with the LogData item finally calling
 FreeMem
end;


 Regarding the size of a dynamic array,  like a string variable,  the
 variable (LogArgs in this case) is the size of a pointer (i.e. 4 bytes
 for Win32).  If the pointer is non-zero, it points to a structure which
 includes the adjacent array elements preceded by a length.

 One thing to watch out for is that Getmem does not clear the allocated
 memory, so LogData after the Getmem call will contain any old rubbish.
 The reference to LogData.LogArgs in the assignment may be
 dereferencing a non-zero pointer   attempting to use whatever it
 contains.

 Cheers


 On 25/08/2011 11:40 a.m., David Moorhouse (DUG) wrote:
 I have the following code snippet

 code
 type
  PConstArray = ^TConstArray;
  TConstArray = array of TVarRec;

 function CreateConstArray(const Elements: array of const): TConstArray;

 type
  TLogType = (ltError, ltWarn, ltInfo);
  PLogData = ^TLogData;
  TLogData = record
LogType: TLogType;
LogArgs: TConstArray;
  end;

 

 procedure TUserClass.Log(const LogType: TLogType; const Args: array of
 const );
 var
  LogData: PLogData;
 begin
// size of record TLogData does not work
GetMem(LogData, sizeof(TLogData));
LogData.LogType := LogType;
 // blows up on next line
LogData.LogArgs := CreateConstArray(Args);
 //  ... do some other stuff with the LogData item finally calling
 FreeMem
 end;

 function CreateConstArray(const Elements: array of const): TConstArray;
 var
  I: Integer;
 begin
  SetLength(Result, Length(Elements));
  for I := Low(Elements) to High(Elements) do
Result[I] :=  // assign a TVarRec here
 end;
 /code

 The code that assigns the memory only assigns 8 bytes - and an access
 violation ensues.  If I replace the call to sizeof with the number 16,
 the code works fine.

 My understanding of dynamic arrays was that the compiler created a 4
 byte
 field before the first element that contained the length of the array.

 So why does the sizeof  function not reflect this ?  And why do I
 need 16
 bytes not 12  (4 for LogType + 4 for length of array + 4 for array
 pointer)?
 Also regardless of the number of items in the open array parameter, 16
 bytes works, so it does not relate the length of the TConstArray.

 Your thoughts ?

 David



 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with
 Subject: unsubscribe


 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
 unsubscribe

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
 unsubscribe


___
NZ Borland Developers

Re: [DUG] [computing] Sizeof record gives error

2011-08-25 Thread David Moorhouse
Hi Peter

Been there done that :)

The function call is fine.  It is the assignment that causes the AV - 
because the bucket is too small.
Assigning it with 16 bytes fixes the problem, regardless of how many 
items the array holds.

I smell compiler magic in the background.

Cheers

D

On 25/08/11 17:29, Peter Ingham wrote:
 Another attempt to reply...

 First thing to do is determine if the crash occurs in the procedure call,
 on the subsequent assign, or in between.

 Give this a try:
  procedure TUserClass.Log(const LogType: TLogType; const Args: array of
  const );
  var
LogData: PLogData;
   TempArgs : TConstArray;
  begin
  // size of record TLogData does not work
  GetMem(LogData, sizeof(TLogData));
  LogData.LogType := LogType;
  // blows up on one of these lines
  TempArgs  := CreateConstArray(Args);
  LogData.LogArgs := TempArgs;
  //  ... do some other stuff with the LogData item finally calling 
 FreeMem
  end;


 Regarding the size of a dynamic array,  like a string variable,  the
 variable (LogArgs in this case) is the size of a pointer (i.e. 4 bytes 
 for Win32).  If the pointer is non-zero, it points to a structure which
 includes the adjacent array elements preceded by a length.

 One thing to watch out for is that Getmem does not clear the allocated
 memory, so LogData after the Getmem call will contain any old rubbish.
 The reference to LogData.LogArgs in the assignment may be 
 dereferencing a non-zero pointer  attempting to use whatever it 
 contains.

 Cheers


 On 25/08/2011 11:40 a.m., David Moorhouse (DUG) wrote:
 I have the following code snippet

 code
 type
PConstArray = ^TConstArray;
TConstArray = array of TVarRec;

 function CreateConstArray(const Elements: array of const): TConstArray;

 type
TLogType = (ltError, ltWarn, ltInfo);
PLogData = ^TLogData;
TLogData = record
  LogType: TLogType;
  LogArgs: TConstArray;
end;

 

 procedure TUserClass.Log(const LogType: TLogType; const Args: array of
 const );
 var
LogData: PLogData;
 begin
  // size of record TLogData does not work
  GetMem(LogData, sizeof(TLogData));
  LogData.LogType := LogType;
 // blows up on next line
  LogData.LogArgs := CreateConstArray(Args);
 //  ... do some other stuff with the LogData item finally calling 
 FreeMem
 end;

 function CreateConstArray(const Elements: array of const): TConstArray;
 var
I: Integer;
 begin
SetLength(Result, Length(Elements));
for I := Low(Elements) to High(Elements) do
  Result[I] :=  // assign a TVarRec here
 end;
 /code

 The code that assigns the memory only assigns 8 bytes - and an access
 violation ensues.  If I replace the call to sizeof with the number 16,
 the code works fine.

 My understanding of dynamic arrays was that the compiler created a 4 
 byte
 field before the first element that contained the length of the array.

 So why does the sizeof  function not reflect this ?  And why do I 
 need 16
 bytes not 12  (4 for LogType + 4 for length of array + 4 for array
 pointer)?
 Also regardless of the number of items in the open array parameter, 16
 bytes works, so it does not relate the length of the TConstArray.

 Your thoughts ?

 David



 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with 
 Subject: unsubscribe




___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


[DUG] Sizeof record gives error

2011-08-24 Thread David Moorhouse (DUG)
I have the following code snippet

code
type
  PConstArray = ^TConstArray;
  TConstArray = array of TVarRec;

function CreateConstArray(const Elements: array of const): TConstArray;

type
  TLogType = (ltError, ltWarn, ltInfo);
  PLogData = ^TLogData;
  TLogData = record
LogType: TLogType;
LogArgs: TConstArray;
  end;



procedure TUserClass.Log(const LogType: TLogType; const Args: array of
const );
var
  LogData: PLogData;
begin
// size of record TLogData does not work
GetMem(LogData, sizeof(TLogData));
LogData.LogType := LogType;
// blows up on next line
LogData.LogArgs := CreateConstArray(Args);
//  ... do some other stuff with the LogData item finally calling FreeMem
end;

function CreateConstArray(const Elements: array of const): TConstArray;
var
  I: Integer;
begin
  SetLength(Result, Length(Elements));
  for I := Low(Elements) to High(Elements) do
Result[I] :=  // assign a TVarRec here
end;
/code

The code that assigns the memory only assigns 8 bytes - and an access
violation ensues.  If I replace the call to sizeof with the number 16,
the code works fine.

My understanding of dynamic arrays was that the compiler created a 4 byte
field before the first element that contained the length of the array.

So why does the sizeof  function not reflect this ?  And why do I need 16
bytes not 12  (4 for LogType + 4 for length of array + 4 for array
pointer)?
Also regardless of the number of items in the open array parameter, 16
bytes works, so it does not relate the length of the TConstArray.

Your thoughts ?

David



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Sizeof record gives error

2011-08-24 Thread David Moorhouse (DUG)
Thanks Colin

The TVarRec and open array stuff come from Rudy's page - very helpful too :)

D


 Haven't got into the details of your problem, but here is an article
 which goes into the details
 of array of const.

 http://rvelthuis.de/articles/articles-openarr.html

 Hope it helps,

 Cheers,
 Colin

 On 25 August 2011 09:40, David Moorhouse (DUG) del...@moorhouse.net.nz
 wrote:
 I have the following code snippet

 code
 type
  PConstArray = ^TConstArray;
  TConstArray = array of TVarRec;

 function CreateConstArray(const Elements: array of const): TConstArray;

 type
  TLogType = (ltError, ltWarn, ltInfo);
  PLogData = ^TLogData;
  TLogData = record
    LogType: TLogType;
    LogArgs: TConstArray;
  end;

 

 procedure TUserClass.Log(const LogType: TLogType; const Args: array of
 const );
 var
  LogData: PLogData;
 begin
    // size of record TLogData does not work
    GetMem(LogData, sizeof(TLogData));
    LogData.LogType := LogType;
 // blows up on next line
    LogData.LogArgs := CreateConstArray(Args);
 //  ... do some other stuff with the LogData item finally calling
 FreeMem
 end;

 function CreateConstArray(const Elements: array of const): TConstArray;
 var
  I: Integer;
 begin
  SetLength(Result, Length(Elements));
  for I := Low(Elements) to High(Elements) do
    Result[I] :=  // assign a TVarRec here
 end;
 /code

 The code that assigns the memory only assigns 8 bytes - and an access
 violation ensues.  If I replace the call to sizeof with the number 16,
 the code works fine.

 My understanding of dynamic arrays was that the compiler created a 4
 byte
 field before the first element that contained the length of the array.

 So why does the sizeof  function not reflect this ?  And why do I need
 16
 bytes not 12  (4 for LogType + 4 for length of array + 4 for array
 pointer)?
 Also regardless of the number of items in the open array parameter, 16
 bytes works, so it does not relate the length of the TConstArray.

 Your thoughts ?

 David



 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
 unsubscribe


 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
 unsubscribe




___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Sizeof record gives error

2011-08-24 Thread David Moorhouse (DUG)
Thanks Robo

In my mind the memory layout looks like this (attempt at ascii art follows)

TLogData
 - LogType = 4 bytes
 - LogArgs -   TConstArray - length = 4 bytes
- data pointer = 4 bytes

Regardless of the Length of the array, if I allocate 16 bytes the code
works fine.  If I allocate 12 (as above) it crashes.


Cheers

D


 I think your TLogData contains storage for an integer (TLogType, 4 bytes),
 and a pointer to an array (4 bytes).

 However, what you need is enough memory to store the entire array, not
 just
 the pointer, so you should get the size of the array to get the correct
 size.

 On Thu, Aug 25, 2011 at 11:40 AM, David Moorhouse (DUG) 
 del...@moorhouse.net.nz wrote:

 I have the following code snippet

 code
 type
  PConstArray = ^TConstArray;
  TConstArray = array of TVarRec;

 function CreateConstArray(const Elements: array of const): TConstArray;

 type
  TLogType = (ltError, ltWarn, ltInfo);
  PLogData = ^TLogData;
  TLogData = record
LogType: TLogType;
LogArgs: TConstArray;
  end;

 

 procedure TUserClass.Log(const LogType: TLogType; const Args: array of
 const );
 var
  LogData: PLogData;
 begin
// size of record TLogData does not work
GetMem(LogData, sizeof(TLogData));
LogData.LogType := LogType;
 // blows up on next line
LogData.LogArgs := CreateConstArray(Args);
 //  ... do some other stuff with the LogData item finally calling
 FreeMem
 end;

 function CreateConstArray(const Elements: array of const): TConstArray;
 var
  I: Integer;
 begin
  SetLength(Result, Length(Elements));
  for I := Low(Elements) to High(Elements) do
Result[I] :=  // assign a TVarRec here
 end;
 /code

 The code that assigns the memory only assigns 8 bytes - and an access
 violation ensues.  If I replace the call to sizeof with the number 16,
 the code works fine.

 My understanding of dynamic arrays was that the compiler created a 4
 byte
 field before the first element that contained the length of the array.

 So why does the sizeof  function not reflect this ?  And why do I need
 16
 bytes not 12  (4 for LogType + 4 for length of array + 4 for array
 pointer)?
 Also regardless of the number of items in the open array parameter, 16
 bytes works, so it does not relate the length of the TConstArray.

 Your thoughts ?

 David



 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
 unsubscribe

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
 unsubscribe



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] File Path

2011-06-20 Thread David Moorhouse (DUG)

Hi Bob

Info is in the linked article

http://delphi.about.com/od/kbwinshell/a/SHGetFolderPath.htm

Cheers

David

On 21/06/11 05:25, Bob Pawley wrote:

Hi
I have an executable which I need to access that is installed in 
Program Files.
With the advent of 64 byte in Windows 7, I need to distinguish which 
of the two file paths to use depending on the operating system.

Win 7 path - C:\Program Files (x86)\...
or
Win XP path - C:\Program Files\...
Any thoughts on an easy way to do this would be appreciated.
Bob


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] API to Windows explorer

2011-05-12 Thread David Moorhouse (DUG)
 Aside – I heard of one firm that had a server and a Wifi router on a UPS
 that had their network guy park outside with a wifi laptop and copy stuff
 from the server before the UPS died.   Couldn’t go in because the the
 front of the building had fallen out into the street.   Thats a cool idea
 for an emergency backup after the event.

 John

With respect, it's one of the silliest ideas I've heard in a long time
because:
a.) if your business continuity depends on that data being available then
you need to take backup's and DR seriously, and
b.) because endangering your staff like this shows you really don't get
it, and
c.) sitting outside a collapsed building will block access  needed by the
emergency services, and
d. etc

Cheers

David


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Christchurch Members

2011-02-25 Thread David Moorhouse (DUG)
Actually, Jeremy was bunking off work for a week and has invented this 
great big story about being in hospital :)   ...





|
|
|
|
v






... Really glad to hear you're OK buddy.  We've been told Tuesday is the 
earliest we can expect to be back at work.  In the interim there's  
heaps of cleanup work in this neighbourhood.  Tomorrow I'm helping a 
working bee shovel 30cm of silt off mum and dad's place in Dallington :(


Take  care

D


On 25/02/11 20:06, Jeremy Coulter wrote:


We are all fine here. I was in hospital after surgery, 3 floors up un 
a modern building designed to move in a earth quake.I seriously 
don't recommend that to ANYONE! I had a back op. And was stuck in my 
bed whilst it bounced of the front and back walls of my room! 
Fortunately the TV which I thought was about to land on my legs, got 
caught by its cables and missed my bed (and my legs) !


But I have to say, as soon as I heard and then saw the cracking in the 
corner of my room, any pain I had was gone and I was outta there 
!...then my back hurt again L  We eventually got evacuated to the 
newest building the hospital had but that was not so reassuring as the 
floor in the main part of the building had slumped down on and angle 
!! The rest of the building was ok. But man, I wasn't sacred in the 
7.1, But I was f-ing scared this time ! I was surprised when I got 
home which is about 5 mins up the road, to find no new damage to our 
house ! It was a mess with stuff everywhere, but its quite surreal 
looking at TV (as we have power now) and seeing all the destruction 
and going out our front gate to see it the same as it was last 
weekvery weird.


Jeremy

*From:*delphi-boun...@delphi.org.nz 
[mailto:delphi-boun...@delphi.org.nz] *On Behalf Of *Gary T. Benner

*Sent:* Friday, 25 February 2011 15:40
*To:* delphi@delphi.org.nz
*Subject:* [DUG] Christchurch Members

HI all,

It is with great concern that we wait to hear of the wellbeing of our 
friends and colleagues in Christchurch.


I know that John Bird and family are OK, albeit sleeping in the car 
and on friends couches.


When convenient any news would be welcomed.

And of course our love and concern is there for you all.

kind regards

Gary

List Admin


Gary Benner MNZCS ITCP
Information Technology Certified Professional
Director Semantic Limited http://www.semantic.co.nz - Software 
Development  Systems Design, Online Education, e-Commerce
Director 123 Internet Limited http://www.123.net.nz - Managed Web 
Hosting, Virtualisation, High Availability Systems  Cluster Technologies

*Mob:* 021 966 992
*DDI:* +64 7 543 1206
*Email:* g...@benner.co.nz mailto:g...@benner.co.nz
*Skype:* garybenner


Ref#: 41006


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] Indy TidTCPServer question

2011-02-15 Thread David Moorhouse (DUG)

Hi Ross

It's up to you to implement a protocol (e.g. look at the http 
protocol).  Typically maintain some sort of header and payload.


The TCP layer will handle ensuring the messages are delivered, however 
you package the file up, unlike UDP.


Hope this helps

D


On 15/02/11 22:29, Ross Levis wrote:


I'm writing a idTCPClient  idTCPServer apps which as part of their 
functions will be to transfer some files.  I'm using 
idTCPServer.WriteFile() and idTCPClient.Read(Stream) for this purpose 
and it's working well.


My question is really based on a lack of understanding of TCP or how a 
plain idTCPServer handles data transfer.


Should I be sending the file in small chunks and validating the data 
before sending the next chunk, or does idTCPServer do that for me.  
I'm thinking of how an FTP server is implemented which I believe sends 
data in small pieces and awaits feedback after each piece, and I think 
resends a piece if there is a problem.


Cheers.


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] Object is Object vs Object.Classname = 'Object'

2011-01-24 Thread David Moorhouse (DUG)

Have you timed it ?

My gut feeling is the first form is a pointer comparison, so would be 
very quick, whereas the second form is a string comparison so not as quick.


Also the first has the advantage of compile time checking.

0.02c

D

On 25/01/11 17:46, Ross Levis wrote:


Just as a matter of curiosity really, anyone know if there is any 
difference in speed for these 2 operations.


if abc is TMyObject then

and

if abc.Classname = 'TMyObject' then

?


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] Variabels stored

2011-01-20 Thread David Moorhouse (DUG)

Or as field properties if you want to access them from another form ...

type
TWallaceForm = class(TForm)
   btnOK: TButton;
private
  FWallacesPrivateVar: string; // private storage
 public
   property WallacesPrivateVar: string read  FWallacesPrivateVar 
write FWallacesPrivateVar;

...
end;

Cheers

D

On 20/01/11 16:09, Conor Boyd wrote:

Probably as a field on the form class that you're dealing with.
e.g.
type
TWallaceForm = class(TForm)
   btnOK: TButton;
...
  txtWallacesHiddenTextBox: TEdit;
...
private
  FWallacesPrivateVar: string; // use this instead of your 
hidden text box.
// Can create as 
many variables (or fields as they're known in Delphi parlance, hence 
the F prefix)
// of as many 
different types as you like.

...
end;
Hope I've understood what you're asking for correctly.
HTH,
Conor

*From:* delphi-boun...@delphi.org.nz 
[mailto:delphi-boun...@delphi.org.nz] *On Behalf Of *Marshland Engineering

*Sent:* Thursday, 20 January 2011 3:45 p.m.
*To:* delphi@delphi.org.nz
*Subject:* [DUG] Variabels stored

Is there a way to store variables so I can use them from one procedure 
to another?
I have been currently storing them in hidden edit.text boxes on the 
form but there must be a better way.

Cheers Wallace


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] Variabels stored

2011-01-20 Thread David Moorhouse (DUG)
Because a property hides the implementation details ... you can change 
to read / write methods later with no change to the code that is using 
the property.  A public field exposes the implementation.


Cheers

D


On 21/01/11 00:44, Ross Levis wrote:


I don't see the point in doing that, unless the read/write are 
functions or procedures.  Just make the string public.


*From:*delphi-boun...@delphi.org.nz 
[mailto:delphi-boun...@delphi.org.nz] *On Behalf Of *David Moorhouse (DUG)

*Sent:* Thursday, 20 January 2011 11:18 PM
*To:* NZ Borland Developers Group - Delphi List
*Subject:* Re: [DUG] Variabels stored

Or as field properties if you want to access them from another form ...

type

TWallaceForm = class(TForm)

   btnOK: TButton;

private

  FWallacesPrivateVar: string; // private storage

 public

   property WallacesPrivateVar: string read  FWallacesPrivateVar 
write FWallacesPrivateVar;


  ...

end;

Cheers

D

On 20/01/11 16:09, Conor Boyd wrote:

Probably as a field on the form class that you're dealing with.

e.g.

type

TWallaceForm = class(TForm)

   btnOK: TButton;

...

  txtWallacesHiddenTextBox: TEdit;

...

private

  FWallacesPrivateVar: string; // use this instead of your 
hidden text box.


// Can create as 
many variables (or fields as they're known in Delphi parlance, hence 
the F prefix)


// of as many 
different types as you like.


...

end;

Hope I've understood what you're asking for correctly.

HTH,

Conor

*From:*delphi-boun...@delphi.org.nz 
mailto:delphi-boun...@delphi.org.nz 
[mailto:delphi-boun...@delphi.org.nz] *On Behalf Of *Marshland Engineering

*Sent:* Thursday, 20 January 2011 3:45 p.m.
*To:* delphi@delphi.org.nz mailto:delphi@delphi.org.nz
*Subject:* [DUG] Variabels stored

Is there a way to store variables so I can use them from one procedure 
to another?


I have been currently storing them in hidden edit.text boxes on the 
form but there must be a better way.


Cheers Wallace

 
 
___

NZ Borland Developers Group - Delphi mailing list
Post:delphi@delphi.org.nz  mailto:delphi@delphi.org.nz   
Admin:http://delphi.org.nz/mailman/listinfo/delphi   
Unsubscribe: send an email todelphi-requ...@delphi.org.nz  mailto:delphi-requ...@delphi.org.nz  with Subject: unsubscribe



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] Current Registrations

2010-12-01 Thread David Moorhouse (DUG)
Where I work we think it is around 10.

HTH

D


 Does any one know what the Current Registrations count is before you
 need
 to contact Embarcadero to get it reset?
 I had been playing around with some Vm's a while back and I noticed my
 count
 is now 4 :-)


 Thanks, Jeremy
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
 unsubscribe



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] DelphiDroid

2010-11-29 Thread David Moorhouse (DUG)
The linked article gives a great overview of the Android architecture for
people who want to get up to speed with a new platform.

http://www.tbray.org/ongoing/When/201x/2010/11/14/What-Android-Is

D


 I think we're talking about two different things:



 1.There's a proof of concept of a technology that translates
 Delphi
 code to Java.



 2.   There's apparently been some indication somewhere of a Delphi
 compiler targeting Android that has been described as a native compiler.



 imho Java isn't native code in the sense that most people would think
 (native is generally taken to be synonymous with unmanaged).  However,
 it
 could be considered native in the sense that Java is (seemingly) the
 lingua franca of Android.





 Iirc there was talk many, many, MANY years ago of a Delphi compiler that
 could/would/might emit Java Byte Code.







___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Fwd: FW: Delphi XE update 1 fails

2010-11-18 Thread David Moorhouse (DUG)
Thanks

That does the trick - is there alink for the updated documentation
somewhere too pls ?

David

 -Original Message-
 From: Malcolm Groves
 Sent: Friday, 19 November 2010 1:44 PM
 To: 'NZ Borland Developers Group - Delphi List'
 Subject: RE: [DUG] Delphi XE update 1 fails

 David,

 You can download the update manually from the registered users page and
 then
 run it locally. Details are here
 http://www.andreanolanusse.com/blogen/update-1-for-delphi-xe-and-cbuilder-xe-now-available/

 Cheers
 Malcolm

 -Original Message-
 From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
 On
 Behalf Of David Moorhouse (DUG)
 Sent: Tuesday, 16 November 2010 10:11 AM
 To: NZ Borland Developers Group - Delphi List
 Subject: [DUG] Delphi XE update 1 fails

 Hi

 We're trying to install this update from behind a corporate firewall, and
 our web sanitiser (Web Marshall) cannot open the downloaded 7zip files for
 checking.  So no update happening here.

 When is EMB going to come up with something that works for a change ?

 David


 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
 unsubscribe

 CONFIDENTIALITY NOTICE: This email message is for the sole use of the
 intended recipient(s) and may contain confidential and privileged
 information. Any unauthorized review, use, disclosure or distribution is
 prohibited. If you are not the intended recipient, please contact the
 sender
 by reply email and destroy all copies of the original message.



 --
 ---
 Richard Vowles, Technical Advisor
 Developers Inc Ltd
 web. http://www.developers-inc.co.nz
 ph. +64-9-3600231, mob. +64-275-467747, fax. +64-9-3600384
 skype. rvowles, LinkedIn, Twitter
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
 unsubscribe



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


[DUG] Delphi XE update 1 fails

2010-11-15 Thread David Moorhouse (DUG)
Hi

We're trying to install this update from behind a corporate firewall, and
our web sanitiser (Web Marshall) cannot open the downloaded 7zip files for
checking.  So no update happening here.

When is EMB going to come up with something that works for a change ?

David


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Buy One Get One

2010-10-20 Thread David Moorhouse (DUG)

Thnks Richard

There appears to be a bug in the selector 
(http://license-admin.codegear.com/srs6/selection.do?promoId=7)


Based on price, Delphi Prism Ent should entitle you to select Delphi XE 
Ent workstation upgrade  - rather than just Delphi XE Pro ?


See you tomorrow anyway.

D


On 20/10/10 15:40, Richard Vowles wrote:


Yes it sure is! It was discussed today at the event and olivia was 
planning to send out an email. At airport now heading to christchurch 
so will talk to olivia tonight to make sure it gets sent out.


On 20 Oct 2010 06:59, David Moorhouse (DUG) del...@moorhouse.net.nz 
mailto:del...@moorhouse.net.nz wrote:


 Hi Richard

 Is this offer available through Developers Inc ?

 http://www.embarcadero.com/bogo-info


 Thanks

 David

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz mailto:delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz 
mailto:delphi-requ...@delphi.org.nz with Subject: unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

[DUG] Buy One Get One

2010-10-19 Thread David Moorhouse (DUG)

Hi Richard

Is this offer available through Developers Inc ?

http://www.embarcadero.com/bogo-info


Thanks

David

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] You're gonna get an invite tonight!

2010-10-05 Thread David Moorhouse (DUG)

Hi Richard

I'm still waiting for my invite - you can send it to my work address if 
that's easier.


davi...@pegasus.org.nz

Cheers

David

On 30/09/10 16:14, Richard Vowles wrote:

Hi guys,

If all goes to plan, you should get some email from us tonight 
inviting you to the NZ launch (Auckland and Christchurch) of RAD XE. 
Malcolm is coming over and he really is the man for being able to take 
up your issues and answering any questions. I'm the supporting act, 
and I'm looking forward to seeing everyone again.


If you don't have it by tomorrow, please send me an email and I'll 
forward it on.


Richard

--
---
Richard Vowles, Technical Advisor
Developers Inc Ltd
web. http://www.developers-inc.co.nz
ph. +64-9-3600231, mob. +64-275-467747, fax. +64-9-3600384
skype. rvowles, LinkedIn, Twitter



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] formatting a string for HTML

2010-07-28 Thread David Moorhouse (DUG)
In the Internet/HTTPApp.pas unit

function HTTPDecode(const AStr: AnsiString): AnsiString;
function HTTPEncode(const AStr: AnsiString): AnsiString;
function HTMLEncode(const AStr: String): String;
function HTMLDecode(const AStr: String): String;


HTH

David


Original Message ---
Not quite as comprehensive as I was after, but I guess I'll start with 
that - cheers.

Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington


On 28/07/2010 11:55 a.m., Conor Boyd wrote:
 I use the StrHtmlEncode method in the Indy IdStrings.pas unit.

 It's pretty basic, as you will see. ;-)

 HTH,

 Conor

 -Original Message-
 From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
 On Behalf Of Alister Christie

 Is there a nice easy function to convert a delphi string to one that is
 suitable for rendering in a browser (converting  to  etc...).

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
 unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Auckland Event

2009-10-13 Thread David Moorhouse (DUG)
Just move to Chch

We're walking to tomorrow's event :)

CU there tomorrow.

D

Todd Martin wrote:
 Hi Malcolm

 Unfortunately I couldn't make the seminar this morning. Would it be
 possible to schedule future events for the afternoon? If I have to come
 into the city, I prefer to fight the traffic on the way home. That way a
 major delay is not a show stopper and far less stressful.

   
 While I’m posting, just wanted to thank everyone for coming along today.
 The turnout was really pleasing, and I hope you found it useful. With
 those sorts of numbers we’ll be easily able to justify holding more NZ
 events.
 

 Todd.
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
 unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] Excel

2009-09-21 Thread David Moorhouse (DUG)
Hi John

We're using the NativeExcel2 components from nika soft - they give full 
access to all internal excel obejcts i.e. cells, formulas, formatting, 
charts, embedded pictures etc.

Depends what you need.

HTH

D

John Bird wrote:
 Hope this doesn't get lost in the flurry of posts!
  
 Anyone have recommended reading on how to get rows of data out of an 
 Excel spreadsheet.
  
 I do have the option of saving to CSV and reading the CSV file.  
 Depends on what is easiest/cheapest.
  
 John
 

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
 unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] 2010 Launch

2009-08-31 Thread David Moorhouse (DUG)




Hi Richard

What specials would they be :)

Embarcadero or Air NZ ? The air flight specials are OK if you're
retired but a bit limited otherwise.

David



Richard Vowles wrote:
Hi guys,
  
As you may have noticed from Malcolm's posting we are trying to
organize a 2010 launch out here. Keep your eyes peeled and those of you
not in Auckland, watch those specials :-)
  
Richard
  
-- 
---
Richard Vowles, Technical Advisor
Developers Inc Ltd
web. http://www.developers-inc.co.nz
ph. +64-9-3600231, mob. +64-275-467747, fax. +64-9-3600384
skype. rvowles, LinkedIn, Twitter
  
  
  
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe




___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Re: [DUG] How to create a highlighted presentation

2009-07-15 Thread David Moorhouse
Use the Firefox Web Developer extension  to View Generated Source

HTH

D



On Wed, 15 Jul 2009 20:50:24 +1200, you wrote:

Hi all

 

TradeMe has a nice presentation in case you enlarge a photo; background
vague and photo clearly visible. I had a look at their source but can't
really figure out how they do this. Has anybody an idea how to achieve this
presentation?

 

John C


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] SMS Providers in NZ?

2008-12-11 Thread David Moorhouse
We've used 

Dialhog Ltd with good results.

D

-
David Moorhouse
Development Director
Moorhouse Works ltd
phone 027 236 5415
www.moorhouse.co.nz
-

On Mon, 8 Dec 2008 09:45:06 +1300, you wrote:

Is anybody using any SMS gateway providers that are located in NZ? For
texting in NZ, need replies and a NZ number.

 

Service/Support levels?

Website URLS?

 

Thanks

Myles



Attention:
This communication is confidential and may be legally privileged.  If you are 
not the intended recipient, please do not use, disclose, copy or distribute 
it, other than to return it to us with your confirmation that it has been 
deleted from your system.

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Web service - MySQL 4.1 and Delphi 2007

2008-12-11 Thread David Moorhouse
DBX or Zeoslib

http://sourceforge.net/projects/zeoslib
http://zeos.firmos.at/portal.php


D


On Thu, 11 Dec 2008 09:08:52 +1300, you wrote:

Hi All

I am creating a web service that will connect to a MYSQl 4.1 DB that I 
am also creating.  I don't have a lot of MySQL experience but the web 
dev wants me to design  and build the DB (which has to be in the old 4.1 
version).  Anyway, previously I have always used ODBC / ADO to connect 
to other peoples MYSQL DBs however I would rather not do it this way 
this time (for a number of reasons)  What std D2007 components would 
people recommend for this?  DBExpress are there any other options?

Thanks
Rob
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] D2009 or later version suggestion....

2008-12-11 Thread David Moorhouse
I second MMX

D


On Wed, 10 Dec 2008 21:49:01 +1300, you wrote:

MMX displays it

John Bird wrote:
 Incidentally the one enhancement to Delphi I keep finding I would love is a 
 very simple one, and everyone I mention it to also thinks its a great idea:

 If the status bar etc showed the name of the procedure or function the 
 cursor was currently in this would be hugely useful.   I am often searching 
 or scrolling through procedures where the start (ie name) of the procedure 
 is off the top of the screen and there is no easy way to tell if I have 
 overshot the end of the procedure and am now in another one...

 Where is the best place to send a suggestion like this?

 John

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
 unsubscribe

 __ Information from ESET NOD32 Antivirus, version of virus signature 
 database 3680 (20081210) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com


   

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe


Re: [DUG] Dbase File Data Update

2008-10-27 Thread David Moorhouse
Hi Wallace

You need to post the record to make the changes permanent.

HTH

D


On Mon, 27 Oct 2008 18:34:56 +1300, you wrote:

I am trying to increase a value in a dbaseIII file. When I press the Inc 
button, the referenced dbEdit field increases with each click. 

However on exiting the program, the tblData['Jobno']  does not reflect the new 
value. 


From data module.

begin
   tblData.open;
end;


procedure TForm1.bIncClick(Sender: TObject);

var iCurrJobno:integer; 

begin
iCurrJobno:=dm.tblData['Jobno'];
iCurrJobno:= iCurrJobno+1;
dm.tblData.edit;
dm.tblData['Jobno'] := iCurrJobno;
end;


There are probably other ways of doing this, but I would like to know why this 
does not work. 

Thanks Wallace


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Compnent creation question

2008-10-14 Thread David Moorhouse
The window handle has probably been destroyed at this stage - hence the
error.

I'm not near my dev box  - so off the top of my head try over riding the
dispatch method for the OnDestroy method and call your code in there.

HTH

D


On Wed, 15 Oct 2008 16:22:44 +1300, you wrote:

Hi

Just trying to make a TComboBox that automatically frees its items.

I have the following code in the destructor

if (fAutomaticallyFreeObjects = True)
and ((csDesigning in ComponentState) = False) then begin
try
for Counter := 0 to Self.Items.Count - 1 do begin
O := Items.Objects[Counter];
if (O  nil) then begin
   O.Free;
end;
end;
except
on e: exception do begin
ShowMessage(IntToStr(i) + ' ' + 'Attempting to 
automatically free object memory.  The following error occured...' + 
#13#13 + e.message);
end;
end;
end;


I get a 'Control '' has no parent error.  This happens when attempting 
to access the .Items property.  My custom error handling does not trigger.

Any suggestions ?

Thanks
Rob
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] SOAP

2008-08-20 Thread David Moorhouse

Dr Bob http://www.drbob42.com/soap/index.htm

Delphi About
http://delphi.about.com/od/webservices/Developing_Web_Services_with_Delphi.htm

HTH

D

-
David Moorhouse

Moorhouse Works ltd
www.moorhouse.co.nz
-


On Thu, 21 Aug 2008 14:44:21 +1200, you wrote:

On another note, using D2005, can anyone point me to example code or a
tutorial for creating an ISAPI SOAP server? The help isn't much help to
me, and I find the examples on the net a bit bitsy and confusing.

Cheers,
Dave.


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.6/1623 - Release Date: 8/20/2008 8:12 
AM



No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.6/1623 - Release Date: 8/20/2008 8:12 
AM



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] D7 vs D2007

2008-08-11 Thread David Moorhouse
MMX is a very cool tool.  My productivity would suffer without it.  However
you do _need_ a widescreen or secondary monitor to make best use of it.

Cheers

D


On Tue, 12 Aug 2008 09:22:48 +1200, you wrote:

This is available in MMX:

http://www.modelmakertools.com/code-explorer/index.html

(the name of the current method shows in the MMX toolbar - where you can
edit it, change params, visibility, result, etc).

 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert martin
 Sent: Tuesday, 12 August 2008 8:53 a.m.
 To: NZ Borland Developers Group - Delphi List
 Subject: Re: [DUG] D7 vs D2007
 
 
 
 John Bird wrote:
   
  Thinks - the only thing I find myself wishing for often is 
 - I would 
  love for there to be a status line showing the name of the 
  procedure/function I am in the middle of.  As I jump around a lot 
  between units and bookmark points I am forever scrolling up 
 and down 
  to see what procedure I am currently in.  (OK I need a 
 bigger screen).
 
 Oh that would be a great (and simple) feature   So often I am 
 searching through code in a procedure and move into the next 
 procedure, then have to scroll back up to see if I am in the 
 right proc.
 
 Rob
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] 
 with Subject: unsubscribe
 

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.1/1605 - Release Date: 8/11/2008 4:59 
PM



No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.1/1605 - Release Date: 8/11/2008 4:59 
PM



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] OO Programming

2008-07-29 Thread David Moorhouse
My approach depends on the project.

For quick,  cheap and cheerful projects, or utility style applications I
use RAD.  For mid size projects I always use an OO approach.  I've had good
luck with InstantObjects.

Also, ModelMaker is an invaluable tool to help visualise OO code and how
the various parts fit together.  

David

-
David Moorhouse

Moorhouse Works ltd
www.moorhouse.co.nz
-

On Tue, 29 Jul 2008 17:08:08 +1200, Delphi Digest wrote:

Do people on this list put in the effort to write proper object oriented 
code, or write mostly RAD style code, using datasets with data-aware 
controls and stuff - operating on a customer dataset, rather than the 
somewhat more abstract instances of TCustomer for example?  (does this 
question make sense?)


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] List Server Back Up

2008-06-24 Thread David Moorhouse
Been a quiet couple of weeks ;)

D

On Wed, 25 Jun 2008 00:14:42 +1200, you wrote:

HI all,

Well you will have now realised that the Delphi List is back up. Our apologies 
for the outage, but a fried server, including the backup disks, has presented 
some problems, none the least a decent bill from Computer Forensics.

Sorry about the multiple tests earlier, but they had all gone out before I 
realised it. Being the hour  it is, the eyes are red, and the pillow beckons.

cheers

Gary  Steve

List Admins
Ref#: 41006


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Delphi 3 Upgrade

2008-05-26 Thread David Moorhouse
Hi Colin

What version of D5 do you have ?

D


  On the other hand, for some unknown reason  I've just realised that my 
 Delphi 5 is missing the Data Aware components, equivalent to those that were 
 installed into Delphi 3, from file dcld30.dpl and of course needed to do the 
 work.


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Delphi 3 Upgrade

2008-05-26 Thread David Moorhouse
My version installs  DCLDB50.BPL 

Have you got this file on your system.  It lives in the bin directory and
will be on your install disk in the runimages/bin directory.

HTH

D


  Here's all of it :-
 Delphi Standard, Version 5.0 Build 5.62 (c) !983-1999 Inprise Corp
Serial # HDC 1350WW10180


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] ADMIN: Delphi List Issues

2008-04-23 Thread David Moorhouse

Don't handle sending emails yourself. Send them to a good local mail
system such as postfix on Unix and that will deliver your mail much more
reliably.


Actually, my experience is that the server and OS have nothing to do with
it at all.

Cheers

D



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] List Issues

2008-04-22 Thread David Moorhouse
For instace. The time is currently 19:54...what time do you get this
message...anyone


20:33:03

Cheers

D


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Speed of loading a Client DataSet

2007-12-05 Thread David Moorhouse
Hi John

TDatset.FieldByName is slow - and you're repeating it 15,000X5 times.

Much better to declare 5 TField type vars, use TDataSet.FindField or
TDataSet.FieldByName to assign them prior to the loop.

See how you get on.

Cheers

D

On Thu, 6 Dec 2007 15:35:49 +1300, you wrote:

I want to use TClientDataSet for data that is NOT in a database.

Just reading the data from a file, eg for 15000 records, takes much less
than a second, but reading the data and inserting several fields into a
client dataset in a simple loop takes a lot longer, eg 6 seconds or more for
the same 15000 records.

The code I am using is like:

with tbData do
begin
  append;
  fieldbyname('FieldName1').asInteger:=Number1;
   fieldbyname('FieldName2').asInteger:=Number2;
  fieldbyname('FieldName3').asInteger:=Number3;
  fieldbyname('Name').asString:=Name;
  fieldbyname('Desc').asString:=Desc;
  post;
end;

I would like to speed this up, as I have seen that reading similar data from
a Database eg with a query is much faster.  Any suggestions to speed this
up?

I already have lines in such as

 tbdata.DisableControls;
 tbdata.EnableControls;

Before and after I start reading the data to stop screen updates

John


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] SOAP

2007-12-03 Thread David Moorhouse
HTH

Cheers

D


Building a stand-alone Web service with Indy

Abstract: This article shows how to build a Web service using Indy and
Delphi 6. By Dave Nottage.

This article explains how to fit Indy into Delphi 6's Web services (SOAP)
support. For more on creating Web services, please refer to Nick Hodges's
excellent Borland Community article, Shakespeare on the Web.

I can't remember exactly why I built the application that follows. For
whatever reason, I needed to find an easy way of building a stand-alone Web
service -- that is, one that doesn't require a Web server.

A recent post in the borland.public.delphi.webservices.soap newsgroup and a
gentle hint from elsewhere have prompted me to drag out the code, clean it
up, and brush a few of the cobwebs out of my head. This article is the
result.
Fitting Indy into WebBroker

The components in Delphi 6's SOAP support are based around WebBroker.
Typically in a WebBroker application, a component that implements
IWebDispatch lives on a TWebModule. In the case of a SOAP server, it's
THTTPSoapDispatcher:
SOAP Web Module

The major goal here was to leave as much of this default arrangement intact
as possible. So instead of attempting to fiddle with the SOAP components, I
stuck with WebBroker.

Looking at the WebBroker architecture, I noted that the underlying
technology is independent of the type of application. ISAPI, CGI, whatever
-- it doesn't matter. The basic principles are the same: You have a request
from the client (TWebRequest) and a response from the server
(TWebResponse). 

Indy's Request/Response mechanism of TIdHTTPServer is similar, so I figured
I could simply create wrapper classes similar to those used in ISAPI and
CGI applications, and hook them into the CommandGet method of TIdHTTPServer
so requests would be handled.

The result is the code in IndyApp.PAS and IndyHTTP.PAS (which correspond to
xxxApp and xxxHTTP for ISAPI, CGI, COM, and son on). Note that not all of
the methods of TWebRequestIndy and TWebResponseIndy have complete
implementations. Perhaps someone with more knowledge of Indy than I have
can finish it off. g
Turning a WebAppDebugger app into Indy

Since there is no Indy SOAP Server Application wizard (perhaps I'll find
time to build one later), and the aim was to create a stand-alone
executable, the most logical choice was to start with the SOAP Server
Application wizard (File | New | Other, WebServices tab, SOAP Server
Application):
Gallery - Web Services

...and choose Web App Debugger executable. That's just what I did. I used a
dummy CoClass name, because the code generated for it would be removed
later:
New SOAP Server

In the main form unit's implementation:

unit Unit1;

interface

uses
  SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TForm1 = class(TForm)
  private
{ Private declarations }
  public
{ Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses ComApp;

{$R *.DFM}

const
  CLASS_ComWebApp: TGUID = '{44139136-EFD0-4044-8A3C-13484508A833}';

initialization
  TWebAppAutoObjectFactory.Create(Class_ComWebApp, 'Dummy', 'Dummy
Object');

end.

I removed the uses clause, the CLASS_ComWebApp const, and the
initialization section. The conditional define: {$APPTYPE GUI} was not
required, so that was removed also. In the uses clause, I changed COMApp to
IndyApp, and the DefaultPort property was set to what I wanted (1024)
before Application.Initialize, with Active set to true once the main form
had been created.
Service, please

Using the Invokable Wizard (which I co-authored with Borland), I created a
simple interface and invokable class. The implementation unit (DemoImpl)
was added to the project's uses clause (to make sure that the invokable
class is registered when the app runs), and I was away!

I ran the app, pointed my browser at http://localhost:1024/wsdl/IDemo, and
lo and behold, the WSDL was published!

Thanks to my hours of blood, sweat and tears, you too can have your own
stand-alone Web service application, all without the aid of .NET -- or even
a Web server.

Refer to Nick Hodges's article for advice on how to create a Web service
client to access the Web service.

The code for this article can be downloaded here.

Dave Nottage is CEO of Pure Software Technology, a software development
company specializing in Delphi. He can be reached at [EMAIL PROTECTED] and the
company's website is http://www.puresoftwaretech.com

Published on: 8/17/2001 12:00:00 AM




On Tue, 04 Dec 2007 09:14:06 +1300, you wrote:

Hi

I am looking at writing a standalone SOAP server using INDY and Delphi 
2007.  I have been looking for some examples / guides and not found much 
(any pointers would be appreciated).  However I have found an example on 
the codegear site but I just cannot download it.  Whenever I click it it 
asks me to log in (which I am).  Trying to log in again just leaves me 
on the log in page.  Could someone plaassee try and download this 
for me (and email it through 

Re: [DUG] SOAP

2007-12-03 Thread David Moorhouse
LOL - I misread your request.  And now I'm having the same trouble - can
login to the cdn site but keep getting redirected back to the login page.
Looks like something wrong with the codecentral site ?

Cheers

D


On Tue, 04 Dec 2007 10:24:19 +1300, you wrote:

Thanks David

I could read the article but cant download the example (from the 'here' 
link).  Could you possibly download it and email it to me off list ?

Rob Martin
Software Engineer

phone +64 03 377 0495
fax   +64 03 377 0496
web www.chreos.com

Wild Software Ltd



David Moorhouse wrote:
 HTH

 Cheers

 D


 Building a stand-alone Web service with Indy

 Abstract: This article shows how to build a Web service using Indy and
 Delphi 6. By Dave Nottage.

 This article explains how to fit Indy into Delphi 6's Web services (SOAP)
 support. For more on creating Web services, please refer to Nick Hodges's
 excellent Borland Community article, Shakespeare on the Web.

 I can't remember exactly why I built the application that follows. For
 whatever reason, I needed to find an easy way of building a stand-alone Web
 service -- that is, one that doesn't require a Web server.

 A recent post in the borland.public.delphi.webservices.soap newsgroup and a
 gentle hint from elsewhere have prompted me to drag out the code, clean it
 up, and brush a few of the cobwebs out of my head. This article is the
 result.
 Fitting Indy into WebBroker

 The components in Delphi 6's SOAP support are based around WebBroker.
 Typically in a WebBroker application, a component that implements
 IWebDispatch lives on a TWebModule. In the case of a SOAP server, it's
 THTTPSoapDispatcher:
 SOAP Web Module

 The major goal here was to leave as much of this default arrangement intact
 as possible. So instead of attempting to fiddle with the SOAP components, I
 stuck with WebBroker.

 Looking at the WebBroker architecture, I noted that the underlying
 technology is independent of the type of application. ISAPI, CGI, whatever
 -- it doesn't matter. The basic principles are the same: You have a request
 from the client (TWebRequest) and a response from the server
 (TWebResponse). 

 Indy's Request/Response mechanism of TIdHTTPServer is similar, so I figured
 I could simply create wrapper classes similar to those used in ISAPI and
 CGI applications, and hook them into the CommandGet method of TIdHTTPServer
 so requests would be handled.

 The result is the code in IndyApp.PAS and IndyHTTP.PAS (which correspond to
 xxxApp and xxxHTTP for ISAPI, CGI, COM, and son on). Note that not all of
 the methods of TWebRequestIndy and TWebResponseIndy have complete
 implementations. Perhaps someone with more knowledge of Indy than I have
 can finish it off. g
 Turning a WebAppDebugger app into Indy

 Since there is no Indy SOAP Server Application wizard (perhaps I'll find
 time to build one later), and the aim was to create a stand-alone
 executable, the most logical choice was to start with the SOAP Server
 Application wizard (File | New | Other, WebServices tab, SOAP Server
 Application):
 Gallery - Web Services

 ...and choose Web App Debugger executable. That's just what I did. I used a
 dummy CoClass name, because the code generated for it would be removed
 later:
 New SOAP Server

 In the main form unit's implementation:

 unit Unit1;

 interface

 uses
   SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

 type
   TForm1 = class(TForm)
   private
 { Private declarations }
   public
 { Public declarations }
   end;

 var
   Form1: TForm1;

 implementation

 uses ComApp;

 {$R *.DFM}

 const
   CLASS_ComWebApp: TGUID = '{44139136-EFD0-4044-8A3C-13484508A833}';

 initialization
   TWebAppAutoObjectFactory.Create(Class_ComWebApp, 'Dummy', 'Dummy
 Object');

 end.

 I removed the uses clause, the CLASS_ComWebApp const, and the
 initialization section. The conditional define: {$APPTYPE GUI} was not
 required, so that was removed also. In the uses clause, I changed COMApp to
 IndyApp, and the DefaultPort property was set to what I wanted (1024)
 before Application.Initialize, with Active set to true once the main form
 had been created.
 Service, please

 Using the Invokable Wizard (which I co-authored with Borland), I created a
 simple interface and invokable class. The implementation unit (DemoImpl)
 was added to the project's uses clause (to make sure that the invokable
 class is registered when the app runs), and I was away!

 I ran the app, pointed my browser at http://localhost:1024/wsdl/IDemo, and
 lo and behold, the WSDL was published!

 Thanks to my hours of blood, sweat and tears, you too can have your own
 stand-alone Web service application, all without the aid of .NET -- or even
 a Web server.

 Refer to Nick Hodges's article for advice on how to create a Web service
 client to access the Web service.

 The code for this article can be downloaded here.

 Dave Nottage is CEO of Pure Software Technology, a software development
 company specializing in Delphi. He can

Re: [DUG] (no subject)

2007-10-12 Thread David Moorhouse
Hi Al

Wolfgang Ehrhardt has an extensive collection of hash and encryption pascal
code on his home page, including the 128 bit block ciphers AES and Twofish,
the 64 bit block cipher Blowfish, and the stream cipher Salsa20 .

http://home.netsurf.de/wolfgang.ehrhardt/index.html

HTH

D



On Fri, 12 Oct 2007 15:27:51 +1000, you wrote:

Hey guys,

Can anyone recommend a good encryption component?  

Cheers
Al



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Alister Christie
Sent: Thursday,11 October,2007 3:27 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] ExplicitTop.

Yes, I'm half way through it and would recommend it.

We need a Lulu service here in NZ to cut down on the shipping costs.

Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington 



Jeremy North wrote:
 I've been meaning to get a copy actually.

 On 10/11/07, Alister Christie [EMAIL PROTECTED] wrote:
   
 I'd just been reading about them yesterday in Marco Cantu's new book ;-)
 
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
unsubscribe


   
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] D2007 - TDBLookupComboBox and TDBLookupListBox - missing combos in properties

2007-10-03 Thread David Moorhouse
Hi Eric

I've noticed the same thing with D2007.  It did work in D7 so it's not just
me ;)

I can email you the code for a package which will register the property
editors.

Cheers

D



On Wed, 3 Oct 2007 17:01:51 +1200, you wrote:


No, wish it was that simple.  

Actually, what's not happening is that there should be a combo box embedded in 
the value portion of the field type in the object inspector for the control,  
i.e.   in the RHS value pane of say the ListField property.


 Date: Wed, 3 Oct 2007 17:37:15 +1200
 From: [EMAIL PROTECTED]
 To: delphi@delphi.org.nz
 Subject: Re: [DUG] D2007 - TDBLookupComboBox and TDBLookupListBox - missing  
 combos in properties
 
 Eric,
 
 in the Object Inspector
 Right Click and
 Select View
 Select All
 
 Eric A wrote:
  I can't figure out what I'm doing wrong but, for example after placing 
  a TDBLookupComboBox on the form, the combo boxes within the properties 
  in the object inspector have disappeared for the properties of 
  KeyField and ListField.  Strangely enough the combo box for 
  DataField still exists as do the combo boxes for DataSource and 
  ListSource.
 
  Is this a bug or some obscure feature or have I missed a step?
  One can still set those properties by manually typing in the property 
  name but its a pain   I've tried an application ported from Delphi 
  7 as well as a new application in Delphi 2007 and the behaviour is the 
  same.
 
  Thoughts??  Brainwaves??  Logic of this change in behaviour??
 
  Eric
 
  
  Express yourself instantly with MSN Messenger! MSN Messenger 
  http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/
  
 
  ___
  NZ Borland Developers Group - Delphi mailing list
  Post: delphi@delphi.org.nz
  Admin: http://delphi.org.nz/mailman/listinfo/delphi
  Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
 
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] POST from a Delphi win32 app

2007-10-03 Thread David Moorhouse
Hi Steven

Sounds like the perfect job for the Indy IdHTTP component.

Just call its POST method and the html content will be returned as a string
which you can parse to extract what you need.

HTH

D




On Thu, 4 Oct 2007 13:31:20 +1300, you wrote:


  Hi all,
   I need pointing in the right direction please. 

I have a Delphi 2006 win32 application and I want to make it open a web page 
in a browser. 

I have done similar things before using shellexecute to open a web browser or 
the TWebBrowser component but 
this time I want the page to receive some information in some hidden fields. 
Like I pressed a button on a form that caused a POST action.

What should I be looking for to make this happen?

Thanks
Steven Knight 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.ecan.govt.nz
**



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Screen sizes :-)

2007-09-25 Thread David Moorhouse
My main dev set up is 24 at 1600X1200 with a secondary 17 monitor at
1024X1280 (yes sideways !!)

Laptops are 14.1 at 1400 X 1050 and 15 at 1600X1200


With D2007 it is _impossible_ to be productive with less than 1280 across.
1920 allows addins like MMX to be docked.

And the price of 24 monitors continues to tumble ;) 

HTH

D

On Wed, 26 Sep 2007 10:23:37 +1200, you wrote:

Nice easy topic :-)
How big / how many screens you use on your development machine.

At work I have dual 17 lcds. Trying to pitch to the boss and third 
screen, or getting dual 22s.
At home I have a widescreen 19 and 17 lcds. Thinking about going to 
dual 22s.

Anyone here got three screens? (on the same machine ofc).

Anyone using anything bigger then 19?

Churs.

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Source Control - Sharing files between projects

2007-09-25 Thread David Moorhouse
On Wed, 26 Sep 2007 10:12:11 +1200, you wrote:
snip


2. Most development companies must have similar shared source files. How do
you structure your projects and source files? (Note: I am talking about
source files used by projects here, not files which are compiled into VCL
packages) 


Use a branch/project layout rather than a project/branch structure

E.g.
/trunk/common
/trunk/proj1
/trunk/proj2

/branches/common
/branches/proj1
/branches/proj2

/tags/common
/tags/proj1
/tags/proj2


HTH

D



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


OT: Re: [DUG] Screen sizes :-)

2007-09-25 Thread David Moorhouse
On Wed, 26 Sep 2007 11:59:14 +1200, you wrote:
snip 
where we then pay 
the Chinese (and other countries producing these) more money as carbon 
tax for them to produce even more greenhouse gas than we do.  We also 
sell some of them our coal that is supposedly too ungreen for us to use.

Agreed - but it didn't have to be this way.  There were proposals to keep
the carbon charges within the NZ economy and use  the money for incentives
for more efficient plant/equip etc.

Of course lobbying by large scale energy users (and farmers) forced the
govt to back down.  It's a missed opportunity that will bit us in the
future.

Cheers

D




___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Salaries in NZ?

2007-09-13 Thread David Moorhouse
And demographia is affiliated with well known property speculator Hugh
Pavletich, doing his best to increase the urban sprawl of Chch.

Cheers

D



On Fri, 14 Sep 2007 13:37:43 +1200, you wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 Alister == Alister Christie [EMAIL PROTECTED] writes:

Alister Still somewhat cheaper than London or Tokyo.

Not sure about Tokyo, but NZ as a whole is rated as: severely
unaffordable.

  http://www.demographia.com/dhi-ix2005q3.pdf

What people don't know is that you pay the top rate here at 60,000
NZ. At that level you hardly pay taxes in the US or Australia.

Don't lure Europeans here with the idea salaries are lower, but
everything else is cheaper as well. Simply not true.

- -- 
All the best,

Berend de Boer


PS: This email has been digitally signed if you wonder what the strange
characters are that your email client displays.
PGP public key: http://www.pobox.com/~berend/berend-public-key.txt
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 http://mailcrypt.sourceforge.net/

iD8DBQFG6eXnIyuuaiRyjTYRAsQmAKC9IURwyBSkz2ujHC6fKW2dWLFLoQCg8bI+
MYE+YbxJypkC7njICI0xlI0=
=tAk9
-END PGP SIGNATURE-

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Subversion users? Anybody used Devrace Athlant sourcecontrol expert?

2007-09-11 Thread David Moorhouse
I'll second Myles' opinion.

The TortoiseSVN can be used from any Windows file shell such as the Windows
Explorer or straight from Delphi's File Browser.

HTH

D


On Wed, 12 Sep 2007 11:18:37 +1200, you wrote:

We only use TortoiseSVN via explorer.  In fact I have come to prefer
this, rather than using any form of IDE integration.

Myles.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Conor Boyd
Sent: Wednesday, 12 September 2007 11:11
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Subversion users? Anybody used Devrace Athlant
sourcecontrol expert?

Hi all,

We're currently using the VSSConnexion add-in for Delphi to easily
interact with our Visual Sourcesafe repository, and it works very well
(VSSConnexion that is; no comment on Sourcesafe itself!).

However, we're currently migrating our source code to a Subversion
repository.

The VSSConnexion people have a similar tool which works with Subversion,
and if it integrates with the IDE as nicely as their VSSConnexion one
does, I'll be very happy.

However, I've just come across a similar tool called Devrace Athlant.  I
haven't trialled it yet, but I just wondered if anybody on the list has
any experience of it?

On a wider note, how do other people on the list interact with source
control systems from a Delphi development point of view?

We will be using TortoiseSVN for Windows Explorer access to our SVN
repository, but having IDE integration is great (when it's well done).

Interested in your thoughts.

Cheers,

Conor

Conor Boyd
Senior Software Engineer
Caterpillar Trimble Control Technologies
11 Birmingham Drive, PO 8729, Christchurch, New Zealand
Tel: +64 (3) 963 5455 * Fax: +64 (3) 963  5417 * www.trimble.com
   

Black holes are where God divided by zero. (Steven Wright)
http://www.ildica.com/allquotes.php  



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
unsubscribe

Attention:
This communication is confidential and may be legally privileged.  If you are 
not the intended recipient, please do not use, disclose, copy or distribute 
it, other than to return it to us with your confirmation that it has been 
deleted from your system.

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] D2007 - Position of Controls

2007-09-04 Thread David Moorhouse
Edit | Lock Controls

HTH

D

On Wed, 05 Sep 2007 09:10:43 +1200, you wrote:
snip
Isnt there a form property to lock down control positions ?



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Delphi's Object Inspector. Finding a property in D2007

2007-09-04 Thread David Moorhouse
Hi Steve

Right click the OI, select Arrange | By Name

HTH

D


On Wed, 5 Sep 2007 09:54:48 +1200, you wrote:

snip


Is there a way to tell Delphi 2007 to list properties in alphabetical
order where I can find them quickly again?

Steve



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] TDBEDIT funnies

2007-08-29 Thread David Moorhouse
A possible work around is

IsModified := DbEdit1.Modified and DataSet1.Modified;

I suggest you file a QC report.

HTH

D

On Thu, 30 Aug 2007 16:25:57 +1200, you wrote:

Ok, found the full symptom.

Its definitely in D7 and D2007 and its a basic functionality failure.

Once the modified is set due to user edit, it is not reset even when 
posted.  Its not reset when scrolled either.  Unless the new value is 
different to the old one.  So you keep scrolling and modified remains 
set until it hits a record where the value of the field is different 
than before.  Similarly when you go into insert mode, some of the edits 
get their modified set, others do not. 

In the app this paritcular field normally has the same value, hence it 
showed up for it.

Bottom line - CRUD

Alister Christie wrote:
 It's probably because Modified is a property of TCustomEdit and not 
 related to any data-awareness.
 From the Help: Use Modified to determine whether the user changed the 
 Text StdCtrls_TCustomEdit_Text.html property of the edit control. 
 Modified is only reset to *False* when you assign a value to the Text 
 StdCtrls_TCustomEdit_Text.html property. In particular, it is not 
 reset when the control receives focus.

 Alister Christie
 Computers for People
 Ph: 04 471 1849 Fax: 04 471 1266
 http://www.salespartner.co.nz
 PO Box 13085
 Johnsonville
 Wellington


 Rohit Gupta wrote:
 In both D7 and D2007, just on dbedit on one form has a sticky 
 modified property.  Once the value is changed, the modified goes to 
 true and stays there.  Even after post, cancel or scroll, until the 
 form is killed.  Obviously, there is nothing in any event that 
 modifies the value only the user does.

 Has anyone come across this or can postulate a reason for it ?


 -- 
 *Rohit Gupta*
 * B.E. Elec.   M.E.   Mem IEEEAssociate IEE*
 *Technical Manager*
 *Computer Fanatics Limited*
 ** *Tel* +64 9 4892280
 *Fax*+64 9 4892290
 *Email  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]**
 *Web*www.cfl.co.nz http://www.cfl.co.nz/
  
 
 This email and any attachments contain information, which is 
 confidential and may be subject to legal privilege and copyright. If 
 you are not the intended recipient, you must not use, distribute or 
 copy this email or attachments. If you have received this in error, 
 please notify us immediately by return email and then delete this 
 email and any attachments.
 

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with 
 Subject: unsubscribe
 

 No virus found in this incoming message.
 Checked by AVG Free Edition. Version: 7.5.484 / Virus Database: 
 269.12.10/977 - Release Date: 28/08/2007 4:29 p.m.
   
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with 
 Subject: unsubscribe



___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Indy Smtp and XTRA

2007-08-26 Thread David Moorhouse
Xtra were using port 25.  I've another support customer that has switched
away from xtra due to the hassles of last weeeknd.

Wonder how many they lost !

Cheers

D

On Mon, 27 Aug 2007 08:14:47 +1200, you wrote:

I don't know about Xtra, but ISPs sometimes uses non-standard ports for
SMTP sending (maybe in an attempt to cut down on the sending of spam?)
Mine uses 2525 for example.

C.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Bevan Edwards

We don't use Indy, but we have had few problems connecting to Xtra since
the change.  But what are you talking about with port 465?  SMTP uses
port 25.

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Indy Smtp and XTRA

2007-08-26 Thread David Moorhouse
Actrix or Orcon have good service with reasonable prices.

HTH

D

On Mon, 27 Aug 2007 10:03:17 +1200, you wrote:

As well as changing to port 465 and using SSL, you also need to change your
outbound server from smtp.xtra.co.nz to send.xtra.co.nz.

If you don't switch servers, some of the email you send will never arrive -
I can confirm this. A bit like the way some email sent to you isn't arriving
now due to the new spam filters. Like my Borland activation key. Incidently
that must be what happened to the messages they sent out warning of the
upgrade because none of us here received any.

Any recommendations for other ISPs? I intend to ditch Xtra this week.

Cheers,
Carl

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Tracey
Sent: Monday, 27 August 2007 9:39 a.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: RE: [DUG] Indy Smtp and XTRA

I had to change my friend's setup over the weekend.  Some clients wont work
unless you set them to use sll  port 465, some they recommend stay on port
25.  

I don't understand their reasoning but it IS Xtra we are talking about. 

What sort of wers change their smtp server address out of the blue and
leave unskilled users out in the cold??


Xtra



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Bevan Edwards
Sent: Sunday, 26 August 2007 5:39 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Indy Smtp and XTRA

Hi Sandeep,

We don't use Indy, but we have had few problems connecting to Xtra since 
the change.  But what are you talking about with port 465?  SMTP uses 
port 25.

Regards,

Bevan


Sandeep Chandra wrote:
 Hi
 
 I am having difficulty connecting to xtra smtp server after they changed
their smtp server to point to send.xtra.co.nz and port to 465.
 
 Has anyone managed to send emails using xtra after this change and if so
could anyone please give an example of what needs to be done in order for
this to work.
 
 Regards
 
 Sandeep
 
 
 
 



 Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user
panel and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 
 
 
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
unsubscribe
 
 

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
unsubscribe


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Question

2007-08-12 Thread David Moorhouse
Have you set AutoSessionName to True.

This is required for multi threaded apps.

HTH

D


On Fri, 10 Aug 2007 13:54:42 +0530, you wrote:

Hi, 
I have written a web service using Delphi 2005, using BDE and Oracle 9i as 
a backend database (running on Win XP). I have a TSOAPDataModule. It is an 
ISAPI dll hosted on IIS 5.1. It is working fine with a single call (i.e. 
it is retrieving and posting data to database) but for asynchronous call 
it is throwing Cannot perform this operation on a Open Database. I tried 
to use TSession Component - with no result. I am not sure I am using 
TSession correctly or not. Also, I'm open to any other suggestion. I need 
it very badly. Gurus please help me out...
 
Could you please give me an example snippet of using TSession for each 
asynchronous call? Do I create it at run time and what properties do I 
have to set? I have a TDatabase component on the TSOAPDataModule. Do I 
have to make a DB connection using TDatabase during design time? I am 
producing an ISAPI DLL. 

It is too late to convert it to ADO - and I have to solve this problem 
with at least 5 asynchronous calls for NOW. Later on, I might have time to 
change it to ADO. Please provide a quick solution so that I can provide a 
temporary solution by today - tall order? I'm really sorry. Please help... 
with code snippets and instructions...
 
I forgot to add that at present I have a TSession component on 
TSOAPDataModule, not creating any TSession at runtime, and trying to see 
if it can handle more that one call, when the first processing is still 
continuing (reading and writing Oracle database). Is it worth pursuing?
Many thanks! 

Dr Debdarsan Niyogi
Tata Consultancy Services
Plot C, Block EP ,
Salt Lake Electronics Complex
Kolkata - 700091,West Bengal
India
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Experience certainty. IT Services
   Business Solutions
   Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] TIdPeerThread.BeforeRun

2007-08-06 Thread David Moorhouse
Hi Leigh  

Post this one to the Indy NG.

Remy will have you sorted in short order.

Cheers

D

On Tue, 7 Aug 2007 10:13:50 +1200, you wrote:

Good morning,

I am using indy 9.0.18 to in a tcp client/server application.

Here is the code which I have trouble in IdTCPServer.pas

procedure TIdPeerThread.BeforeRun;
begin
  try
if Assigned(Connection.IOHandler) then begin
  Connection.IOHandler.AfterAccept;
end
else begin
  raise EIdTCPServerError.Create('');
end;
  except
Terminate; //APR: was FreeOn Terminate := True; ?! It is ThreadMgr work
raise;
  end;
  if Assigned(Connection.Server.Intercept) then begin
Connection.Intercept := Connection.Server.Intercept.Accept(Connection);
  end;
  Connection.Server.DoConnect(Self); --- The problem

  // Stop this thread if we were disconnected
  if not Connection.Connected then begin
Stop;
  end;
end;

It is quite common to face Socket Error #10054 Connection reset by peer. I
can use normanl try except block on tcp client application to catch the
error and handle it. But what about tcp server?

If Connection.Server.DoConnect(Self); got Socket Error #10054, it will just
let indy routine to handle it. That is not I want. I want to handle this
error myself. How to catch it? Will event OnException of TIdTCPServer pass
the exception to my event handling delphi code?

I really don't want to modify indy code.

TIA

Regards
Leigh


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] basic question

2007-07-25 Thread David Moorhouse
AnInstance := TAnObject.Create;

if that's not a class method I'm not sure what is ;)

D


On Wed, 25 Jul 2007 21:33:25 +1200, you wrote:

Sean

Thanks, I grovel corrected :-), Still little use with no data, ie Data + 
Algorithms = Programs

N
 Class methods have been around for years, explicitly.  As in
 TMyClass.DoSomething, no nil instances required.
  have just looked it up in my Using Delphi 3 (pub 1997) book that I keep
 lying around for no apparent reason, so it's been at least a decade.

 Class variables etc are newer

  
 Regards

 Sean
 ---
 Sean Cross
 mailto:[EMAIL PROTECTED]

 Pics Print - The photo printing solution for Windows. 
 http://www.picsprint.com

 Rental Property Manager - Rental management made easy
 http://www.sourceitsoftware.com
  

   
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:delphi-
 [EMAIL PROTECTED] On Behalf Of Neven MacEwan
 Sent: Wednesday, 25 July 2007 8:19 p.m.
 To: NZ Borland Developers Group - Delphi List
 Subject: Re: [DUG] basic question

 Dennis
 
 Class methods have been around since Delphi 2.  Where have you been
 all these years?
   
 Not explicitly, as I said, you cannot for example call them on the
 class, you call them on a nil instance
 which is hardly elegant php for example you would call a class method
 by
 TClass::Method()

 To reinforce this, why did they introduce a 'class' keyword if they
 were
 already there?

 N
 
 Class types, consts and vars came in D2006, I think, or might be in
 D2005.

 - Original Message - From: Neven MacEwan [EMAIL PROTECTED]
 To: NZ Borland Developers Group - Delphi List
   
 delphi@delphi.org.nz
 
 Sent: Wednesday, July 25, 2007 7:25 PM
 Subject: Re: [DUG] basic question


   
 J

 My point is Delphi (generic) does not have Class Methods/Vars or
 are you saying that 'Delphi' only applies to D2005+

 As for sarcasm, its a matter of opinion I found his response smug.

 N

 
 I'll answer for Chee Wee (not Chee - common mistake)

 These articles were by Nick about changes since Delphi 7.
 http://dn.codegear.com/article/34325 (VCL)
 http://dn.codegear.com/article/34323 (IDE)
 http://dn.codegear.com/article/34324 (Language)

 I don't think his original reply was sarcastic either. Why would he
 need to clarify something, you're the one that didn't do any
   
 research
 
 before saying something. Especially when coming from a version that
   
 is
 
 like 6 years old
 (http://delphi.wikia.com/wiki/Borland_Compiler_Release_Dates).

 Even if you don't run the latest version, it is hardly a great
   
 effort
 
 to subscribe to some blogs (www.delphifeeds.com).

 As for when they came in, they are a by product of Delphi.NET. So
 codegear doing .NET was good for something! So they came into the
 win32 around D2005 and have become less buggy each release since.

 cheers,
 Jeremy

   
 Chee

 When did they sneak in?, Before you get all sarcastic I'd suggest
 
 you
 
 clarify things,
 Some of us are using older versions (D6 in my case)
 
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with
 Subject: unsubscribe


   
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with
 Subject: unsubscribe

 
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with
 Subject: unsubscribe


   
 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with
 Subject: unsubscribe
 

 ___
 NZ Borland Developers Group - Delphi mailing list
 Post: delphi@delphi.org.nz
 Admin: http://delphi.org.nz/mailman/listinfo/delphi
 Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


   

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] basic question

2007-07-24 Thread David Moorhouse
The Delphi compiler creates an implicit parameter to Self and places it before 
the
other params to the method.

Take a look at the TMethod class to see how this works and can be used 
successfully
to redirect code and data.

The code pointer is share by all instances of the object and exists even if the
object has not been created (just declared).  The converse is that each object
instance has its own data pointer which is not initialised until the object is
created by the constructor.

To see this in action, change your execute method to access a property/field of
FormB.  Boom !

Compiler magic - we love it !


D


On Wed, 25 Jul 2007 08:28:03 +0530, you wrote:

Hi,

Is it possible to call a method of a class without creating a object of it,
even if the method is not a class function in Delphi ? I wrote the below
code just to test -

1. Created a simple form A and a button on it.
2. Created another simple form B, written a procedure in it as -
FormB.Execute;
begin
  ShowMessage(xyz);
end;
3. Commented out auto creation of FormB in application.
4. On Button Click in FormA I called the Execute of FormB and it worked
perfectly okay.

What could be the reason for this? I had the idea that either I need to
create an object before calling any method or I need to declare a class
function.

In the above steps when I am trying to call Show in Execute function of Form
B I got Access violation which is perfectly fine according to the above
statement.

May be I am missing something simple here, but any pointers will be great.
This was done in D2005 and it's win32 app.

Thanks
-Ani

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] D 2007

2007-07-19 Thread David Moorhouse
Use the QC client that shipped with D2007.  (Tools|QC)


Project: Delphi
Version: 11 (D2007)


QC client version 1.0.1.21

HTH

D

On Fri, 20 Jul 2007 09:44:34 +1200, you wrote:

I just tried to report my problem to Quality Central.  I can not find a 
suitable area.  Where the heck is D2007 ?  I have entered it under 
Delphi.net and had to select D2006.

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] D2007 - Where's the ActiveX components Gone?

2007-07-17 Thread David Moorhouse
Hi Steve

You can re import the ocx (c:\winnt\system32\vcf132.ocx  ??) file and 
reregister it.

Use the Component | Import Component menu option and follow the wizard.

HTH

D


On Wed, 18 Jul 2007 09:35:42 +1200, you wrote:

Good Morning All,

I'm upgrading an old D7 program that used the Formula One spreadsheet
component from the old ActiveX tab in D7.

I note, that the tab is gone in D2007.

I also note the extensive amount of code that the previous programmer
placed into this particular application to use this component.

Thirdly, I also note the sinking gut feeling when searching google on
this component and any mention of Delphi after about D5.

I also note the Formula one website quotes many, many dollars for
licencing this component.

A sweep of the D2007 companion disk does not give me that component.

Panic is rising to the surface here. Can anyone point me in the right
direction please?

What happened?

Steve

-- 
Steve Peacocke
http://stevepeacocke.blogspot.com/
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


Re: [DUG] Anyone using DWs script components ?

2007-06-21 Thread David Moorhouse
Thanks for the feedback.

There's also some interesting posts on scripting by Allen Bauer at
http://blogs.codegear.com/abauer/archive/2007/06/13/36013.aspx and
http://blogs.codegear.com/abauer/archive/2007/06/14/36043.aspx

D

On Thu, 21 Jun 2007 22:08:34 +1200, you wrote:

We are using them, but not with D2007.  The latter being vapourware  (at 
least for me)  :-)


___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


[DUG] Anyone using DWs script components ?

2007-06-19 Thread David Moorhouse
Is anyone using the DWS scripting components 
(http://sourceforge.net/projects/dws/)
with D2007 ?

There appears to be some changes to the SynEdit components that are 
incompatible .

Cheers

D

___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe