dcbrowse data aData insert/delete question

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

dcbrowse data aData insert/delete question

#1 Post by skiman »

Hi Roger,

I'm browsing an array and using the INSERT and DELETE options.
INSERT xbeK_ALT_INS EXIT ...
DELETE xbeK_DEL ACTION ...

Now, I want to use also two pushbuttons for the INSERT and the DELETE action. What is the fastest way to accomplish this. Is there some method as oBrowse:insert() I can use as action of the button?
Best regards,

Chris.
www.aboservice.be

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: dcbrowse data aData insert/delete question

#2 Post by reganc »

skiman wrote:Hi Roger,

I'm browsing an array and using the INSERT and DELETE options.
INSERT xbeK_ALT_INS EXIT ...
DELETE xbeK_DEL ACTION ...

Now, I want to use also two pushbuttons for the INSERT and the DELETE action. What is the fastest way to accomplish this. Is there some method as oBrowse:insert() I can use as action of the button?
Can you not just do a PostAppEvent(xbeP_Keyboard,xbeK_ALT_INS,,,oBrowse) from a button?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: dcbrowse data aData insert/delete question

#3 Post by Cliff Wiernik »

Or call the same function from the action codeblock. That is what we do, not for insert/delete but for itemmarked/itemselected.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowse data aData insert/delete question

#4 Post by skiman »

Hi Regan,

Yes, that is maybe the best solution. I will try this.

Hi Cliff,

I expect that this wouldn't work. With the insert/delete in the browse the addition of an element to the array, or deletion of it, is performed inside the code of the browse. This should also be added to the action of the button.
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowse data aData insert/delete question

#5 Post by skiman »

This is working the same way as the INSERT and DELETE key.

ACTION {|| PostAppEvent(xbeP_Keyboard,xbeK_INS,,oBrowseprod) }

ACTION {|| PostAppEvent(xbeP_Keyboard,xbeK_DEL,,oBrowseprod) , setAppfocus(oBrowseprod) }

Thanks for the tip Regan. I never use this PostAppEvent(...) function. I have to keep this in mind.
Best regards,

Chris.
www.aboservice.be

Post Reply