How to display a variable/property in a textdiplay
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



How to display a variable/property in a... Expand / Collapse
Author
Message
Posted 7/17/2007 11:28:30 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 7/30/2007 6:06:51 PM
Posts: 25, Visits: 36
Hello,

   I know you can put an attribute in a textdisplay simply by putting the name of the attribute between [ ] such as [Stimulus]. However, can you do the same for variables and properties of objects ? I know you can use e-basic to change the content of .text but I was wondering if you could add in a variable (like, say, "strWord") or a property (such as "Stimulus.duration" or something) in the GUI without using a script.

  Thnaks

Post #509
Posted 7/18/2007 8:06:33 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Today @ 9:26:59 AM
Posts: 576, Visits: 1,254
The context is the bridge between pulling items from Lists and script values.

The use of the [attrib] in the objects requires the value to be in the context.  The main way to use the [attrib] values is to place items in a List object.  The 2nd most common is via script using the c.SetAttrib command in script.  There are some built in items too like [[Running].Sample].

Because the nature of the language, it would be near impossible or highly inefficient to automatically post all script variables into the context.  In addtion, that would make for a very large data file.

-Brandon

Post #511
Posted 7/18/2007 11:41:46 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 7/30/2007 6:06:51 PM
Posts: 25, Visits: 36
Thank you for the information.

In the same line of though, it is possible to display the [ and ] symbols in a textdisplay object ?

Post #512
Posted 7/19/2007 7:50:22 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Today @ 9:26:59 AM
Posts: 576, Visits: 1,254
I believe that is actually an outstanding issue with E-Studio.  It will be able to handle a [ OR a ], but if they are together it will treat them as an attribute.  If you do require those characters then you'll need to set them at runtime.

Stimulus.Text = "This is an [example] of assigning"

Note that the [attrib] expands to looking up attributes in E-Studio.  The only place the [attrib] is recognized at runtime is when the value is assigned to a List.

-Brandon

Post #515
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 9:31pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.141. 12 queries. Compression Disabled.