Corona SDK Runtime Error on version 3.0.0 - coronasdk

I used a Older Corona SDK but i installed recent version 3.0.0 . When is tried to use stateText:setReferencePoint(display.CenterReferencePoint); it shows following runtime error! in newer version Corona SDK. What's the problem? can anyone suggest me any solution? Image of my Error

First, Corona SDK version numbers are something like the year and a four digit build number. The current public build for instance is 2014.2189, so I don't' know what 3.0.0 is. But that said,
:setReferencePoint() was an API in our older Graphics 1.0 based engines (build numbers less than 2000). They have been replaced by Anchor Points in Graphics 2.0 based builds (build numbers 2000 and greater).
You have two choices. If you want to continue to use :setReferencePoint() you must add this to your config.lua where you set the width and height:
graphicsCompatibility = 1,
Or you can switch to using AnchorPoints. See the tutorial: http://coronalabs.com/blog/2013/10/15/tutorial-anchor-points-in-graphics-2-0/

Related

How to detect Windows 11 using Delphi 10.3.3

I use TOSVersion.ToString function (uses SysUtils) to detect Windows version. However this is what I get in Windows11:
Windows 10 (Version 10.0, Build 21996, 64-bit Edition)
Is there any reliable way to detect Windows 11? I'm using Delphi 10.3.3.
UPDATE: Windows 11 is officially released and I tried again.
Here is what I get:
Windows 10 (Version 10.0, Build 22000, 64-bit Edition)
As Remy pointed out: using the WinAPI you risk of being in some compatibility mode, resulting in getting a version reported that is lower than the actual.
One alternative is to check the file version of expected files, i.e.
%windir%\system32\ntoskrnl.exe or
%windir%\explorer.exe
using GetFileVersionInfo() and VerQueryValue() - the HiWord(dwFileVersionLS)
should be 22000 or higher (according to Windows NT build/release number).
Another is to look in the Registry under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ at the text values CurrentBuild and CurrentBuildNumber, checking if the highest of both is 22000 or higher.
David already wrote a detailled answer in Checking Windows version on W10 with even more alternatives, although concentrating on the high/low version numbers, not the build. But WMI might help.
(This only works in retrospective with confirmed knowledge.) Check which API exports are available: the idea is that specific functions were introduced with specific Windows releases/versions, so if importing fails for one you know you're on a version below. An outdated example and an outdated list of minimum versions per function will give you an idea. Now you "only" have to find out which new functions are introduced with Windows 11.
Those are all not bulletproof, but you could combine them and then draw conclusions. And after all that you can still try your approach to parse texts instead of relying on numbers only. It also shows how easily you can manipulate your system into reporting different versions as per which method is used.
Official major version number for Windows 11 is 10.
The official build number for the public preview of Windows 11 is
10.0.22000.168
Earlier builds:
10.0.22000.71
10.0.22000.65
10.0.22000.51
Microsoft Windows 11 FAQ
If you want to detect Preview versions, earliest build number was 10.0.22000.51 Windows 11 version history
TOSVersion relies on some hard coded names and logic to return OS name. You will have to implement your own detection, copy and modify TOSVersion record or make wrapper around it, where you can use existing logic for older versions and implement check based on Windows 11 build number to detect Windows 11.
For other general issues and approaches in detecting OS version you can refer to AmigoJack's answer
Except the very weak, atleast for me, solution of considering Windows 10 builds greater than 22000, such as Windows 11, the only solution I found which is actually working is the WMIs Win32_OperatingSystem class - Caption property.
On my dev Win10 machine, it gives the following string: Microsoft Windows 10 Pro.
On my another dev machine, with Win11 installed, the same function gives: Microsoft Windows 11 Pro.
The difference is in string values - "10" vs "11"- but this is at least something far better than the "build greater than" solution.
C# and C++ work well.
The simplest way is to get the version of Kernel32.dll and if Major Version is 10 and Build Version is >= 22000 then you have Windows 11.
See my code here: How can I find the Windows product name in Windows 11?

