Search Results

Search found 10381 results on 416 pages for 'delegate and events'.

Page 119/416 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • How to get orientation of android from gyrsocope sensor events ?

    - by Pritam
    I am using android 2.3 on Nexus S and want to get orientation from gyroscope sensor events. As gyro gives angular velocity how to use this for getting device orientation ? Also is there any way we can get pure linear accelerations on phone's axis, without gravity vector. I expected this from Linear acceleration sensor event but just found a post and referred android source as well for Sensor which currently uses only accelerometer. So what's the best way to combine the readings from both hardware to get pure accelerations without gravity inclusions ? Thanks.

    Read the article

  • Doctrine: Relating a model to itself using a link table, like "This event is related to to the following other events"

    - by mattalexx
    So in English, the relationship would sound like "This event is related to to the following other events". My first instinct is to create an EventEvent model, with a first_event_id field and a second_event_id field. Then I would define the following two relationships in the Event model: $this->hasMany('Event as FirstRelatedEvents', array('local' => 'first_event_id', 'foreign' => 'second_event_id', 'refClass' => 'EventEvent')); $this->hasMany('Event as SecondRelatedEvents', array('local' => 'second_event_id', 'foreign' => 'first_event_id', 'refClass' => 'EventEvent')); But I would rather not have to use two relationships on the Event model. Is there a better way to do this?

    Read the article

  • Why web controls does not have sufficient events like windows application?

    - by Vibin Jith
    Hai , An asp panel contains only 6 events. if they provide a visibilechanged event it may very useful for me. if it is in windows application ,how easy it is.I dont know why thy are not providing all these.This is same as in the case of gridView, button ,etc. just think , I have an Iframe in an asp panel and two buttons. In first time it is invisible .Buttons named first and second respectively. Two another pages One.aspx,two.aspx. These two pages contains each text box. When you click on the First button . I want to set the Iframe src="One.aspx" and display "first" in the textbox on One.aspx. as same in the case , when user clicks Second button. How to do this ?

    Read the article

  • Magento: Why do controller action predispatch events not fire if the controller is rewritten?

    - by mattalexx
    Why do controller action predispatch events not fire if the controller is rewritten? Here is a snippet of store/app/code/core/Mage/Core/Controller/Varien/Action.php: abstract class Mage_Core_Controller_Varien_Action { // [...] public function preDispatch() { // [...] if ($this->_rewrite()) { return; // [What is the purpose if this?] } // [...] // [This is where my event needs to be firing, but this code never gets // executed because the controller is rewritten] Mage::dispatchEvent( 'controller_action_predispatch_'.$this->getFullActionName(), array('controller_action'=>$this) ); } // [...] } I don't know where to start fixing this problem. Anyone out there ever dealt with this before?

    Read the article

  • Can I pass events like key strokes to another control in Silverlight?

    - by herzmeister der welten
    Can I pass events like key strokes to another control in Silverlight? Imagine I'm in a custom control that contains a Textbox and a Treeview. I'm listening to a Key event for the TextBox. When the user pushes the Arrow Up or Arrow Down key, I want the Treeview to behave as if it's itself who received that event, i.e. it should move the current selection up or down. The user shouldn't lose focus on the TextBox though so that they can continue typing. Is this possible? I don't want to set the selection manually on the Treeview because it has no easy MoveSelectionUp() or MoveSelectionDown() method, so I would have to duplicate that functionality which is not so trivial especially when the tree is databound and loads nodes on demand.

    Read the article

  • Can events fired from an iframe be handled by elements in its parent?

    - by allyourcode
    Suppose I have a page located at www.example.com/foo, and it contains an iframe with src="http://www.example.com/bar". I want to be able to fire an event from /bar and have it be heard by /foo. Using the Prototype library, I've tried doing the following without success: Element.fire(parent, 'ns:frob'); When I do this, in ff 3.5, I get the following error: Node cannot be used in a document other than the one in which it was created" code: "4 Line 0 Not sure if that's related to my problem. Is there some security mechanism that's preventing scripts in /bar from kicking off events in /foo?

    Read the article

  • How to I get raw 'mouse' events with touch screens on Windows Vista/7?

    - by Emil
    Does anyone have a clue how to completely disable the touch/tablet 'magic' introduced in Windows Vista? When I follow the steps on http://msdn.microsoft.com/en-us/library/bb969148(VS.85).aspx (both SetProp disable and WM_TABLET_QUERYSYSTEMGESTURESTATUS override) I succeed in stopping windows from treating press-and-hold as a right-click (it correctly gives me a WM_LBUTTONDOWN), but it also gives me a premature WM_LBUTTONUP (before I really let go of the screen). And there is also another problem: a click followed by a drag (down, up, down, move) is treated as a double-click (down, up, down, up, move). These issues occur with two very different touch screens (so it is not a hardware problem), and it never used to happen with Windows XP. This really bugs me. I would much rather have the raw input events like you have for normal mouse clicks. Any ideas?

    Read the article

  • Custom events and event pooling in jQuery - What's the point?

    - by Nick Lowman
    I've been reading about custom events in jQuery and why they should be used but I'm still clearly missing the point. There is a very good article I read here that has the following code example; function UpdateOutput() { var name = $('#txtName').val(); var address = $('#txtAddress').val(); var city = $('#txtCity').val(); $('#output').html(name + ' ' + address + ' ' + city); } $(document).bind('NAME_CHANGE ADDRESS_CHANGE CITY_CHANGE', function() { UpdateOutput(); }); $('#txtAddress').keyup(function() { $(document).trigger('ADDRESS_CHANGE'); }); $('#txtCity').keyup(function() { $(document).trigger('CITY_CHANGE'); }); Can someone tell me why I just don't call the UpdateOutput() function directly? It would still work exactly the same way, i.e. $('#txtAddress').keyup(function() { UpdateOutput() }); $('#txtCity').keyup(function() { UpdateOutput() }); Many thanks

    Read the article

  • How to deal with time zones in a Rails app with events...

    - by Tony
    I have a Rails app for bands. Bands can import their shows which all occur in different time zones. It seems like a ton of work to store these events in UTC. I would have to figure out the time zone for any show created and then convert back to the show's local time zone when displaying to the user. Is there a simple plugin to get a UTC offset based on geolocation? That would probably help, but does anyone see any major reasons why I should store in UTC here? I understand storing timestamps in UTC is probably a good idea...but band event times?

    Read the article

  • Try a sample: Using the counter predicate for event sampling

    - by extended_events
    Extended Events offers a rich filtering mechanism, called predicates, that allows you to reduce the number of events you collect by specifying criteria that will be applied during event collection. (You can find more information about predicates in Using SQL Server 2008 Extended Events (by Jonathan Kehayias)) By evaluating predicates early in the event firing sequence we can reduce the performance impact of collecting events by stopping event collection when the criteria are not met. You can specify predicates on both event fields and on a special object called a predicate source. Predicate sources are similar to action in that they typically are related to some type of global information available from the server. You will find that many of the actions available in Extended Events have equivalent predicate sources, but actions and predicates sources are not the same thing. Applying predicates, whether on a field or predicate source, is very similar to what you are used to in T-SQL in terms of how they work; you pick some field/source and compare it to a value, for example, session_id = 52. There is one predicate source that merits special attention though, not just for its special use, but for how the order of predicate evaluation impacts the behavior you see. I’m referring to the counter predicate source. The counter predicate source gives you a way to sample a subset of events that otherwise meet the criteria of the predicate; for example you could collect every other event, or only every tenth event. Simple CountingThe counter predicate source works by creating an in memory counter that increments every time the predicate statement is evaluated. Here is a simple example with my favorite event, sql_statement_completed, that only collects the second statement that is run. (OK, that’s not much of a sample, but this is for demonstration purposes. Here is the session definition: CREATE EVENT SESSION counter_test ON SERVERADD EVENT sqlserver.sql_statement_completed    (ACTION (sqlserver.sql_text)    WHERE package0.counter = 2)ADD TARGET package0.ring_bufferWITH (MAX_DISPATCH_LATENCY = 1 SECONDS) You can find general information about the session DDL syntax in BOL and from Pedro’s post Introduction to Extended Events. The important part here is the WHERE statement that defines that I only what the event where package0.count = 2; in other words, only the second instance of the event. Notice that I need to provide the package name along with the predicate source. You don’t need to provide the package name if you’re using event fields, only for predicate sources. Let’s say I run the following test queries: -- Run three statements to test the sessionSELECT 'This is the first statement'GOSELECT 'This is the second statement'GOSELECT 'This is the third statement';GO Once you return the event data from the ring buffer and parse the XML (see my earlier post on reading event data) you should see something like this: event_name sql_text sql_statement_completed SELECT ‘This is the second statement’ You can see that only the second statement from the test was actually collected. (Feel free to try this yourself. Check out what happens if you remove the WHERE statement from your session. Go ahead, I’ll wait.) Percentage Sampling OK, so that wasn’t particularly interesting, but you can probably see that this could be interesting, for example, lets say I need a 25% sample of the statements executed on my server for some type of QA analysis, that might be more interesting than just the second statement. All comparisons of predicates are handled using an object called a predicate comparator; the simple comparisons such as equals, greater than, etc. are mapped to the common mathematical symbols you know and love (eg. = and >), but to do the less common comparisons you will need to use the predicate comparators directly. You would probably look to the MOD operation to do this type sampling; we would too, but we don’t call it MOD, we call it divides_by_uint64. This comparator evaluates whether one number is divisible by another with no remainder. The general syntax for using a predicate comparator is pred_comp(field, value), field is always first and value is always second. So lets take a look at how the session changes to answer our new question of 25% sampling: CREATE EVENT SESSION counter_test_25 ON SERVERADD EVENT sqlserver.sql_statement_completed    (ACTION (sqlserver.sql_text)    WHERE package0.divides_by_uint64(package0.counter,4))ADD TARGET package0.ring_bufferWITH (MAX_DISPATCH_LATENCY = 1 SECONDS)GO Here I’ve replaced the simple equivalency check with the divides_by_uint64 comparator to check if the counter is evenly divisible by 4, which gives us back every fourth record. I’ll leave it as an exercise for the reader to test this session. Why order matters I indicated at the start of this post that order matters when it comes to the counter predicate – it does. Like most other predicate systems, Extended Events evaluates the predicate statement from left to right; as soon as the predicate statement is proven false we abandon evaluation of the remainder of the statement. The counter predicate source is only incremented when it is evaluated so whether or not the counter is incremented will depend on where it is in the predicate statement and whether a previous criteria made the predicate false or not. Here is a generic example: Pred1: (WHERE statement_1 AND package0.counter = 2)Pred2: (WHERE package0.counter = 2 AND statement_1) Let’s say I cause a number of events as follows and examine what happens to the counter predicate source. Iteration Statement Pred1 Counter Pred2 Counter A Not statement_1 0 1 B statement_1 1 2 C Not statement_1 1 3 D statement_1 2 4 As you can see, in the case of Pred1, statement_1 is evaluated first, when it fails (A & C) predicate evaluation is stopped and the counter is not incremented. With Pred2 the counter is evaluated first, so it is incremented on every iteration of the event and the remaining parts of the predicate are then evaluated. In this example, Pred1 would return an event for D while Pred2 would return an event for B. But wait, there is an interesting side-effect here; consider Pred2 if I had run my statements in the following order: Not statement_1 Not statement_1 statement_1 statement_1 In this case I would never get an event back from the system because the point at which counter=2, the rest of the predicate evaluates as false so the event is not returned. If you’re using the counter target for sampling and you’re not getting the expected events, or any events, check the order of the predicate criteria. As a general rule I’d suggest that the counter criteria should be the last element of your predicate statement since that will assure that your sampling rate will apply to the set of event records defined by the rest of your predicate. Aside: I’m interested in hearing about uses for putting the counter predicate criteria earlier in the predicate statement. If you have one, post it in a comment to share with the class. - Mike Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • How can I replace email alerts for system events with something more scalable?

    - by Dave Forgac
    I have a number of systems and services that send email alerts when some sort of event takes place. This works fine for a small number of systems but as the number of alerts grows the important message become less visible among the informational notices. Email filtering can only be effective to a point. What sort of solution can I use in place of emails that will allow me to send arbitrary alerts from various services and that will scale easily as the number of services grows?

    Read the article

  • What possible events could cause a MySQL database to revert to a previous state?

    - by justkevin
    A client of mine recently had a strange event with their MySQL database. Several days ago, one database suddenly "went back in time". All the data was in the state it was in several months ago. Even most of the .MYD and .MYI files had timestamps from November. Fortunately, the server is not in production yet, but we need to understand how it happened so it doesn't happen again. I'm not a MySQL guru, but I couldn't think of a scenario that could cause the database to rewind like that short of restoring from a backup. What could have happened here? Where should I look for clues? (Server is FreeBSD 6.4)

    Read the article

  • Exchange 2003 mail non-delivery (NDR), spam activity? events 7002 & 7004

    - by HighTechGeek
    Windows Server 2003 Small Business Server SP2 Exchange Version 6.5 (Build 7638.2: Service Pack 2) This network has been neglected and has been having email problems for years and was on many blacklists. I was called in after the server eventually crashed... I got the server back up and running, but email problems persist. Outgoing mail delivery is sporadic. Sometimes the mail goes through, sometimes a delayed delivery report is generated after a day or more, and sometimes it seems to go through, but the recipient never receives it. Not sure if spammers are successfully using the server as a relay (see event entries below after turning on maximum SMTP logging)... User PCs infected with viruses and server was blacklisted on many sites (I used mxtoolbox.com) I have cleaned all the PCs and changed all passwords (including administrator) I have requested removal from all of the blacklists - most have removed the listing, some take more time. I have setup rDNS pointer records with the ISP (Comcast) - that was one reason for some of the blacklistings. I have tested that it's not an open relay using telnet as described here: www.amset.info/exchange/smtp-openrelay.asp I followed the advise of a Spamhaus & Microsoft article to enable maximum SMTP logging. http://www.spamhaus.org/faq/answers.lasso?section=isp%20spam%20issues#320 which directed me to Microsoft KB article 895853, specifically, the part 2/3 down titled: "If mail relay occurs from an account on an Exchange computer that is not configured as an open relay" . The Application Event Log is filling with this type of activity (Event ID 7002, 7002 & 3018 errors): Event Type: Error Event Source: MSExchangeTransport Event Category: SMTP Protocol Event ID: 7004 Date: 1/18/2011 Time: 7:33:29 AM User: N/A Computer: SERVER Description: This is an SMTP protocol error log for virtual server ID 1, connection #621. The remote host "212.52.84.180", responded to the SMTP command "rcpt" with "550 #5.1.0 Address rejected [email protected] ". The full command sent was "RCPT TO: ". This will probably cause the connection to fail. and this: Event Type: Warning Event Source: MSExchangeTransport Event Category: SMTP Protocol Event ID: 7002 Date: 1/18/2011 Time: 7:33:29 AM User: N/A Computer: SERVER Description: This is an SMTP protocol warning log for virtual server ID 1, connection #620. The remote host "212.52.84.170", responded to the SMTP command "rcpt" with "452 Too many recipients received this hour ". The full command sent was "RCPT TO: ". This may cause the connection to fail. or a variant of: Event Type: Warning Event Source: MSExchangeTransport Event Category: SMTP Protocol Event ID: 7002 Date: 1/18/2011 Time: 8:39:21 AM User: N/A Computer: SERVER Description: This is an SMTP protocol warning log for virtual server ID 1, connection #661. The remote host "82.57.200.133", responded to the SMTP command "rcpt" with "421 Service not available - too busy ". The full command sent was "RCPT TO: ". This may cause the connection to fail. also Event Type: Error Event Source: MSExchangeTransport Event Category: NDR Event ID: 3018 Date: 1/18/2011 Time: 9:49:37 AM User: N/A Computer: SERVER Description: A non-delivery report with a status code of 5.4.0 was generated for recipient rfc822;[email protected] (Message-ID ). Causes: This message indicates a DNS problem or an IP address configuration problem Solution: Check the DNS using nslookup or dnsq. Verify the IP address is in IPv4 literal format. Data: 0000: ef 02 04 c0 ï..À Any guidance and/or suggestions and/or tests to perform would be greatly appreciated.

    Read the article

  • Windows-Vista events: Diagnostics-Performance: How-To read this information?

    - by Ice
    Hi, i am wondering how long the bootprocess needs and looking in %SystemRoot%\system32\eventvwr.msc /s. Some entries marked as critical like : Starting needs : 184707ms, sometimes 211855ms or 269767ms Some Errors like: This process does many diskactivities and lower the performance of Windows: Filename : ntoskrnl.exe Why are the startups marked as critical? Are the values normal on a Dell Precision M90 (Intel Centrono Dual CPU, 2GB RAM, 80 GB Disk)? Some entries marked as Errors showing the time for shutdown, but there are some like this one i printed in this question, what is the meaning of this?

    Read the article

  • #altnetseattle &ndash; CQRS

    - by GeekAgilistMercenary
    This is a topic I know nothing about, and thus, may be supremely disparate notes.  Have fun translating.  : )   . . .and coolness that the session is well past capacity. Separates things form the UI and everything that needs populated is done through commands.  The domain and reports have separate storage. Events populate these stores of data, such as "sold event". What it looks like, is that the domain controls the requests by event, which would be a product order or something similar. Event sourcing is a key element of the logic. DDD (Domain Driven Design) is part of the core basis for this methodology/structure. The architecture/methodology/structure is perfect for blade style plugin hardware as needed. Good blog entry DDDD: Why I love CQRS and another Command and Query Responsibility Segregation (CQRS), more, CQRS à la Greg Young, a bit by Udi Dahan and there are more.  Google, Bing, etc are there for a reason. It appears the core underpinning architectural element of this is the break out of unique identifiable actions, or I suppose better described as events.  Those events then act upon specific pipelines such as read requests, write requests, etc.  I will be doing more research on this topic and will have something written up shortly.  At this time it seems like nothing new, just a large architectural break out of identifiable needs of the entire enterprise system.  The reporting is in one segment of the architecture, the domain is in another, hydration broken out to interfaces, and events are executed to incur events on the Reports, or what appears by the description to be events on the domain. Anyway, more to come on this later.

    Read the article

  • How do I apply an arcball (using quaternions) along with mouse events, to allow the user to look around the screen using the o3d webgl framework?

    - by Chris
    How do I apply an arcball (using quaternions) along with mouse events, to allow the user to look around the screen using the o3d webgl framework? This sample (http://code.google.com/p/o3d/source/browse/trunk/samples_webgl/o3d-webgl-samples/simpleviewer/simpleviewer.html?r=215) uses the arcball for rotating the transform of an "object", but rather than apply this to a transform, I would like to apply the rotation to the camera's target, to create a first person style ability to look around the scene, as if the camera is inside the centre of the arcball instead of rotating from the outside. The code that is used in this sample is var rotationQuat = g_aball.drag([e.x, e.y]); var rot_mat = g_quaternions.quaternionToRotation(rotationQuat); g_thisRot = g_math.matrix4.mul(g_lastRot, rot_mat); The code that I am using which doesn't work var rotationQuat = g_aball.drag([e.x, e.y]); var rot_mat = g_quaternions.quaternionToRotation(rotationQuat); g_thisRot = g_math.matrix4.mul(g_lastRot, rot_mat); var cameraRotationMatrix4 = g_math.matrix4.lookAt(g_eye, g_target, [g_up[0], g_up[1] * -1, g_up[2]]); var cameraRotation = g_math.matrix4.setUpper3x3(cameraRotationMatrix4,g_thisRot); g_target = g_math.addVector(cameraRotation, g_target); where am I going wrong? Thanks

    Read the article

  • ?????????????:3?15?~17?

    - by Yusuke.Yamamoto
    2011?3?15?~2011?3?17?????????????????(Oracle Direct Seminar)?????????????????????????????????????????????????????????????????? ?????????????????????????????? ?????????????????????????????????????????????OTN???? ?????? ????? ?????????????? ????????????? ?OTN???? ?????? ????? http://www.oracle.com/technetwork/jp/ondemand/db-basic/index.html ??????????????????????????????? 3/15 11:00~:???!?????????????????? http://eventreg.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=124542&src=7013395&src=7013395&Act=388 3/15 15:00~:????????! ?????????????? http://eventreg.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=124543&src=7013395&src=7013395&Act=389 3/16 11:00~:?ORACLE MASTER [Bronze DBA11g] ? http://eventreg.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=124572&src=7013395&src=7013395&Act=391 3/16 15:00~:?Oracle Database???????XML?????? http://eventreg.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=124573&src=7013395&src=7013395&Act=392 3/17 11:00~:?????????·?????????????GoldenGate? http://eventreg.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=124574&src=7013395&src=7013395&Act=393 3/17 15:00~:???????!Web????????/?????????????? http://eventreg.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=124578&src=7013395&src=7013395&Act=395 ?????????? Oracle Direct Seminar??? [email protected]

    Read the article

  • How do I use UIImagePickerController just to display the camera and not take a picture?

    - by Thomas
    Hello All: I'd like to know how to open the camera inside of a pre-defined frame (not the entire screen). When the view loads, I have a box, and inside it, I want to display what the camera sees. I don't want to snap a picture, just basically use the camera as a viewfinder. I have searched this site and have not yet found what I'm looking for. Please help. Thanks! Thomas Update 1: Here is what I have tried so far. 1.) I added UIImageView to my xib. 2.) Connect the following outlet to the UIImageView in IB IBOutlet UIImageView *cameraWindow; 3.) I put the following code in viewWillAppear -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:picker animated:YES]; NSLog(@"viewWillAppear ran"); } But this method does not run, as evident by the absence of NSLog statement from my console. Please help! Thanks, Thomas Update 2: OK I got it to run by putting the code in viewDidLoad but my camera still doesn't show up...any suggestions? Anyone....? I've been reading the UIImagePickerController class reference, but am kinda unsure how to make sense of it. I'm still learning iPhone, so it's a bit of a struggle. Please help! - (void)viewDidLoad { [super viewDidLoad]; // Create a bool variable "camera" and call isSourceTypeAvailable to see if camera exists on device BOOL camera = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]; // If there is a camera, then display the world throught the viewfinder if(camera) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; // Since I'm not actually taking a picture, is a delegate function necessary? picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:picker animated:YES]; NSLog(@"Camera is available"); } // Otherwise, do nothing. else NSLog(@"No camera available"); } Thanks! Thomas Update 3: A-HA! Found this on the Apple Class Reference. Discussion The delegate receives notifications when the user picks an image or movie, or exits the picker interface. The delegate also decides when to dismiss the picker interface, so you must provide a delegate to use a picker. If this property is nil, the picker is dismissed immediately if you try to show it. Gonna play around with the delegate now. Then I'm going to read on wtf a delegate is. Backwards? Whatever :-p Update 4: The two delegate functions for the class are – imagePickerController:didFinishPickingMediaWithInfo: – imagePickerControllerDidCancel: and since I don't actually want to pick an image or give the user the option to cancel, I am just defining the methods. They should never run though....I think.

    Read the article

  • Cocoa QuickLook initiated by NSTableView Cell

    - by Tristan Seifert
    I have an NSTableView that contains 2 different Columns - one is an NSImageCell that shows a file icon, and the second is a custom subclass of NSTextFieldCell that contains a quick look button on the right of the text. When I click the Quick Look button, the following code is invoked: [[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:nil]; This does it's job and shows the blank Quick Look panel saying "No Items Selected." After I did a bit of research on the internet, I implemented a custom NSTableView subclass to be the Delegate and Data Source for the Quick Look panel. I get the notification that Quick Look asks if I want to be the delegate, and I respond with return YES. Even though I implement all methods in both QLPreviewPanelDataSource and QLPreviewPanelDelegate, at runtime I get this error on the console: 2010-12-24 15:32:17.235 BackMeUp[4763:80f] clicked: ~/Desktop/HUDTape.mov 2010-12-24 15:32:17.489 BackMeUp[4763:80f] [QL] QLError(): -[QLPreviewPanel setDelegate:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2010-12-24 15:32:17.490 BackMeUp[4763:80f] [QL] QLError(): -[QLPreviewPanel setDataSource:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2010-12-24 15:32:17.491 BackMeUp[4763:80f] We can now receive QL Events. 2010-12-24 15:32:18.291 BackMeUp[4763:80f] -[NSPathStore2 stringValue]: unrecognized selector sent to instance 0x5ecb10 2010-12-24 15:32:18.292 BackMeUp[4763:80f] -[NSPathStore2 stringValue]: unrecognized selector sent to instance 0x5ecb10 And the Quick Look panel does not show up, which I find rather odd. The first line above is just that I know the cell has been clicked. Anyways, here is the .m file of the custom table view subclass: // // BackupListTableView.m // BackMeUp // // Created by Tristan Seifert on 12/24/10. // Copyright 2010 24/7 Server. All rights reserved. // #import "BackupListTableView.h" @implementation BackupListTableView - (void) awakeFromNib { } // Quick Look Delegates - (BOOL)acceptsPreviewPanelControl:(QLPreviewPanel *)panel; { [QLPreviewPanel sharedPreviewPanel].delegate = self; [QLPreviewPanel sharedPreviewPanel].dataSource = self; NSLog(@"We can now receive QL Events."); return YES; } - (void)beginPreviewPanelControl:(QLPreviewPanel *)panel { // This document is now responsible of the preview panel // It is allowed to set the delegate, data source and refresh panel. [QLPreviewPanel sharedPreviewPanel].delegate = self; [QLPreviewPanel sharedPreviewPanel].dataSource = self; } - (void)endPreviewPanelControl:(QLPreviewPanel *)panel { // This document loses its responsisibility on the preview panel // Until the next call to -beginPreviewPanelControl: it must not // change the panel's delegate, data source or refresh it. return; } // Quick Look panel data source - (NSInteger)numberOfPreviewItemsInPreviewPanel:(QLPreviewPanel *)panel { return 1; } - (id <QLPreviewItem>)previewPanel:(QLPreviewPanel *)panel previewItemAtIndex:(NSInteger)index { int selectedRow = [self selectedRow]; return [NSURL URLWithString:[[[self dataSource] tableView:self objectValueForTableColumn:fileColumn row:selectedRow] stringValue]]; } // Quick Look panel delegate - (BOOL)previewPanel:(QLPreviewPanel *)panel handleEvent:(NSEvent *)event { // redirect all key down events to the table view return NO; } // This delegate method provides the rect on screen from which the panel will zoom. - (NSRect)previewPanel:(QLPreviewPanel *)panel sourceFrameOnScreenForPreviewItem:(id <QLPreviewItem>)item { NSRect iconRect = [self rectOfColumn:1]; /* // check that the icon rect is visible on screen NSRect visibleRect = [self visibleRect]; // convert icon rect to screen coordinates iconRect = [self convertRectToBase:iconRect]; iconRect.origin = [[self window] convertBaseToScreen:iconRect.origin]; */ return iconRect; } // This delegate method provides a transition image between the table view and the preview panel - (id)previewPanel:(QLPreviewPanel *)panel transitionImageForPreviewItem:(id <QLPreviewItem>)item contentRect:(NSRect *)contentRect { int selectedRow = [self selectedRow]; NSImage *fileIcon = [[NSWorkspace sharedWorkspace] iconForFile:[[[self dataSource] tableView:self objectValueForTableColumn:fileColumn row:selectedRow] stringValue]]; return fileIcon; } @end Thanks for any help.

    Read the article

  • How To Raise Property Changed events on a Dependency Property?

    - by Muad'Dib
    OK, so I have this control with two properties. One of these is a DependencyProperty, the other is an "alias" to the first one. What I need to be able to do is raise the PropertyChanged event for the second one (the alias) when the first one is changed. NOTE: I am using DependencyObjects, not INotifyPropertyChanged (tried that, didn't work because my control is a sub-classed ListView) something like this..... protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) { base.OnPropertyChanged(e); if (e.Property == MyFirstProperty) { RaiseAnEvent( MySecondProperty ); /// what is the code that would go here? } } If I were using an INotify I could do like this... public string SecondProperty { get { return this.m_IconPath; } } public string IconPath { get { return this.m_IconPath; } set { if (this.m_IconPath != value) { this.m_IconPath = value; this.SendPropertyChanged("IconPath"); this.SendPropertyChanged("SecondProperty"); } } } where I can raise PropertyChanged events on multiple properties from one setter. I need to be able to do the same thing, only using DependencyProperties.

    Read the article

  • Backend raising (INotify)PropertyChanged events to all connected clients?

    - by Jörg Battermann
    One of our 'frontend' developers keeps requesting from us backend developers that the backend notifies all connected clients (it's a client/server environment) of changes to objects. As in: whenever one user makes a change, all other connected clients must be notified immediately of the change. At the moment our architecture does not have a notification system of that kind and we don't have a sort of pub/sub model for explicitly chosen objects (e.g. the one the frontend is currently implementing).. which would make sense in such a usecase imho, but obviously requires extra implementation. However, I thought frontends typically check for locks for concurrently existing user changes on the same object and rather pull for changes / load on demand and in the background rather than the backend pushing all changes to all clients for all objects constantly.. which seems rather excessive to me. However, it's being argumented that e.g. the MS Entity Framework does in fact publish (INotify)PropertyChanged not only for local changes, but for all such changes including other client connections, but I have found no proof or details regarding this. Can anyone shed some light into this? Do other e.g. ORMs etc provide broadcasted (INotify)PropertyChanged events on entities?

    Read the article

  • How can I handle events within my custom control?

    - by highone
    I am not looking to create new events. I need to create a canvas control that optionally fades in or out depending on whether or not the mouse is over it. The code below probably explains what I want to do better than I can. private Storyboard fadeInStoryboard; private Storyboard fadeOutStoryboard; public FadingOptionPanel() { InitializeComponent(); } public static readonly DependencyProperty FadeEnabledProperty = DependencyProperty.Register("IsFadeEnabled", typeof(bool), typeof(FadingOptionPanel), new FrameworkPropertyMetadata(true, OnFadeEnabledPropertyChanged, OnCoerceFadeEnabledProperty)); public bool IsFadeEnabled { get { return (bool)GetValue(FadeEnabledProperty); } set { SetValue(FadeEnabledProperty, value); } } private static void OnFadeEnabledPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { } private static object OnCoerceFadeEnabledProperty(DependencyObject sender, object data) { if (data.GetType() != typeof(bool)) { data = true; } return data; } private void FadingOptionPanel_MouseEnter(object sender, MouseEventArgs e) { if (IsFadeEnabled) { fadeInStoryboard.Begin(this); } } private void FadingOptionPanel_MouseLeave(object sender, MouseEventArgs e) { if (IsFadeEnabled) { fadeOutStoryboard.Begin(this); } } private void FadingOptionsPanel_Loaded(object sender, RoutedEventArgs e) { //Initialize Fade In Animation DoubleAnimation fadeInDoubleAnimation = new DoubleAnimation(); fadeInDoubleAnimation.From = 0; fadeInDoubleAnimation.To = 1; fadeInDoubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(.5)); fadeInStoryboard = new Storyboard(); fadeInStoryboard.Children.Add(fadeInDoubleAnimation); Storyboard.SetTargetName(fadeInDoubleAnimation, this.Name); Storyboard.SetTargetProperty(fadeInDoubleAnimation, new PropertyPath(Canvas.OpacityProperty)); //Initialize Fade Out Animation DoubleAnimation fadeOutDoubleAnimation = new DoubleAnimation(); fadeOutDoubleAnimation.From = 1; fadeOutDoubleAnimation.To = 0; fadeOutDoubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(.2)); fadeOutStoryboard = new Storyboard(); fadeOutStoryboard.Children.Add(fadeOutDoubleAnimation); Storyboard.SetTargetName(fadeOutDoubleAnimation, this.Name); Storyboard.SetTargetProperty(fadeOutDoubleAnimation, new PropertyPath(Canvas.OpacityProperty)); } I originally was using this code inside a usercontrol instead of a custom control before I found out that usercontrols don't support content.

    Read the article

  • Best XML format for log events in terms of tool support for data mining and visualization?

    - by Thorbjørn Ravn Andersen
    We want to be able to create log files from our Java application which is suited for later processing by tools to help investigate bugs and gather performance statistics. Currently we use the traditional "log stuff which may or may not be flattened into text form and appended to a log file", but this works the best for small amounts of information read by a human. After careful consideration the best bet has been to store the log events as XML snippets in text files (which is then treated like any other log file), and then download them to the machine with the appropriate tool for post processing. I'd like to use as widely supported an XML format as possible, and right now I am in the "research-then-make-decision" phase. I'd appreciate any help both in terms of XML format and tools and I'd be happy to write glue code to get what I need. What I've found so far: log4j XML format: Supported by chainsaw and Vigilog. Lilith XML format: Supported by Lilith Uninvestigated tools: Microsoft Log Parser: Apparently supports XML. OS X log viewer: plus there is a lot of tools on http://www.loganalysis.org/sections/parsing/generic-log-parsers/ Any suggestions?

    Read the article

  • jQuery: Targeting elements added via *non-jQuery* AJAX before any Javascript events fire? Beyond th

    - by peteorpeter
    Working on a Wicket application that adds markup to the DOM after onLoad via Wicket's built-in AJAX for an auto-complete widget. We have an IE6 glitch that means I need to reposition the markup coming in, and I am trying to avoid tampering with the Wicket javascript... blah blah blah... here's what I'm trying to do: New markup arrives in the DOM (I don't have access to a callback) Somehow I know this, so I fire my code. I tried this, hoping the new tags would trigger onLoad events: $("selectorForNewMarkup").live("onLoad", function(){ //using jQuery 1.4.1 //my code }); ...but have become educated that onLoad only fires on the initial page load. Is there another event fired when elements are added to the DOM? Or another way to sense changes to the DOM? Everything I've bumped into on similar issues with new markup additions, they have access to the callback function on .load() or similar, or they have a real javascript event to work with and live() works perfectly. Is this a pipe dream?

    Read the article

  • How do I trace SQL Server Failure Audit events?

    - by Tim Perry
    I recently took over management of a Windows 2003 server. The application log is being filled up with messages like these: Event Type: Failure Audit Event Source: MSSQLSERVER Event Category: (4) Event ID: 18456 Date: 3/5/2010 Time: 4:00:30 PM User: N/A Computer: FAIROAKS1 Description: Login failed for user 'administrator'. [CLIENT: <local machine>] Data: 0000: 18 48 00 00 0e 00 00 00 .H...... 0008: 0a 00 00 00 46 00 41 00 ....F.A. 0010: 49 00 52 00 4f 00 41 00 I.R.O.A. 0018: 4b 00 53 00 31 00 00 00 K.S.1... 0020: 07 00 00 00 6d 00 61 00 ....m.a. 0028: 73 00 74 00 65 00 72 00 s.t.e.r. 0030: 00 00 .. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. I'd like to figure out what program is causing these. Is there a way to trace and find out which process is causing these errors?

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >