app.StageCode gets modified at runtime ?

hi,

I have a small routine that gives me the actual version of the app in all my programs.

[code]Function CompleteApplicationVersionNumber() As String
dim ch as String

ch = “Version “+str(app.MajorVersion)+”.”+str(app.MinorVersion)
if app.BugVersion > 0 then ch = ch + “.”+str(app.BugVersion)
Select case app.StageCode
case Alpha
ch = ch+"? "
case Beta
ch = ch+" "
case Development
ch = ch+"? "
case Final
ch = ch+" "
end Select

if app.NonReleaseVersion<>0 then
ch = ch+" ("+str(app.NonReleaseVersion)+")"
end if

Return ch

End Function
[/code]

this worked fine until yesterday I noticed the “” did not appear anymore
I traced the program and at the “select” line of the routine, the App.StageCode has a value of 3 that means “Final”
and in the IDE beta is selected …
I made a new empty project and pasted the method, and I got the attended “” so the problem is in my (big) application.
but then I saw that this property StageCode cannot be modified out of the IDE…
so how can it be ?
It worked fine on the same app I compiled 3 months ago. In the period, I switched from RS2012 to Xojo2015
but I reopened the source in RS2012 and I still have the same problem at the same place.

any idea(s) ? thanks.

no one ? :frowning:

Do you do any post processing on the built application ?

no post processing, no ide script, no code profile, it’s a plain mac os desktop app with no appstore only for limited customers
but I admit it’s a big one with sqlite database interface

No manipulation of the plist on OS X etc ?
The reason I ask is thats where this is retrieved from

nothing of this kind.
when xojo compiles, does it delete the previous application, or merge the code into the existing one ?
should I delete the previous compiled app ?

this is the info.plist of my app - the version is 1.0.21 and there should be a after (at least is selexted in the ide…)

[code]<?xml version="1.0" encoding="UTF-8"?>

CFBundleDevelopmentRegion fr CFBundleExecutable MultiFish CFBundleIconFile App CFBundleIdentifier com.mycompany.MultiFish CFBundleInfoDictionaryVersion 6.0 CFBundleName MultiFish CFBundlePackageType APPL CFBundleShortVersionString CFBundleSignature VNS1 CFBundleVersion 1.0.21 LSMinimumSystemVersion 10.7 NSHumanReadableCopyright 2013-2015 VeryNiceSW UTImportedTypeDeclarations UTTypeIdentifier public.text UTTypeTagSpecification com.apple.ostype TEXT public.filename-extension asc ascii bas c class cp cpp h hp hpp i3 java m2 m3 mak text txt [/code]

and I have the same issue if I run in compiled mode, or in debug mode.

This looks to have been altered
CFBundleVersion
1.0.21

From an empty desktop app built with the stage code set to alpha its
CFBundleVersion
1.0.0.1.0

with it set to development
CFBundleVersion
1.0.0.0.0

with it set to beta
CFBundleVersion
1.0.0.2.0

and set to final
CFBundleVersion
1.0.0.3.0

Alpha beta etc are the 4th digit which yours doesn’t have for some reason

how did I do that ? I did not touch the info.plist, xojo generates it for me…

No idea without looking at your project

thanks Norman, any idea in the code where I should look at ?

Are you using App Wrapper to bundle your app? That can modify version numbers.

no appwrapper for me. this happens also if I run the program from the ide in debug mode
so without any post treatment

Unless you’re modifying it in the IDE set up or in some post processing step I cant think of any thing in your code that could / would modify it

Do a search for “StageCode” and see if anything is modifying it?

it’s a read-only property … only modifyable in the IDE app “shared” editor !
so it should not be modified !

did the search anyway : appeared 2 times : one in the app property
and one in the method I posted above…

I cant reproduce this and I have no idea why this would be occurring on your end if you’re not doing something like wrapping it for submission to the app store etc

Do you have any post-build scripts?