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.

inside custom component

Native Development

Reply
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook

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
Contributor
Posts: 15
Registered: ‎10-10-2012
My Device: Blackberry 10 Dev Alpha

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