Page 1 of 1

Standalone App version

Posted: Wed Feb 10, 2010 9:45 pm
by phaworth
How can I access the Standalone Application Version Information data in my standalone app?
Pete

Re: Standalone App version

Posted: Sun Feb 14, 2010 12:01 am
by Mark
Hi Pete,

You could write a savingStandalone handler in the stack script of your mainstack:

Code: Select all

on savingStandalone
  set the cAppVersion of me to the cRevstandaloneSettings["osx,shortversion"] of me
  pass savingStandalone
end savingStandalone
Now you can check the application version of your stack by checking the cAppversion.

I must say I rarely do this. I set another constant in the stack script of the mainstack, which consists of numbers and dots only. For example:

Code: Select all

constant kVersion = "2.1.0"
constant dot = "."
on foo
  set the itemDel to dot
  put url "http://www.domain.com/sql.php?v=" & \
    item 1 to 2 of kVersion into myLegalLicense
  -- et ceterea
end foo
Best,

Mark

Re: Standalone App version

Posted: Sun Feb 14, 2010 8:26 pm
by phaworth
Thanks Mark.

Sounds like cRevStandalone is customproprty of some sort. I can find no mention of it in the dictionary. Is there any doc of it anywhere?

Re: Standalone App version

Posted: Sun Feb 14, 2010 10:34 pm
by Mark
phaworth,

No, this is not documented, but you can see a list of the cRevStandaloneSettings properties. First, set the standalone settings for a stack. Turn on "Show Revolution UI Elements in Lists" in the View menu. Now open the proeprty insector for your stack. Go to the Custom Properties pane and select the cRevStandaloneSettings property set. Now you will see all the properties in this set. For example, you can see which properties contains the version numbers for each platform.

Keep in mind that this property set is not copied to your standalone, when you create the standalone. You should not rely on it inside standalones. That's why you need to copy the values of the properties in this set to other properties in your stack.

Best,

Mark

Re: Standalone App version

Posted: Sun Feb 14, 2010 11:00 pm
by phaworth
Thanks for this Mark. I was confused as to why you were creating your own co but now I understand.

Re: Standalone App version

Posted: Tue Feb 16, 2010 12:39 am
by phaworth
Now I come to think about it, I'm not seeing why rev provides the ability to define version info for the standalone app and then doesn't make it available within the standalone app. Everyone wants to display what version of the standalone is being used, don't they?

I do have another related issue with this. I used the answer command in my savingStandalone event handler to prompt for what version was being created but I never got a dialog box. Is there some reason why answer dialogs don;t work within that event?

Thanks,
Pete