Get the object associated with the event
I would like to create some user interface items dynamically and connect their tap event to a slot.
The event that is passed to the slot is TapEvent:
https://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__tapevent.html
How to use the event (or something else) to determine which object UI has been exploited?
Thank you
Daniel
OK, he solved by trial and error.
Looks like the parent of the TapHandler the container. So here's the final solution:
TapHandler * tapHandler = qobject_cast
Thanks for your help guys.
Container container = tapHandler-> parent();
Tags: BlackBerry Developers
Similar Questions
-
How can I access the data associated with an event within the event handler function?
Hello
In my LabWindows code, I try to use a DLL that has been developed in .NET (c#). I used the built-in labwindows Wizard that converts the DLL to a usable 'instrument'. Almost everything seems to work, except that I have 1 problem.
There is an event (defined in the DLL) that I am able to detect. I know that the reminder of the event is called at the right time. But the problem is that in this function, I can't access the data that is supposed to be attached to the event. It worked fine in c#, but I don't know how to do in LabWindows. Here's what looked like in c# event handler function:
void AppLoaderEventCallback (CommonLib.CommandResult MyResults)
{
MyResults is used in the body of this function
}
But in LabWindows, I can't seem to access the MyResults data structure. Here's what I do:
public static int CVICALLBACK AppLoaderEventCallback (CommonLib_CommandResult MyResults)
{
I can't access MyResults here
}
Can you help me with this? I'm doing something wrong?
Thank you very much for your help.
-Mike
I think that your statement of callback function is perhaps not quite correct. Look using the parameter "callback function" function Panel of the generated __Create function associated with this event. This shows the declaration of the callback function - make sure that your callback function is declared in the same way.
-
How to get the event when we change our simcard in BB device
Hi all
Please, someone tell how to get the event or any listener method that can automatically called when we change our SIM card device.
Thanks in advance,
TEJ
Hi Tej,
I came across some post, which may be useful for you
http://supportforums.BlackBerry.com/T5/Java-development/is-SIM-ID-really-exist/m-p/54407#M5954
-
I'm trying to get a file associated with working for TURL:TN3270 in a windows system 7.
Original title:
File associations
I'm trying to get a file associated with working for TURL:TN3270 in a windows system 7. I went to the control panel and clicked on all Associations. I have a list but URL: TN3270 does not appear in this list, so I can put it in a program. What Miss me?
THIS
The seller has to walk you, and who ever you are going to send directions, through it. AFAIK for a protocol to be included in the default programs, it must have been executed. Maybe if you launched the exe, it could list, but I'm just guessing
-
Get Machine plans associated with objects of a Service catalog
In our vCAC, we have a service with the catalog items that vSphere available machines virtual via cloning model. In a vCO script, is there a way to get objects of schema associated with each point objects catalog in our service? If so, can you provide the code to show how it's done? We have vCAC 6.1 and vCO 5.5.2.Thanks!
OK, I finally found the answer courtesy of Automation vRA (vCAC) using vRO - Split Brain :
«Each element of the catalog has an attribute of providerBinding.» This package contains the bindingId value. This link ID is the ID of the master plan (virtualMachineTemplateID) of the part of IaaS. That's how vRA figures on what course of action to deploy when you request a catalogue point. »
So, given an vCACCAFECatalogItem object, I can get the ID of associated like this blueprint:
var blueprintId = catalogItem.getProviderBinding () .getBindingId ();
-
How to get the event target?
I recorded the event mask depending on:
App.notifiers.Add ("Hd",.. mpfprojectdir\dev10\src\csharp\projectbase.file path);
Now, how can he obtain the object that triggered the event? [app.active document.activeLayer] give me only the layer ". Of course, this does not work in a scenario where the user hides a layer that is not selected.
I'd appreciate any help!
Action handler has no direct access to objects in the object model. It has its own class and object. Sometimes, there may be a more direct access by name. If the event descriptor was the index of the layer or the ID you can use instead of the name.
Sorry, when I threw together for you I only tested hidding layers that do not have the activeLayer. I don't think that the alert is empty is because the top layer was hidden. I think it's because the activeLayer was hidden so the actionReference is different.
Try this (which seems to work for me with both)
try { if (arguments.length >= 2) { var desc = arguments[0]; var event = arguments[1]; // make sure it's the hide event if (event == charIDToTypeID('Hd ')) { // get the list of what was hidden var list = desc.getList(charIDToTypeID('null')); // get the actionReferences from the list var ref = list.getReference(0); var psClass = ref.getDesiredClass(); // make sure it was a layer that was hidded if(psClass == charIDToTypeID('Lyr ')){ // check to see what is in the reference var dataEnum = ref.getForm(); // should either be an enum if activeLayer if(dataEnum == ReferenceFormType.ENUMERATED) { alert(app.activeDocument.activeLayer.name); }else{// or the layer name alert(ref.getName()); } } } } } catch (e) { alert( "Error: " + e + ":" + e.line ); }
-
I transferred my pictures from my camera to my mac, and they downloaded with the only place wherever they appear in "the last download" but not in "events". I also downloaded on my macbook and had the same response. I've never had this problem before and have tried everything. How can I get them to appear in the "events"? Since my last camera download, I have create a second library, but they are not more in the events.
CTRL-click a picture on the last import, then select "Show event. It shows the event?
-
How to get the events of the ItemRenderer
Hello, I have a little problem. In my application, I use a list and build its elements with an itemRenderer. In this itemRenderer I have on each line, 1 label and 1 button. When I press the button I want to send this event in my main application... How can I create a communication between myApplication and itemRenderer?
Thx for all
Max
You can use the code above. Let me know if you have any questions.
-
SQL Server, get the event ID 10016 hourly
Hi guys,.
We get the error message below on our SQL with OS WS2012 server every hour.
"The application-specific permission settings do not grant permission to local Activation for the application server COM with the CLSID.
{FDC3723D-1588-4BA3-92D4-42C430735D7D}
and APPID
{83B33982-693D-4824-B42E-7196AE61BB05}
the user NT SERVICE\SQLAgent$ IBSQL2012 SID (S-1-5-80-485265429-2350460967-4062759752-2586802043-2488535659) from address LocalHost (using LRPC) running in the container of the application unavailable SID (not available). This security permission can be modified using the Component Services administrative tool. »
I have been through a few threats and read it from another post on the internet, but under Component Services, tab of the particular service related to this message (based on its APPID) I see that SYSTEM is already added and it has the Launch Local and local Activation permissions granted to the security.
Why are we always get that number, because instead of local authorities, we should give remote "..." from LocalHost (using LRPC) address... » ?
All thoughts
MCG
Ask the question in the SQL Server forums:
http://social.msdn.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer -
How to get the event when you click Add another button in a table.
Hello
How to recognize the event in processFormRequest click on the button Add another line of the footer of a table?
Suppose if the ID is anotherRow (I mean ID of the button to add another line of the footer)
If I give if (pageContext.getParameter ("anotherRow")! = null)... its not recognizing the event that is returning null only...
I want to perform certain actions when the user clicks Add another line of footer. Please let me know the details of how identify when add another line is clicked...
Thank you
SrikanthHello
If you have only one table with add_row_button, and then copy the following code works perfectly
If (tableBean.getName () .equals (pageContext.getParameter (SOURCE_PARAM)))
(& ADD_ROWS_EVENT.equals (pageContext.getParameter (EVENT_PARAM)))
{
...
}tableBean is the Handle for your advanced table, hope, it will help you.
Kind regards
Out Sharma -
Is it safe to delete the files associated with an event
Original title: registry files
I use Windows 7 on a computer hp laptop 64 bit. If I type cc in the search box, I get 4 references for example cc 20140111 222014 in a list of the files in the registry. I guess that the 20140111 refers to an event that took place on 11 January this year and the other 6 digits are a point of Ref file. Can someone tell me what they are and if they can be removed safely. If so, how. I ask because at that time, I had a series of infections and wonder if they are leftovers from the problems. I have also another file that cannot open the windows and I have no idea what it can be. It has a cccOfa1b9f86f reference & b3. What is - this and it has no connection with the others. If so, it should be removed and if so, how. I'm a bit worried as to whether anything can either have been "planted" in my systems although I ran the Scanner from Microsoft and its found nothing. GordonW
CC seems a strange thing to get, probably, there was a reason?
Perhaps, you should also analyze with this utility free http://www.malwarebytes.org/free/
-
Get a popup associated with a prize to the the Internet exploer 8
Original title: is it a scam
whenever I have to connect to IE I get this message - congratulations! He then invites me to choose a price. No matter how I try to navigate away from it, I can't. It calls for Internet explorer.microquiz.org/paid_survey. How can I get rid of it and make sure it is locked.
Right.
A virus has infected probably a registry key for internet explore. Before you do anything, you must run a free virus with ESET online scannerscan.
Another good thing to do would be to block this IP creates a connection with your computer. If you have an antivirus program using their firewall, if it does not use the windows firewall.
The IP address of this Web site is 188.95.52.54
In a firewall, create a new rule that blocks the ip address 188.95.52.54 on all ports and the types of packets.-Alex
-
Get the event 680 Viewer when the guest account is disabled in Windows 2003
Hello
We have "guest" account disabled on Windows 2003, but again we see events like this
<13>2 Jul 01:58:33 192.168.80.11 security MSWinEventLog 0 5768968 Sun Jul 01 15:58:32 2012 has 680 xxxxhostnamexxx Audit of the failures of the security user SYSTEM connection logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 login account: comments Source Workstation: xxxhostnamexxx error Code: 0xC000006A 58482770
What could be the reason?
Thank you
Hello
Thank you for visiting the Microsoft answers community site. The question you have posted is related to Windows Server and would be better suited to the TechNet community.
Please visit the link below to find a community that will provide the support you want.
http://social.technet.Microsoft.com/forums/en-us/category/WindowsServerI hope this helps.
13> -
How to get the event when the window is iconified?
I want to set animation after I click the icon.
Please help me.
Thank you.stage.iconifiedProperty () .addListener (new InvalidationListener() {}
@Override
public void invalid (observable observable) {}}
}); -
Get-VIEvent - how to export the event type? error, warning, or info
Hello
I know that the Get-VIEvent command allows you to specify the type of events to get back... that is to say [-Types < EventCategory [>]
but, I want to extract all the events and export them to a CSV file. I want one of the columns to be "EventCategory", which will be ERROR, WARNING, or INFO, but I can't seem to find it. $_. GetType(). Name gets me the type of event, but not the category. I know that I can have my script executed 3 times (each time specifying the - parameter Types) but I want to run only once. Any ideas?
Thank you!
Jeff
Hello, horningj-
I worked on a few elements that should attract the event category. The first selects a few properties, including a calculated property that gets the event category:
## works well if no events of type 'EventEx'## get the .Net View object of the EventManager (used for getting the event Category) $viewEventMgr = Get-View EventManager ## get some VIEvents, select a few properties, including a calculated property for EventCategory Get-VIEvent | Select FullFormattedMessage, CreatedTime, @{n="EventCategory"; e={$strThisEventType = $_.GetType().Name; ($viewEventMgr.Description.EventInfo | ?{$_.Key -eq $strThisEventType}).Category}}
It becomes VIEvents (the last 100, because I did not specify the parameter - MaxSamples) and returns the properties of data. The calculated "EventCategory" property uses the type of the VIEvent object to search for in the collection of items EventDescriptionEventDetail in ownership eventInfo found in .net object View for the EventManager. He then grabs the 'Category' of the corresponding element of EventDescriptionEventDetail property.
Works fine unless you have any VIEvents type "EventEx" - then, this 'research' in EventDescriptionEventDetail collection method fails, because there is more than one element of this type (there are 91 of them at the moment).
This led me to the next bit. It is similar to the previous method, but it handles EventEx events too:
## get the .Net View object of the EventManager (used for getting the event Category)$viewEventMgr = Get-View EventManager ## get some VIEvents (the last 100, as "-MaxSamples" is not specified) Get-VIEvent | %{ ## put the pipeline varible into another variable; get its type $oThisEvent = $_; $strThisEventType = $_.GetType().Name ## if this event is of type "EventEx" if ($strThisEventType -eq "EventEx") { $strEventTypeId = $oThisEvent.EventTypeId; ## get the EventInfo item (of type EventDescriptionEventDetail) whose "FullFormat" property begins with the EventTypeId of the VIEvent at hand, and get its "Category" property $strCategory = ($viewEventMgr.Description.EventInfo | ?{$strRegexPattern = "^$strEventTypeId\|.*"; $_.FullFormat -match $strRegexPattern}).Category } ## end if ## else, can just grab the EventInfo item whose "Key" is the same as this event's type else {$strCategory = ($viewEventMgr.Description.EventInfo | ?{$_.Key -eq $strThisEventType}).Category} ## add a NoteProperty "EventCategory" to this event $oThisEvent | Add-Member -MemberType NoteProperty -Name EventCategory -Value $strCategory -PassThru} | Select FullFormattedMessage, CreatedTime, EventCategory
It seems that the EventTypeId of the event returned by Get-VIEvent is included in the first part of the property FullFormat of elements EventDescriptionEventDetail with EventEx key, separate from the rest of the value by a vertical pipe. Thus, the EventTypeId of the VIEvents can be used to make a match on EventEx of events .net EventManager View object types to get the event 'category' (info, warning, error, user).
You can, of course, change the Select statements to choice/choose the pieces of information you want to export and then export to a file of data as you please.
How does do for you?
* The message has been edited by mattboren on April 5, 2011 - added line at the beginning of the second piece of code '$viewEventMgr = Get-view event Manager. It was already in the first room and assumes that the user has run the two parts in the same session, but added for completeness.
Maybe you are looking for
-
Satellite A50 543 drivers found in the Toshiba site
Hi, I need all the drivers of my laptop but when I get toshiba sites to download exctly this link http://Gulf.computers.Toshiba-Europe.com/innovation/JSP/supportMyProduct.do?LNG=13&service=AE I get this messege ((we are sorry. The page requested does
-
I have a hero go pro 4 and it worked fine a month ago but now my footage is ignored.
I have an end 15 in 2011 macbook pro 2.2 GHz Intel Core i7, AMD Radeon HD 6750 M 512 MB, 4 GB 1333 MHz DDR3. I have a hero go pro 4 and it worked fine a month ago but now my footage is ignored. Can anyone help? Do you think that its to do with the
-
Can I replace a battery Clip?
I got my boyfriend a Sansa Clip last year when he started having to have dialysis treatment. Three times a week for hours a session theree his small music player is his refuge of machines of drainage and filtering his blood. And so far, there has bee
-
Access denied to kill/start/stop a service with an administrator account
I got this message when I try to start and stop a Service. Thank you
-
Conference MCU SIP with VCS registration question
Hi all We have a cluster of MSE 8510 MCU (software version 4.5 (1.72), Build 6.19 (1.72)) with 86 active confeneces. All of them are configured in the same way, to use H.323 and SIP registrar calls control. The thing is, I can see all conferences rec