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
Regular Visitor
Posts: 1
Registered: ‎02-12-2013
My Device: none
My Carrier: AT&T
Accepted Solution

bb::LowMemoryWarningLevel comparison compiler error

new to this development environment :-(

 

https://developer.blackberry.com/cascades/reference/libbb/memoryinfo_lowmemory.cpp.html

 

the lines:

if (level == bb::LowMemoryWarningLevel::LowPriority)  {...}

if (level == bb::LowMemoryWarningLevel::HighPriority) {...}

 

 

have the compiler error: 

 

no match for 'operator==' in 'level == 

(bb::LowMemoryWarningLevel::Type)1u'

 

thanks for any advice 

 

Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: bb::LowMemoryWarningLevel comparison compiler error

There seems to be an error in the sample code:

 

1) Replace bb::LowMemoryWarningLevel with bb::LowMemoryWarningLevel::Type in method argument.

 

2) Replace void onAwake(); in slots with:

public Q_SLOTS:
	void onLowMemory(bb::LowMemoryWarningLevel::Type level);

 After these changes it compiles.


Andrey Fidrya, @zmeyc on twitter