Dot Notation Bug in Powershell Stutio 2012

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
amandhally
Posts: 10
Joined: Mon Mar 19, 2012 10:01 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally » Tue Aug 07, 2012 6:58 pm

Hi, I am using PowerShell studio 2012 Version 3.0.7There is bug in using Dot Notation in primal studio. When we save any thing is variable in PowerShell studio and when we use Dot notation with that variable it never shows the corresponding Properties and methodsthis is the error and ideally it should work like this { below screenshot is from from my another vendors Powershell editor}This same thing happen with .NET Objects .thanksaman dhally

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Dot Notation Bug in Powershell Stutio 2012

Post by davidc » Wed Aug 08, 2012 4:08 am



This
isn't a bug, but a byproduct of the way PowerShell Studio handles variables.

PowerShell
Studio tries to determine the variable state without running the script. Every
time you run a script in PowerShell Studio, it creates a new runspace, thus
variables states are not retained.



It
David
SAPIEN Technologies, Inc.

User avatar
amandhally
Posts: 10
Joined: Mon Mar 19, 2012 10:01 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally » Thu Aug 16, 2012 5:20 am

HI David,Thanks for the reply...So what is the best way to do this? after all we need to know what is stored in a variable.. {string}thanksaman

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Dot Notation Bug in Powershell Stutio 2012

Post by davidc » Thu Aug 16, 2012 5:44 am

You have
the option to run the scripts in the console and then interrogate the variable
to determine what it contains. $var.GetType() If you know what the type is you can cast the variable in the editor to get PrimalSense support:[string]$var = ... David
David
SAPIEN Technologies, Inc.

User avatar
amandhally
Posts: 10
Joined: Mon Mar 19, 2012 10:01 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally » Thu Aug 16, 2012 5:47 am

hummm....okies... if that is the only way :) thanks for the support david.aman

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Dot Notation Bug in Powershell Stutio 2012

Post by davidc » Thu Aug 16, 2012 6:30 am

Like I said, we are looking into a hybrid system so you need not worry about this. David
David
SAPIEN Technologies, Inc.

User avatar
amandhally
Posts: 10
Joined: Mon Mar 19, 2012 10:01 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally » Thu Aug 16, 2012 6:33 am

thanks David :)