IDE Script Issue...

I believe it’s a me issue, but I’m creating some IDE Scripts so when I build, I get two Mac files, one MAS friendly, one for the main website. I’ve kind of discovered the code this from the new Xdev mag article. For now, I’ve created a simple script just to create the MAS file, however, the Constant works fine so I get the build I want, however the Mac filename remains the same as what I’ve set in the IDE. Any thoughts?

dim appName as string = PropertyValue("App.MacOSXAppName") dim path As String ConstantValue("frmMain.kAppleMAS") = "True" PropertyValue("App.MacOSXAppName") = appName + " MAS" path = buildApp(7, true) ConstantValue("frmMain.kAppleMAS") = "False" PropertyValue("App.MacOSXAppName") = appName

Thanks, Richard

It works but to reset the app.MacOsxAppName you have to do:
PropertyValue(“App.MacOSXAppName”) = appName +""

or for some reason (bug?) it will not be reset to the original name

[quote=18502:@Antonio Rinaldi]It works but to reset the app.MacOsxAppName you have to do:
PropertyValue(“App.MacOSXAppName”) = appName +""

or for some reason (bug?) it will not be reset to the original name[/quote]

Hum, I can’t get the first name change , adding " MAS" to even work.

Thanks.

I literally took your script - copied & pasted
Set up a new project with one window named frmMain and added a constant to it - kAppleMAS as a boolean and initially set it false

I commented out the last two lines JUST to see if the script worked (so it was as follows)

dim appName as string = PropertyValue("App.MacOSXAppName") dim path As String ConstantValue("frmMain.kAppleMAS") = "True" PropertyValue("App.MacOSXAppName") = appName + " MAS" path = buildApp(7, true) ' ConstantValue("frmMain.kAppleMAS") = "False" ' PropertyValue("App.MacOSXAppName") = appName

Ran the script
It set the name the way I expected (originally it was called “bananas” and after running it was “bananas MAS”
the constant was still true

so then I changed those items back and uncommented the last two lines & ran
And it still worked
Not sure what else to say

Thanks Norman,

I believe I’ve cracked it, basically I had renamed the Application class to my apps name. Renamed it back to App and it worked. What threw me was this in the docs.

So, yup it was me. :slight_smile: All sorted now.

Cheers

Ah no in an IDE script it has to be the App class’ actual name - App will NOT work here (but will work in your apps code)

Norman, can you confirm that to “reset” the app name to the original value you have to write
PropertyValue(“App.MacOSXAppName”) = appName+""

In my test if I I write only PropertyValue(“App.MacOSXAppName”) = appName then the app name remains the modded one.

I’ve not encountered any such issue

It seems that setting the property only affects the Cocoa build, not the Carbon build.