Is it okay to use the latest version of opencv?

I am learning to use opencv. I am trying to install it from opencv official website. Is it okay to install the latest version(4.0.0)? I suppose that latest version should be compatible with the earlier versions so there shouldn't be any problem.
Is it okay to install the latest version(4.0.0)
Generally: Yes, why not? If you want to use the newest modules (like gapi, added in 4.0.0) you will need to use the newest version. It also makes a lot of sense to use the newest because they improved the performance for some operations compared to version 3.x.x.
I suppose that latest version should be compatible with the earlier versions so there shouldn't be any problem
Not necessarily. Version 4 to 3 might be compatible (I'm still using 3.x.x), but 3 to 2 are in fact not completely compatible. Most noticeable they moved a lot of functionality from the highgui package. From the official change log:
Although OpenCV 3 can be viewed as refined OpenCV 2 and is similar to the latter, this new version is not completely backward-compatible with OpenCV 2
I'd recommend you to read the official changelog for yourself and decide if you need the new functionality or if you want to stay with an older version. If you are new to OpenCV it probably makes sense to start with the newest version.

In which version of Neo4j Community i can use point

I found here that neo4j has a new spatial type point , i downloaded 4.1 and 3.3.5 community versions (which are the latest versions) and they both return this error
Neo.ClientError.Request.Invalid: Point is not yet supported as a return type in Bolt
in which version i can use point() ?
It's available from the 3.4 series so you don't have to use the alpha pre-release version if you don't want to.
I tried the alpha pre-release 3.5.0 version and it works

Build version 1.2 or 1.2.0 for App Store

I'm doing a new build and am increasing the build number. My guess would be that I should use 1.2.0 instead of 1.2 if we're looking at Semver versioning. But, I don't know if Apple forces that and I would like if someone can link some official documentation (which I can't seem to find).
While uploading new version or new build in same version make sure the pair of version number & build number must be unique.
Case-1 : Adding new version
Make sure you need to increase version number
Lets say if previous version number was 1.3 than next will be 1.4 or 2.0 or like that. It should not be less than 1.3
Regarding build number for new version you can simply set 1.0.
Later on if you required to upload new build for same version you just need to increase build number. While version no will be remain same.
Case-2 : Adding new Build to same existing version
In the case if you required to upload new build for same version you just need to increase build number. While version no will be remain same.
Important note :
Here is the Apples official documentation that explains more about the build no & version no : https://developer.apple.com/library/ios/technotes/tn2420/_index.html
Hope it will guide you.

Compiling different scetions for different version - Java

Is there any way to compile BlackBerry Java code for different sections using eclipse ?
There is a class named LocationInfo available in BB version OS 6.0 onwards.
I get a compilation error if try to compile for OS 5 (because LocationInfo is
not defined)
But if I compile my code for OS 6, I wont be able to deploy on any 5 based devices.
I want to my code base to be of version 5 and support the methods of Locationinfo (which is available only in 6.0 onwards).
Is a sectional compile possible or is there any work around for this ?
Thanks
Try the BlackBerry preprocessor
Coding for Multiple Blackberry Devices - Using Preprocessor Directives in Eclipse
The OP wanted to know whether there was a way to a class available in os 6.0 , in an os 5.0 device. The blackberry processor does help in creating builds for different versions, but doesnt answer the question. The OP would like to know whether there is the blackberry equivalent to androids "Support Package" or the "Compatibility package" which allows to use APIs that are not available for older platform versions.
Sorry , but there is no similar package on blackberry which you can use to address your issue.
You will have to use blackberry pre processor and then develop features for different devices based on the os they provide. Later OS's will have more apis you can play with, so you can implement better features on those. In earlier OS's you are stuck with using the restricted set of api methods, and hence some features may not be implemented on those.
Hope this helps

Resources