Application Information - how to read from settings

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Application Information - how to read from settings

Mark Stuart
Hi all,
Anyone know how to read the stacks Standalone Application Settings?
Such as:
Product Name, File Version, Product Version, Comments, Legal Trademarks, etc...

I don't want to have to duplicate my own globals or constants and have to maintain them.

And what are the variable names for these settings?

Regards,
Mark Stuart
Regards,
Mark Stuart
-----------
LC 4.6.4
LC Community 6.5
WinXP/7/8
32bit and 64bit
Reply | Threaded
Open this post in threaded view
|

Re: Application Information - how to read from settings

Richard Gaskin
Mark Stuart wrote:

> Anyone know how to read the stacks Standalone Application Settings?
> Such as:
> Product Name, File Version, Product Version, Comments, Legal Trademarks,
> etc...

Those are stored in a custom property set named cRevStandaloneSettings,
which are part of the mainstack of the stack file that becomes your
executable.

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Application Information - how to read from settings

Mark Stuart
Hi Richard,
I placed a button on the Main stack and put this script into it:

on mouseUp
   put the cRevStandaloneSettings of this stack into tSettings
   answer tSettings
end mouseUp

but it displayed nothing in the dialog.

What am I missing?

Regards,
Mark Stuart
Regards,
Mark Stuart
-----------
LC 4.6.4
LC Community 6.5
WinXP/7/8
32bit and 64bit
Reply | Threaded
Open this post in threaded view
|

Re: Application Information - how to read from settings

Richard Gaskin
In reply to this post by Mark Stuart
Mark Stuart wrote:

> Hi Richard,
> I placed a button on the Main stack and put this script into it:
>
> on mouseUp
>    put the cRevStandaloneSettings of this stack into tSettings
>    answer tSettings
> end mouseUp
>
> but it displayed nothing in the dialog.
>
> What am I missing?

That's a custom property set, not a single property.  To get those
values you can do this:

   put the customPropertySet["cRevStandaloneSettings"] \
    of stack "MyStack" into tMyArray

That gives you the array of data; you can see all the values with:

   combine tMyArray with return and tab
   put tMyArray



--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Application Information - how to read from settings

Mark Stuart
Hi Richard,
Now that you gave me the custom property name, I searched the archive for it, and found very helpful information on how to find the Standalone properties in the main stack.

I think this kind of stuff should be readily available to a rev developer and not "hidden" in a custom property, as it does not appear in a search in the Dictionary or in the User Guide. These are the basic things for a developer to want to access, for their application.

Regards,
Mark Stuart
Regards,
Mark Stuart
-----------
LC 4.6.4
LC Community 6.5
WinXP/7/8
32bit and 64bit
Reply | Threaded
Open this post in threaded view
|

Re: Application Information - how to read from settings

J. Landman Gay
In reply to this post by Richard Gaskin
Richard Gaskin wrote:

> Mark Stuart wrote:
>> Hi Richard,
>> I placed a button on the Main stack and put this script into it:
>>
>> on mouseUp
>>    put the cRevStandaloneSettings of this stack into tSettings
>>    answer tSettings
>> end mouseUp
>>
>> but it displayed nothing in the dialog.
>>
>> What am I missing?
>
> That's a custom property set, not a single property.  To get those
> values you can do this:
>
>   put the customPropertySet["cRevStandaloneSettings"] \
>    of stack "MyStack" into tMyArray
>
> That gives you the array of data; you can see all the values with:
>
>   combine tMyArray with return and tab
>   put tMyArray

That'd be best because you'd get a text listing. But Mark, if you just
want to look at them, you can also do this:

Turn on Revolution UI Elements in Lists in the View menu.
Open the property inspector for the stack.
In the custom properties pane, look for the cRevStandaloneSettings
property set.
Click on it and all the properties will display.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Application Information - how to read from settings

Richard Gaskin
In reply to this post by Mark Stuart
Mark Stuart wrote:

> Hi Richard,
> Now that you gave me the custom property name, I searched the archive for
> it, and found very helpful information on how to find the Standalone
> properties in the main stack.
>
> I think this kind of stuff should be readily available to a rev developer
> and not "hidden" in a custom property, as it does not appear in a search in
> the Dictionary or in the User Guide. These are the basic things for a
> developer to want to access, for their application.

They're just custom properties.  As Jacque noted, they're readily
accessible in the IDE through the Inspector.

I agree that particular set of props is very useful, because they
contain the essentials that define much of your app:  its name, version,
document types, etc.

With that info stored in one tidy place, all sorts of tools can use it
to make generalized components, from version management to installers
and frameworks and a whole lot more.

I believe Trevor's framework uses it, as do mine and Ken's, and it's
been proposed in the Rev Interoperability Group that we use them
whenever practical going forward:

<http://tech.groups.yahoo.com/group/revInterop/>

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution