PtList - rollback

Hi!

Maybe someone here can help me. I want to add a rollback behavior to my
PtList. How could I do that?

I’ve tried to intercept the key events of /\ and /, but I couldn’t. PtList
always gets them before my callback and consume these events. I set
Pt_HOTKEYS_FIRST in CONTAINER_FLAGS and unset Pt_CONSUME_EVENTS, but any of
this worked. I considered using Pt_CB_FILTER to get these key events first,
but the cbdata of this callback is NULL, so I may not be able to know which
key was pressed. Could anyone help me?

Thanks,

Vanessa

Vanessa Shimada wrote:

Hi!

Maybe someone here can help me. I want to add a rollback behavior to my
PtList. How could I do that?

I’ve tried to intercept the key events of /\ and /, but I couldn’t. PtList
always gets them before my callback and consume these events. I set
Pt_HOTKEYS_FIRST in CONTAINER_FLAGS and unset Pt_CONSUME_EVENTS, but any of
this worked. I considered using Pt_CB_FILTER to get these key events first,
but the cbdata of this callback is NULL, so I may not be able to know which
key was pressed. Could anyone help me?

Thanks,

Vanessa

There is a callback Pt_CB_SELECTION, attach a callback:

ItemSelection(…)

{
if it is your second time to select the last item, use functions:
PtListSelectPos() select the first one ( top item 1 ) and PtListShowPos
() to show the top item, or use PtListGottoPos(), reset your
mark of second time.

return( Pt_CONTINUE );

}

Regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Thanks!

This may work.

I just have another problem… We don’t have a mouse in our equipament, so
we have to navegate and select an item in PtList by /\ and /. We also don’t
have a key in our keyboard. That’s why my first idea was to get /
and /\ events. Could anyone help with this too?

Thanks very very much,

Vanessa

Vanessa Shimada wrote:

Thanks!

This may work.

I just have another problem… We don’t have a mouse in our equipament, so
we have to navegate and select an item in PtList by /\ and /. We also don’t
have a key in our keyboard. That’s why my first idea was to get /
and /\ events. Could anyone help with this too?

Thanks very very much,

Vanessa

Indeed, I do not know what your keyboard are. Anyway, one solution is
to capture the signal of /\ and / from your specail keyboard in your program,
them use PhEventEmit to simulate arrow key or enter key or which key you
want. How do you make selection in your keyboard?

Regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Hi!

Our keyboard is a special keyboard for medical equipaments, so we just use
some keys.

Yeah, I know PtList only select an item without a mouse if I press ,
that’s also why I tried to capture arrow keys (/\ and /). So, I could send
this event back to widget and after that, send an key pressed event
and the selection would be made. I did this with “+” and “-”, but I would
like to do this with arrow keys too. Would you know how I can get arrow key
events before the widget? Or which flag do I have to set so the widget do
not consume these events? That suggestion you gave me works really fine with
“+” and “-” keys, which are event keys I can get. So, thanks anyway.

Vanessa

You might want to check mkkbd. Writing a .kdef file will
allow you to map you keyboards scan codes to any Photon
key event type.

-----Original Message-----
From: Vanessa Shimada [mailto:vanessa_s@dixtal.com.br]
Posted At: Tuesday, March 06, 2001 9:06 AM
Posted To: photon
Conversation: PtList - rollback
Subject: Re: PtList - rollback


Thanks!

This may work.

I just have another problem… We don’t have a mouse in our equipament,
so
we have to navegate and select an item in PtList by /\ and /. We also
don’t
have a key in our keyboard. That’s why my first idea was to get
/
and /\ events. Could anyone help with this too?

Thanks very very much,

Vanessa

Vanessa Shimada wrote:

Our keyboard is a special keyboard for medical equipaments, so we just use
some keys.

Yeah, I know PtList only select an item without a mouse if I press ,
that’s also why I tried to capture arrow keys (/\ and /). So, I could send
this event back to widget and after that, send an key pressed event
and the selection would be made. I did this with “+” and “-”, but I would
like to do this with arrow keys too. Would you know how I can get arrow key
events before the widget? Or which flag do I have to set so the widget do
not consume these events? That suggestion you gave me works really fine with
“+” and “-” keys, which are event keys I can get. So, thanks anyway.

Could you try to use Pt_END in your callback?


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com