Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SetItem in Filter and Delete Buffer

595 views
Skip to first unread message

James Woodger

unread,
Dec 9, 1997, 3:00:00 AM12/9/97
to

I'm writing a general purpose function and I need to do a SetItem in the
Filter and Delete buffer. I can't use the object syntax because the
column name / value to update is being passed programmatically.

Although SetItem doesn't come out and say it, it certainly appears to
operate only on the Primary buffer.

In order to do my SetItem, two ugly alternatives come to mind:
1. Create a DataStore, assign the DataObject to this DW, move the row
from the Delete buffer to the DS, do the SetItem and move the row back
to the Delete buffer.
2. Move the row from the Delete buffer to the Primary buffer (with
redraw off), do the SetItem, move the row back to the Delete buffer and
turn redraw back on.


Is it really this much of a pain or am I missing a simpler solution?


Boris Gasin [TeamPS]

unread,
Dec 9, 1997, 3:00:00 AM12/9/97
to

On Tue, 09 Dec 1997 11:57:24 -0500, in
powersoft.public.powerbuilder.datawindow James Woodger
<jwoo...@sympatico.ca> wrote:

SetItem is limited to the Primary buffer. Looks like it is this much
of a pain. Your solutions look good. Hopefully you can do it in the
ancestor.

--
Boris Gasin [TeamPS]
mailto:bga...@advent2000.com

Have a heart,
http://home.sprynet.com/sprynet/JCredit/eds_stry.htm

Saxon D'Aubin

unread,
Dec 9, 1997, 3:00:00 AM12/9/97
to

I think the object syntax might still work for you. Try something like
this -

GenericSetItem(datawindow dw, long row, int column, dwbuffer b, any value)
Choose Case b
Case Primary!
dw.Object.Data[row, column] = value
Case Filter!
dw.Object.Filter.Data[row, column] = value
Case Delete!
dw.Object.Delete.Data[row, column] = value
End Choose

Of course, this takes the column as an integer, but you can easily get the
column # given the column name...


James Woodger wrote in message <348D7873...@sympatico.ca>...

0 new messages