Subject RE: [IBO] DrawCell method query
Author Alan McDonald
Interesting... this is the code which makes the panel visible

PnlViewAdmin.Visible := True;
with dmLocalStore do begin
if not IB_QStockCodes.Active then begin
IB_QProjOffsEdit.Open;
IB_QStockCodes.Open;
IB_QStoneGroupLookup.Open;
IB_QStoneDescLookup.Open;
IB_QStockTypeLookup.Open;
IB_QWareHouse.Open;
IB_QArea.Open;
with dmLocalStore do begin
IB_QStockCodes.DisableControls;
IB_QStockCodes.Bookmark := qbmStockType;
IB_QStockCodes.EnableControls;
end;
end;
end;
irLastPanelView := 1;
ActiveControl := IB_Grid1;

The panel is set to visible, then the queries are opened... The query in
question here is IB_QWarehouse... If I move it up the list and open it in
number 3 position (instead of number 6), there is no error. I think it must
be asynchrony in the drawing of the grid starting before the queries are
opened. I shall move them up to before I set the panel visible. If the
number of queries had been fewer, it may never have shown up as an error
until perhaps I got a 2GHz CPU machine...

thanks for your help

Alan

-----Original Message-----
From: Lester Caine [mailto:lester@...]
Sent: Tuesday, 4 February 2003 8:14 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] DrawCell method query


> no my fields are all populated - they are not null boolean Y/N fields
> I have since found that
> if (IB_Query1.BufferFields[4].AsString='Y') then
> works where
> if (IB_Query1.BufferFieldByName('myboolfield').AsBoolean='Y') then
> does not

This is Delphi stuff isn't it - AsBoolean will return
true/false not a character?
So
if (BufferFieldByName('myboolfield').AsBoolean) then

> Not sure why... any clues?
> secondly
> what is the difference between using the DrawCell event and the
GetCellProps
> event for doing this task?
> Why is there a DrawCell and DrawFocusedCell when you can test for focused
> state in the DrawCell event anyway?

Historic compatibility ( I think <g> )

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/