|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
States: realtime exchange of user interface and functionality |
| |||||||||||||||||||||||
|
| |||||||||||||||||||||||
Applies
to: You
can create applications that change looks and functionality on the fly
during runtime, depending on defined criteria. You can define several
States of the application with a specific design and functionality
for each state. Or you can just create a special interface for Popup windows
called by your application using states. button click - which means a user clicks
a button which causes an interface change, If you want to change
the user interface for example when a user clicks a certain link button,
you would scan the URL of the link and trigger a status change when this
URL is loaded or you create an action list (BB Professional only) which
does the navigation and the interface change in one go without scanning. |
||||||||||||||||||||||||
For the following
weblication a state-change via button click has been realized. After the
button click, the interface changes in realtime into a web TV interface
showing the live stream of a music channel. |
||||||||||||||||||||||||
![]() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
![]() |
||||||||||||||
|
|
|
![]() |
|
|
|||||||||||||||||||
|
|
|
|
|
![]() |
|
|
|||||||||||||||||
Setting up states |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
Choose States
from the View menu to open the States panel. It shows you all
the different states of your project. Here you manage the states (interfaces
with different functionality) of your browser.
|
|
![]() |
||||||||||||||||||||||
State change |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
In our example we chose different
colored backgrounds for the Main state and State1. They have the same size in the beginning. |
| |||||||||||||||||||||||
|
|
|
|
|
|
Main State:![]() |
|
|
State1:![]() |
|
|
|
| |||||||||||
Now you can add a button object
to the main state
|
|
![]() |
| |||||||||||||||||||||
If the startsize of the application
for this state needs to be different from the size of the Main State,
you can specify a startsize in the parameter of the Change
State action. The parameter State1,456,340 would change to state 1 and open it in a size of 456x340 pixels. This is especially useful for different background pictures in different states, which might be of different sizes respectively different height/width relations.
|
|
![]() |
| |||||||||||||||||||||
Local and global properties of objects |
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||
Properties of objects can be local or global depending on the type of object. As a general rule, the name of an object, which serves as identifier, is always a global property. This means, if you change the name in one state, it's automatically changed in all other states as well. Another property, which is global in general is the "role" of an edit or panel object. All details and a list of local and global object properties: Global and local object properties
|
| |||||||||||||||||||||||
|
|
|
|
|
|
|
global
property: Startpage
![]() |
| ||||||||||||||||
|
|
|
|
|
|
| ||||||||||||||||||
|
|
|
|
|
|
![]() |
| |||||||||||||||||
|
|
|
|
|||||||||||||||||||||
|
|
|
|
|
|
local
property: size of visible objects |
| |||||||||||||||||
|
|
|
|
|
![]() |
|||||||||||||||||||
|
|
|
|
|
![]() |
|||||||||||||||||||
|
|
|
|
|||||||||||||||||||||
|
|
|
|
Example: Button action as local property: |
|
|
|
|
| |||||||||||||||
|
|
|
|
|
|
![]() |
![]() |
| ||||||||||||||||
|
|
|
|
|
As described above,
object 'Button1' is present in all states, and is shown also in State1,
but without any action assigned. |
| ||||||||||||||||||
|
|
|
|
|
Local properties for 'Button1' in 'State1': |
|
![]() |
![]() |
| |||||||||||||||
Change State versus Set State |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||
You can change the
state of the browser via Change state or Set state actions.
|
||||||||||||||||||||||||
Related topics: |
| |||||||||||||||||||||||
|
| |||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|