How to add HIViewRef as subview/view to a new Carbon Window? - macos-carbon

I created a Carbon window using CreateNewWindow() which will return me a WindowRef.
I create a HIViewRef and now I want to add it to the newly created WindowRef.
Can anyone please help me with this issue? How can I add HIViewRef to a WindowRef which does not have any subviews?
Thanks,
Dheeraj.

HIViewRef and ControlRef are the same, so to add HIViewRef to WindowRef you could use something like:
HIViewRef root_control;
GetRootControl (winref, &root_control);
HIViewAddSubview(root_control, hiview);

Related

When use hci_le_set_scan_enable

is not clear the role of hci_le_set_scan_enable because the result of hci_inquiry doesn't change after the scan function, so why i should do use hci_le_set_scan_enable
Thanks

v2.1 issue with Date Tabs in VB.NET application

I have my app setup with v2.0.6 right now and I can create Date Tabs.
In v2.1+ I cannot.
Now Signer.Tabs.DateTabs.Add(item as Date?) is asking for System.DateTime.Date? instead of DocuSign.eSign.Model.Date
And Signer.Tabs.DateTabs = New List(Of [Date]) no longer works, it wants Signer.Tabs.DateTabs = New List(Of Date?) which will not work.
Anyone know a fix or workaround? Right now I have to stay on v2.0.6
This looks like a bug with the DocuSign.eSign.dll nuget package v2.1.4
I have logged the following issue
https://github.com/docusign/docusign-csharp-client/issues/135
Update
This bug has been fixed with DocuSign.eSign.dll v2.1.7

How to remove Custom Properties from a SoapUI TestCase using Groovy?

I have created some list of properties under the TestCase. For example look at the following screenshot.
I tried to remove Testcase_Property property through the following groovy script teststep:
testRunner.testCase.testSuite.removeProperty( "Testcase_Property" );
when I reload the project, the Testcase_Property property is still exist in the Custom Properties tab when I click on the Test case name.
Anyone suggest me what the correct script to remove the custom properties in SoapUI.
Thanks
Karunagara Pandi
you can also use the following:
data = context.testCase.getTestStepByName("Test Case Name");
String[] propToRemove = new String[data.getPropertyCount()];
propToRemove = data.getPropertyNames();
for ( int i = 0 ; i < propToRemove.size(); i++ ){
data.removeProperty( propToRemove[i] );
}
Hope this helps.
Now you can remove more than one prop.
Finally I got the answers for removing Project, Testsuite and Testcase custom properties. Here are the scripts.
testRunner.testCase.testSuite.project.removeProperty( "Project_Level_Property" );
testRunner.testCase.testSuite.removeProperty( "Testsuite_Property" );
testRunner.testCase.removeProperty( "Testcase_Property" );
If any other way is there, please let me know friends.
Manual solution: use "Save Properties" and "Load Properties" from SoapUI
export the properties to a text file, e.g. customprop.txt
edit the file and delete the unwanted properties
import the file back into your soapUI project
in the "load properties" dialog check the option to "delete remaining"
Then the existing properties will be cleared out and replaced with your customprop.txt
Just for completeness:
Another quick but dirty and dangerous way is to modify the soapui-project.xml and remove the property nodes with a text editor.
Be aware that you can break your whole project if you do something wrong!
You should create a copy of your soapui-project.xml and do the following steps:
Set the values of the Properties you want to delete to deleteMe
Search for the string deleteMe in your soapui-project.xml
Delete the properties:
<con:property><con:name>name</con:name><con:value>deleteMe</con:value></con:property>

FMOD How to Set a group of Events in some custom Channelgroup?

FMOD How to Set a group of Events in some custom Channelgroup ?
I can create a custom channelgroup
But I don't know set a group of Events using it.
Event::Getchannelgroup seem not working.
Anyone know how to do that?
Thank you very much.
You can normally create your sounds (sreaming or not it doesn't matter). You need to obtain pointer to a channel class and use Channel::setChannelGroup ()
....
FMOD::Sound *Sound;
FMOD::Channel *Channel;
FMOD::ChannelGroup *ChannelGroup;
System->createSound ("Sound.ogg", FMOD_DEFAULT, 0, &Sound);
System->playSound (FMOD_CHANNEL_FREE, &Sound, true, &Channel);
Channel->setChannelGroup (ChannelGroup);
Also here is the link that can help you: http://katyscode.wordpress.com/2013/01/15/cutting-your-teeth-on-fmod-part-2-channel-groups/

Adding attributes in LINQ using element.add

I have to write information from textboxes to XML file on click event.
My sample code would look lik this.
XDocument xmlDoc = XDocument.Load(fileName);
xmlDoc.Element("Mediaplans").Add(new XElement("MediaPlan", new XElement("Media",TxtMedia.Text),
new XElement("Adtype", TxtAdtype.Text), new XElement("EmailId",TxtEmailId.Text)));
xmlDoc.Save(fileName).
What I want to know is how do we add attributes to elements with the above method?
I am new to this field. any help appreciated.
Thanks,
Kruthika
You can call Add and pass an XAttribute too.
You can just use add new XAttribute like you have done with XElement.
Have a look at this link for an example
I believe that you should be able to do something like
XDocument xmlDoc = XDocument.Load(fileName);
xmlDoc.Element("Mediaplans").Add(new XAttribute("File name", fileName),new XElement("MediaPlan", new XElement("Media",TxtMedia.Text), new XElement("Adtype", TxtAdtype.Text), new XElement("EmailId",TxtEmailId.Text));
xmlDoc.Save(fileName).
Sorry dont have access to VS at the moment so I cant verify the code.

Resources