I am trying to set up Microsoft Custom Translate on Memsource based on these instructions:
I get a message saying the category parameter is invalid. What should I set the parameter as?
Related
I'm trying to creating a global service in angular app with BehaviorSubject.
I have created a method in this service where I have defined a HTTP get method and loading JSON file.
Now the issue I'm facing is when I'm subscribing this BehaviourSubject as asObservable in any component and assign the result to a particular variable in the typescript file, the HTML template renders this value correctly via structured Directive *ngFor but when I'm trying to get the same value in typescript file, it does not work.
For example;
When I'm trying to print this value
console.log(this.data.boxes.length);
then it gives me an error
[ERROR TypeError: Cannot read property 'length' of undefined]
and when I'm trying to print this value without length
console.log(this.data.boxes);
it gives me a proper value of an array in the console panel.
Now If I change BehaviorSubject to Subject, then its working fine means I am also getting length value.
However, I want to use BehaviorSubject instead of Subject.
What am I doing wrong and how can I achieve it?
Behavior subject is emitting current value to subscriber even if subject next is not called before subscription, in other words:
yours subscription is subscribed to subject before first "next" value. I assume that initial value of behavior subject is undefined or similar, so that first value that is emitted to subscriber is causing error.
Could you check declaration of subject and ensure that initial value is in correct form, like:
public exampleSubject = new BeahviourSubject<yourType[]>(<yourType[]>[]);
My code is fairly standard, if people need to see more I can provide but essentially I am just trying to access a field's ButtonLayout property. I know the field I am accessing is a button, b/c I Added it previously in the code and I can review it once the file saves.
The last line below is the one that doesn't work. I get the error "Object doesn't support this property or method". I am using MS Access 2016 with the Adobe Acrobat 10.0 Type Library. In contrast I can access the Value, and the BorderStyle properties and set them just fine.
Set pdDoc = avDoc.GetPDDoc()
Set jso = pdDoc.GetJSObject
jso.getField("buttonImage1")..BorderStyle = "beveled"
jso.getField("buttonImage1").buttonImportIcon CStr(photoSet!Photo)
jso.getField("caption1").Value = CStr(photoSet!Caption)
jso.getField("buttonImage1").ButtonLayout = "1" 'This is the only line that doesn't work
I'm wanting to build an app for validating projects using custom error numbers I've defined similar to:
try
## do something
on error number -2700
display dialog "Foobar"
end try
with the help of JSON Helper defining the list as:
tell application "JSON Helper"
set myJSON to make JSON from {-1232:"missing definition", -123231:"foo", -1232314:"bar" }
return myJSON
end tell
however I do not see a way to do this after referencing:
Error Numbers and Error Messages
Working with Errors
other then using a bloated conditional like:
try
open for access file "MyFolder:AddressData" with write permission
on error msg number n from f to t partial result p
if n = -49 then -- File already open error
display dialog "I'm sorry but the file is already open."
else
error msg number n from f to t partial result p
end if
end try
After researching I was unable to populate anything other than "What techniques work to handle errors in AppleScript so I can place a dialog?" so is there a way in AppleScript I can write error handling similar to Error Numbers and Error Messages documentation?
It's possible with a property list items.
This script put a record in a new property list item
Use the error number as string to get the value in the property list items
set myRecord to {|-1232|:"missing definition", |-123231|:"foo", |-1232314|:"bar", |-49|:"I'm sorry but the file is already open.", |-43|:"This file wasn’t found."}
tell application "System Events" to set myPlist to make new property list item with properties {kind:record, value:myRecord}
try
open for access file "MyFolder:AddressData" with write permission
on error number n
tell application "System Events" to set r to value of first property list item of myPlist whose its name is (n as text)
display alert r
end try
Question of JMichaelTX
Here's a script to save a property list items to a PLIST file (In the Preferences folder in this example).
set plistPath to (path to preferences folder as string) & "errorsMsgs.plist"
tell application "System Events"
set myPlist to make new property list item with properties {kind:record, value:myRecord}
make new property list file with properties {contents:myPlist, name:plistPath}
end tell
I need to take the current value of a field from the record displayed on an open Access form and put the text in that field into a VBA string programmatically. This seems so simple but I have not yet been to find any guidance from either an aftermarket Access 2013 text I purchased or the Internet. I have tried everything I can think of with no success whatsoever so I posted a question on stackoverflow.com and received the following suggested solution:
Dim strYourString as String
strYourString = Forms![Your Form Name].[Field Name].Value
When this is run I get:
Runtime error ‘438’
Object doesn’t support this property or method
Any help will be greatly appreciated!
Try using a bang symbol in front of the field name, instead of a period.
strYourString = Forms![Your Form Name]![Field Name].Value
^---------------------Bang symbol here
This is supported by the documentation here on MSDN. Note the implicit form:
Forms!OrderForm!NewData
where NewData is the name of a control. Or you can use an explicit reference:
Forms!OrderForm.Controls!NewData
If you want to refer to a field in the underlying recordset of the form instead, use:
Forms!MyForm.Recordset.Fields("MyFieldName")
I am trying to use TimeSpanPicker in my application. How Can I set the value to "00:00:00"? For example, I am creating an instance and setting the Value to "00:00:00" but it seems that
I should not assign a String ("00:00:00") to ts.Value.
enter code here
TimeSpanPicker ts= new TimeSpanPicker();
ts.Value="00:00:00";
Error: Cannot implicitly convert type 'string' to 'System.TimeSpan?
How can I set TimeSpanPicker's value?
Thanks,
Bahador
If you take a close look at the error you are getting, it says that it can not automatically convert a string to a TimeSpan and that the Value is expecting a TimeSpan. If you further look at your TimeSpan Object you will find that it has a Parse Method. So something like this will work for you.
TimeSpanPicker ts= new TimeSpanPicker();
ts.Value= TimeSpan.Parse("00:00:00");