AS2 addCallback Type mismatch - actionscript-2

So I don't get this at all. When I put
ExternalInterface.addCallback('startppt', null,"PlayPPT");
I get Type mismatch. However if i put
ExternalInterface.addCallback('startppt',"PlayPPT");
It takes it fine. Doesn't work when I try to call the function. I used JQuery, normal Javascript just about everything. I think it has something to do with this issue but not certain. THIS IS ACTIONSCRIPT 2 and I check the publishing settings. Any ideas or suggestions would be awesome thanks!

I realized that it should be
ExternalInterface.addCallBack('startppt', null, PlayPPT);
It wasn't the null as mismatch it was the last part I was sending a string when it was expecting a function.

Related

System.InvalidCastException: Unable to cast object of type 'SelectedObjectCollection' to type ,System.Collections.Generic.lEnumerable'1[System.String]

System.InvalidCastException: Unable to cast object of type 'SelectedObjectCollection' to type ,System.Collections.Generic.lEnumerable'1[System.String]
I need help understanding this runtime error. I am fairly sure that the below is the problem, but have not been able to find a solution that works.
Parallel.ForEach(Of String)(Me.clb1.SelectedItems,
Sub(clb1)
Parallel.ForEach(of String)(Me.CheckedListBox1.SelectedItems,
Sub(xxx) <-Not sure what goes here.
The error message highlights the entire Sub but the rest was cut and pasted from working code.
I read the instructions of Lambda and found a simpler example. The is dawned on me what I needed to do.
For cnt = 0 To ListBox1.Items.Count - 1
MyFiles.Add(ListBox1.Items(cnt))
Next
Parallel.ForEach(MyFiles, Sub(F)
Now I need to fix the code to handle the multi-threading code, but that is another question that I am not ready to ask yet. Thanks.

The specified RegistryOptions value is invalid

What im trying to do is write a key to the registry but im stepping from one problem to another, first permissions problem, now this..
This is the line of code.
If PNGchk.Checked = True Then
My.Computer.Registry.Users.CreateSubKey(UserSID & "\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice", True, Security.AccessControl.RegistryRights.FullControl).SetValue("Progid", "SIV.png", Microsoft.Win32.RegistryValueKind.String)
End If
You must have Option Strict Off for that code to even compile, so you might want to fix that to start with. Option Strict On would have flagged issues with that code right away. You should read the documentation or at least pay attention to Intellisense for that method because your second and third arguments make no sense. No overload that I can see has a Boolean parameter and if you want to use a RegistryRights value you do so within a RegistrySecurity object as far as I can see.
RegistryKeyPermissionCheck.ReadWriteSubTree worked for me.
Using clsid64 = view64.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice", RegistryKeyPermissionCheck.ReadWriteSubTree)
clsid64.SetValue("StubPath", "SIV.png")
clsid64.Close()
End Using

Stimulsoft code based variables won't show their value

I´m losing my mind here, I've tried every example I've found online and still can't get it to work, this is the way im creating the variable on the code that generates the report, I'm working on a .NET application:
report.Dictionary.Variables.Add(New Stimulsoft.Report.Dictionary.StiVariable("test",""))
report("test") = "ANYTHING"
While it does show me the created variables on the Stimuloft gui, it contains absolutely nothing, any ideas on what I'm doing wrong? Thanks!
You should use next code to set value of variable:
report.Dictionary.Variables("test").Value = "ANYTHING"
The code that you use will work after calling report.Compile() method only.

How to combine Wix variables

I can use "!(bind.property.ProductVersion)" to set for example the UpgradeVersion\#Minimum attribute. Works fine.
But now I want to set that attribute to something like:
"!(bind.property.ProductVersion.Major).!(bind.property.ProductVersion.Minor).0.0"
But that does not work.
I get this error: The UpgradeVersion/#Maximum attribute's value, '!(bind.property.ProductVersion.Major).!(bind.property.ProductVersion.Minor).0.0', is not a valid version. Legal version values should look like 'x.x.x.x' where x is an integer from 0 to 65534.
Any ideas how I can get this to work?
Regards, Jaap
Unfortunately, it appears the version attribute is only allowed to have a single binder variable to replace the whole string. It doesn't support the scenario you describe. However, it seems like it should. You could file a bug at http://wixtoolset.org/bugs

Using System.Diagnostics.PerformanceCounterCategory.GetInstanceNames

When I use System.Diagnostics.PerformanceCounterCategory.GetInstanceNames call, I always get 0 instances returned the first time. If I actually query for a counter value first (using perfmon) and then call GetInstanceNames, it works fine. Can someone provide some insight? Do I need to get a counter value first (in code) and then use the GetInstanceNames?
I found the answer. I added a call to System.Diagnostics.PerformanceCounterCategory.ReadCategory before trying GetInstances. That seems to fixed the issue I was seeing.