Re: [DUG] Validating a TListItem exists

2011-02-01 Thread Todd
e. It's up to you... J *From:* delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] *On Behalf Of *Ross Levis *Sent:* Tuesday, 1 February 2011 18:45 *To:* 'NZ Borland Developers Group - Delphi List' *Subject:* Re: [DUG] Validating a TListItem exists ListView.Items.Ind

Re: [DUG] Validating a TListItem exists

2011-02-01 Thread Jolyon Smith
lto:delphi-boun...@delphi.org.nz] On Behalf Of Ross Levis Sent: Tuesday, 1 February 2011 18:45 To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating a TListItem exists ListView.Items.IndexOf() does the trick, so I'll do that in the meantime.

Re: [DUG] Validating a TListItem exists

2011-01-31 Thread Ross Levis
[mailto:delphi-boun...@delphi.org.nz] On Behalf Of Ross Levis Sent: Tuesday, 1 February 2011 13:30 To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating a TListItem exists I was hoping to avoid that. I was thinking there may be a way of validating that it is st

Re: [DUG] Validating a TListItem exists

2011-01-31 Thread Jolyon Smith
lf Of Ross Levis Sent: Tuesday, 1 February 2011 13:30 To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating a TListItem exists I was hoping to avoid that. I was thinking there may be a way of validating that it is still a TListItem the pointer is pointing to, so

Re: [DUG] Validating a TListItem exists

2011-01-31 Thread Ross Levis
phi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Jolyon Smith Sent: Tuesday, 1 February 2011 10:59 AM To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating a TListItem exists AFAIK when an item is deleted from a listview it is also free'd. Unavoidably.

Re: [DUG] Validating a TListItem exists

2011-01-31 Thread Robert martin
Hi Sorry about the delayed response.  Without knowing your system and why you cant guaranty an item is deleted from the TList at the same time as the ListView an option might be to use the listview in ownerdata mode so that the listview is populated from the TList. 

Re: [DUG] Validating a TListItem exists

2011-01-31 Thread Jolyon Smith
land Developers Group - Delphi List' Subject: [DUG] Validating a TListItem exists I'm storing some TListItem's in a TList. Some of these items could be removed from the listview at some stage. I know the items should be removed from the TList when removed from the listview,

[DUG] Validating a TListItem exists

2011-01-30 Thread Ross Levis
I'm storing some TListItem's in a TList. Some of these items could be removed from the listview at some stage. I know the items should be removed from the TList when removed from the listview, but don't ask. Is there a simple method to determine if a listitem reference is still valid and exis

Re: [DUG] Validating CDS files

2011-01-17 Thread Kyley Harris
t; > > > > > > > *From:* delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > *On Behalf Of *Kyley Harris > *Sent:* Tuesday, 18 January 2011 1:40 p.m. > > *To:* NZ Borland Developers Group - Delphi List > *Subject:* Re: [DUG] Validating CDS files > &

Re: [DUG] Validating CDS files

2011-01-17 Thread Alister Christie
rs Group - Delphi List Subject: Re: [DUG] Validating CDS files > Those developers that came back with "TO DO" lists were perhaps themselves > not taking the time to understand the customers problems. The customer > told > them "those 10,000 f

Re: [DUG] Validating CDS files

2011-01-17 Thread Jolyon Smith
> You are making an assumption that the analysis has not been already done. > You are assuming that people are not adequately informed. That can only be determined by inquiring. I'd rather not assume that someone is fully informed - that is a more dangerous assumption. Of course, one can never

Re: [DUG] Validating CDS files

2011-01-17 Thread David Brennan
you would have got there ;-) Cheers, David. From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Kyley Harris Sent: Tuesday, 18 January 2011 1:40 p.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Validating CDS files I'm wondering

Re: [DUG] Validating CDS files

2011-01-17 Thread Matthew Comb
f Matthew Comb >> Sent: Tuesday, 18 January 2011 11:12 a.m. >> To: NZ Borland Developers Group - Delphi List >> Subject: Re: [DUG] Validating CDS files >> >> > Those developers that came back with "TO DO" lists were perhaps >> themselves >> &

Re: [DUG] Validating CDS files

2011-01-17 Thread Matthew Comb
> You seem to be missing your own time and money factor... an hour spent > analysing a problem can save days spent wasting time building the solution > that was asked for but which ultimately wasn't needed. You are making an assumption that the analysis has not been already done. > > >"Thats

Re: [DUG] Validating CDS files

