🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.dotnet
4 messages
4 total messages Started by Brigitte Spatz Tue, 17 Oct 2006 09:21
Problem with CurrencyManager.Count
#137
Author: Brigitte Spatz
Date: Tue, 17 Oct 2006 09:21
29 lines
1783 bytes
       if (bm.Count < 0) then begin //bm is a CurrencyManager
         dn_delete.Enabled  := False;
         dn_save_btn.Enabled  := False;
         dn_create_new.Enabled  := False;
       end;

The above runs successfully.

       if (bm.Count < 0) then begin
         dn_delete.Enabled  := False;
         dn_save_btn.Enabled  := False;
         dn_create_new.Enabled  := False;
         TabControl1.Enabled := False;
       end;

This doesn't. It comes up with "no value at index 0." And so does

       if (bm.Count < 0) then begin
         dn_delete.Enabled  := False;
         dn_save_btn.Enabled  := False;
         dn_create_new.Enabled  := False;
	messagebox.show('blabla');
       end;

I don't understand it. What's wrong here?

TIA.

Brigitte
Re: Problem with CurrencyManager.Count
#138
Author: Marc Rohloff TeamB
Date: Tue, 17 Oct 2006 22:59
9 lines
1303 bytes
On Tue, 17 Oct 2006 11:21:30 +0200, Brigitte Spatz wrote:

>        if (bm.Count < 0) then begin //bm is a CurrencyManager

How can the Count be less than 0?

-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Re: Problem with CurrencyManager.Count
#139
Author: Brigitte Spatz
Date: Wed, 18 Oct 2006 07:13
12 lines
1420 bytes
Marc Rohloff [TeamB] wrote:
> On Tue, 17 Oct 2006 11:21:30 +0200, Brigitte Spatz wrote:
> 
>>        if (bm.Count < 0) then begin //bm is a CurrencyManager
> 
> How can the Count be less than 0?
> 
sorry, there was an = missing. Should have read <= 0. Similarly,
if (bm.count > 0) then
//ok here
else
//exception occurs here.
Re: Problem with CurrencyManager.Count
#146
Author: Marc Rohloff TeamB
Date: Fri, 20 Oct 2006 00:05
13 lines
1452 bytes
On Wed, 18 Oct 2006 09:13:26 +0200, Brigitte Spatz wrote:

> sorry, there was an = missing. Should have read <= 0. Similarly,
> if (bm.count > 0) then
> //ok here
> else
> //exception occurs here.

Can you post the stack trace?

-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads