Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Super Contributor
JeffLemon
Posts: 391
Registered: ‎01-13-2011
My Carrier: NA

Passing touch event - signal/slots?

I get the error when running the app:

 

PVR:smileysad:Warning): InitContext: ignoring buffer type CBUF_TYPE_PDS_VERT_SECONDARY_PREGEN_BUFFER [778, /eglglue.c]

 

This only has occcured sine I have added in passing a touch via signal/slot. The signal/slot worked fine before I passed the touch value.

 

I was just wondering if I was going wrong somewhere:

 

h:

	public slots:
		void HandleImgTouch(bb::cascades::TouchEvent* event);

 

implementation:

 

bool res = QObject::connect(myImage, SIGNAL(touch(bb::cascades::TouchEvent *)), this, SLOT(HandleImgTouch(bb::cascades::TouchEvent* event)));

 

void MyClass::HandleImgTouch(bb::cascades::TouchEvent* event)
{
	
	if (event->touchType() == TouchType::Down)
	{
		//do something
	}


}

 

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
Contributor
mariomunera89
Posts: 15
Registered: ‎10-10-2012
My Carrier: N/A

Re: Passing touch event - signal/slots?

I think that you should change the SLOT parameter from 

SLOT(HandleImgTouch(bb::cascades::TouchEvent* event))

to 

SLOT(HandleImgTouch(bb::cascades::TouchEvent*))

According to the Touch Interaction documentation https://developer.blackberry.com/cascades/documentation/dev/touch/index.html

Please use plain text.