2011-01-17 Thread Kyley Harris
njoying my popcorn as I watch... > > -Original Message- > From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On > Behalf Of Matthew Comb > Sent: Tuesday, 18 January 2011 11:12 a.m. > To: NZ Borland Developers Group - Delphi List > Subject: Re: [D

Re: [DUG] Validating CDS files

2011-01-17 Thread Jolyon Smith
To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating CDS files Mmmm, I'm enjoying my popcorn as I watch... ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.

Re: [DUG] Validating CDS files

2011-01-17 Thread David Brennan
Mmmm, I'm enjoying my popcorn as I watch... -Original Message- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Matthew Comb Sent: Tuesday, 18 January 2011 11:12 a.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Validating CDS

Re: [DUG] Validating CDS files

2011-01-17 Thread Jolyon Smith
You seem to be missing your own time and money factor... an hour spent analysing a problem can save days spent wasting time building the solution that was asked for but which ultimately wasn't needed. "Thats just rubbish" Such a comprehensively and well presented case is hard to argue with.

Re: [DUG] Validating CDS files

2011-01-17 Thread Matthew Comb
> Those developers that came back with "TO DO" lists were perhaps themselves > not taking the time to understand the customers problems. The customer > told > them "those 10,000 features are great, but we'd really like X, Y and Z", > so > the developers simply came back to you with that list of "X

Re: [DUG] Validating CDS files

2011-01-17 Thread Jolyon Smith
Those developers that came back with "TO DO" lists were perhaps themselves not taking the time to understand the customers problems. The customer told them "those 10,000 features are great, but we'd really like X, Y and Z", so the developers simply came back to you with that list of "X, Y and Z".

Re: [DUG] Validating CDS files

2011-01-17 Thread Matthew Comb
delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On Behalf Of Matthew Comb > Sent: Monday, 17 January 2011 10:34 p.m. > To: NZ Borland Developers Group - Delphi List > Cc: 'NZ Borland Developers Group - Delphi List' > Subject: Re: [DUG] Validating CDS fi

Re: [DUG] Validating CDS files

2011-01-17 Thread Matthew Comb
> > -Original Message- > From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On > Behalf Of Matthew Comb > Sent: Monday, 17 January 2011 22:34 > To: NZ Borland Developers Group - Delphi List > Cc: 'NZ Borland Developers Group - Delphi List&

Re: [DUG] Validating CDS files

2011-01-17 Thread Jolyon Smith
Developers Group - Delphi List Cc: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating CDS files Hi Jolyon, I almost wish I hadn't asked this question now :) I'm well aware of the options, and setting up a webservice to retrieve a hashed/checksumed payload s

Re: [DUG] Validating CDS files

2011-01-17 Thread Cameron Hart
- Delphi List Cc: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating CDS files Hi Jolyon, I almost wish I hadn't asked this question now :) I'm well aware of the options, and setting up a webservice to retrieve a hashed/checksumed payload set, is our pr

Re: [DUG] Validating CDS files

2011-01-17 Thread Jolyon Smith
: Monday, 17 January 2011 22:34 To: NZ Borland Developers Group - Delphi List Cc: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Validating CDS files Hi Jolyon, I almost wish I hadn't asked this question now :) I'm well aware of the options, and setting up

Re: [DUG] Validating CDS files

2011-01-17 Thread Matthew Comb
no ? > > > -Original Message- > From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On > Behalf Of Matthew Comb > Sent: Monday, 17 January 2011 19:20 > To: NZ Borland Developers Group - Delphi List > Subject: Re: [DUG] Validating CDS files &

Re: [DUG] Validating CDS files

2011-01-17 Thread Kyley Harris
> much due to an infrequent access to some data that is already corrupt on > the > server as it is to some sporadic wireless network corruption, no ? > > > -Original Message- > From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On > Behalf Of M

Re: [DUG] Validating CDS files

2011-01-17 Thread Jolyon Smith
To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Validating CDS files Paul, Thanks for your thoughts, I was tending towards reverse engineering the format, I could not see any obvious tokens at footer, and wondered if someone had beaten me to it. I actually prefer the simplicity

Re: [DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
Paul, Thanks for your thoughts, I was tending towards reverse engineering the format, I could not see any obvious tokens at footer, and wondered if someone had beaten me to it. I actually prefer the simplicity of your idea of compressing/encrypting the xml file. Thats a tidyier solution for now u

Re: [DUG] Validating CDS files

2011-01-16 Thread Paul Heinz
Matthew wrote: > I wasn't suggesting that wireless was changing byte > structure, but if you are streaming data, and your datastream > gets disconnected, then you could end up with an incomplete transfer. > > I'm not 100% sure that midas catches all scenarios when > working off a remote data i

Re: [DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
ather than in the communication of the data > ? > > > Because if that's the case then checksuming will of course be a waste of > time > > > -Original Message- > From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On > Behalf Of Todd

Re: [DUG] Validating CDS files

2011-01-16 Thread Todd
gt; Behalf Of Todd > Sent: Monday, 17 January 2011 14:22 > To: NZ Borland Developers Group - Delphi List > Subject: Re: [DUG] Validating CDS files > > Hi Matthew > > It sounds like comparing a MD5 hash of the CDS file prior to sending and > subsequent to receiving the dat

Re: [DUG] Validating CDS files

2011-01-16 Thread Jolyon Smith
course be a waste of time -Original Message- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Todd Sent: Monday, 17 January 2011 14:22 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Validating CDS files Hi Matthew It sounds like compar

Re: [DUG] Validating CDS files

2011-01-16 Thread Todd
ously/intuitively means "is a valid XML representation >>>> of a >>>> CDS file" but for a CDS file, if you dumped it from a client data set >>>> in >>>> the >>>> first place, what additional valida

Re: [DUG] Validating CDS files

2011-01-16 Thread Alister Christie
It might be best to ask on stackoverflow at this point. From looking at the code for LoadFrom and SaveTo Stream it doesn't look like there is any information that you can use to validate the file format easily. You are probably stuck with loading the .cds file to validate it. Alister Christie

Re: [DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
Hi Jolyon, Everything you say is right. I could bore you with how our smart client architecture works , how much data we're pushing and what happens at each point, but at the end of the day, it all will end up back to the beginning which is the need to know the state of a binary CDS file before lo

Re: [DUG] Validating CDS files

2011-01-16 Thread Jolyon Smith
> What I'm really after is a file level test to check that file should even > be attempted. e.g. open file stream seek start and seek end and check a > couple of bytes... that type of thing. It seems to me that such a check would be incomplete and therefore unreliable and that you may introduce th

Re: [DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
org.nz] > On Behalf Of Matthew Comb > Sent: Monday, 17 January 2011 12:44 p.m. > To: NZ Borland Developers Group - Delphi List > Subject: Re: [DUG] Validating CDS files > > The driver for the question, is that we have some application client > datasets which are put into a defa

Re: [DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
gt; the >>> first place, what additional validation would be needed to ensure that >>> it >>> is >>> a CDS file ? >>> >>> >>> -Original Message- >>> From: delphi-boun...@delphi.org.nz >>> [mailto:delphi-boun...@delphi.

Re: [DUG] Validating CDS files

2011-01-16 Thread Leigh Wanstead
: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Matthew Comb Sent: Monday, 17 January 2011 12:44 p.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Validating CDS files The driver for the question, is that we have some application client datasets

Re: [DUG] Validating CDS files

2011-01-16 Thread Todd
le ? >> >> >> -Original Message- >> From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] >> On >> Behalf Of Matthew Comb >> Sent: Monday, 17 January 2011 10:27 >> To: NZ Borland Developers Group - Delphi List >> Subjec

Re: [DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
- > From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On > Behalf Of Matthew Comb > Sent: Monday, 17 January 2011 10:27 > To: NZ Borland Developers Group - Delphi List > Subject: Re: [DUG] Validating CDS files > > Hey Cam, for space size reasons, we're us

Re: [DUG] Validating CDS files

2011-01-16 Thread Jolyon Smith
hat it is a CDS file ? -Original Message- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Matthew Comb Sent: Monday, 17 January 2011 10:27 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Validating CDS files Hey Cam, for space size reasons, we

Re: [DUG] Validating CDS files

2011-01-16 Thread Alister Christie
You could of course just try to load it very roughly: function IsCDSVaild(file : string) : boolean var cds : TClientDataSet begin result := true; cds := TClientDataSet.Create; try cds.LoadFromFile(file); except result := false; end cds.free; end Alister Christie Com

Re: [DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
sage- > From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] > On Behalf Of Matthew Comb > Sent: Monday, 17 January 2011 10:03 a.m. > To: NZ Borland Developers Group - Delphi List > Cc: NZ Borland Developers Group - Delphi List > Subject: [DUG] Validating CDS files >

Re: [DUG] Validating CDS files

2011-01-16 Thread Cameron Hart
Developers Group - Delphi List Subject: [DUG] Validating CDS files Does anyone know if there is a way to Validate a CDS file (midas) before attempting to load it into the dataset ? Matt ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@del

[DUG] Validating CDS files

2011-01-16 Thread Matthew Comb
Does anyone know if there is a way to Validate a CDS file (midas) before attempting to load it into the dataset ? Matt ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi U

Re: [DUG] Validating uniqueness in a TDataset

2008-04-23 Thread Rohit Gupta
I let it happen and then capture the exception Simon Garton wrote: Quick question : how do I validate uniqueness in a TDataset ? I have some data aware controls and a TDBNavigator; I can check other validation stuff in the BeforePost event, but is there a sensible way of testing whether the

Re: [DUG] Validating uniqueness in a TDataset

2008-04-23 Thread Alister Christie
The most basic way of doing this would be to do a bit of sql in your BeforePost event and see if that field is already used. If you don't know anything about the data underneath the TDataSet then this could be a bit tricky. Alister Christie Computers for People Ph: 04 471 1849 Fax: 04 471 1266

[DUG] Validating uniqueness in a TDataset

2008-04-23 Thread Simon Garton
Quick question : how do I validate uniqueness in a TDataset ? I have some data aware controls and a TDBNavigator; I can check other validation stuff in the BeforePost event, but is there a sensible way of testing whether the field ‘name’ (which has a unique constraint in the database) already exist

[DUG]: Validating

2000-12-30 Thread João Alberto
I need a code that validate a date entered from a DBEdit (with a mask __/__/__), include the manipulation of the return key. I'm trying and only getting errors and errors, argh !!! I put a code in the application's onKeyDown, that detects the keydow, return and keyup keys, for passing from one con