Daily Archives

Articles indexed Saturday March 13 2010

Page 22/89 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • WPF drag distance threshold

    - by justin984
    I have a program with two WPF treeviews that allow dragging and dropping between the two. The problem is, it can be annoying to open / close items on the treeviews because moving the mouse just one pixel while holding the left mouse button triggers the drag / drop functionality. Is there some way to specify how far the mouse should move before it's considered a drag / drop? Thanks!

    Read the article

  • Custom NSView in NSMenuItem not receiving mouse events

    - by Dennis
    I have an NSMenu popping out of an NSStatusItem using popUpStatusItemMenu. These NSMenuItems show a bunch of different links, and each one is connected with setAction: to the openLink: method of a target. This arrangement has been working fine for a long time. The user chooses a link from the menu and the openLink: method then deals with it. Unfortunately, I recently decided to experiment with using NSMenuItem's setView: method to provide a nicer/slicker interface. Basically, I just stopped setting the title, created the NSMenuItem, and then used setView: to display a custom view. This works perfectly, the menu items look great and my custom view is displayed. However, when the user chooses a menu item and releases the mouse, the action no longer works (i.e., openLink: isn't called). If I just simply comment out the setView: call, then the actions work again (of course, the menu items are blank, but the action is executed properly). My first question, then, is why setting a view breaks the NSMenuItem's action. No problem, I thought, I'll fix it by detecting the mouseUp event in my custom view and calling my action method from there. I added this method to my custom view: - (void)mouseUp:(NSEvent *)theEvent { NSLog(@"in mouseUp"); } No dice! This method is never called. I can set tracking rects and receive mouseEntered: events, though. I put a few tests in my mouseEntered routine, as follows: if ([[self window] ignoresMouseEvents]) { NSLog(@"ignoring mouse events"); } else { NSLog(@"not ignoring mouse events"); } if ([[self window] canBecomeKeyWindow]) { dNSLog((@"canBecomeKeyWindow")); } else { NSLog(@"not canBecomeKeyWindow"); } if ([[self window] isKeyWindow]) { dNSLog((@"isKeyWindow")); } else { NSLog(@"not isKeyWindow"); } And got the following responses: not ignoring mouse events canBecomeKeyWindow not isKeyWindow Is this the problem? "not isKeyWindow"? Presumably this isn't good because Apple's docs say "If the user clicks a view that isn’t in the key window, by default the window is brought forward and made key, but the mouse event is not dispatched." But there must be a way do detect these events. HOW? Adding: [[self window] makeKeyWindow]; has no effect, despite the fact that canBecomeKeyWindow is YES.

    Read the article

  • Expandable listview Refreshing

    - by Sam97305421562
    Hi, I am using expandable listview i need to refresh as i am searching the list only for parent.I have searched for tutorial in which i can set visibility only for some parent but not all the expandable listview object . Thanks in advance.

    Read the article

  • How to Save custom DockWidgets

    - by Tobias
    Hello, I want to save my custom DockWidgets (inherited from QDockWidget) with the saveState() / restoreState() function my MainWindow provides. I have two questions: 1. How can I save and restore my Dockwidgets? - I already tried registering my custom DockWidgets as a QMetaType and implementing the default Constructor, copy Constructor, Destructor and Streaming operators. 2. How can I identify the loaded DockWidgets? - For example: If 2 DockWidgets where saved and I load them with restoreState(), is there a way to get pointers to these loaded Widgets? Thanks, Tobias

    Read the article

  • What could cause these "failed to authenticate" logs other than failed login attempts (OSX)?

    - by Tom
    I've found this in the Console logs: 10/03/10 3:53:58 PM SecurityAgent[156] User info context values set for tom 10/03/10 3:53:58 PM authorizationhost[154] Failed to authenticate user (tDirStatus: -14090). 10/03/10 3:54:00 PM SecurityAgent[156] User info context values set for tom 10/03/10 3:54:00 PM authorizationhost[154] Failed to authenticate user (tDirStatus: -14090). 10/03/10 3:54:03 PM SecurityAgent[156] User info context values set for tom 10/03/10 3:54:03 PM authorizationhost[154] Failed to authenticate user (tDirStatus: -14090). There are about 11 of these "failed to authenticate" messages logged in quick succession. It looks to me like someone is sitting there trying to guess the password. However, when I tried to replicate this I get the same log messages except that this extra message appears after five attempts: 13/03/10 1:18:48 PM DirectoryService[11] Failed Authentication return is being delayed due to over five recent auth failures for username: tom. I don't want to accuse someone of trying to break into an account without being sure that they were actually trying to break in. My question is this: is it almost definitely someone guessing a password, or could the 11 "failed to authenticate" messages be caused by something else?

    Read the article

  • Bringing people into an Asterisk conference call

    - by Harley
    I'm using Asterisk 1.4 and am trying to work out a way to bring people into a conference call. In the ideal scenario two people would be talking and one of them would push some keys, then a phone number and then the three of them would be in a conference. From there they should be able to bring in other people as well. This seems to be what the Asterisk n-way call HOWTO is trying to do, but it doesn't work quite properly for me. Here's what happens: 1. Internal person A calls person B 2. Person A presses *0, he is given a dial tone and person B is taken to a conference room 3. Person A calls person C and they can talk, and then person A presses **. 4. Person C is brought to the conference room, but person A is disconnected. In the last step, A should be taken to the conference room as well. Here's the relevant logs, where 230 is person A, 231 is person B, 207 is person C, and 282 is the conference room.

    Read the article

  • Winlogon Application Error

    - by IT_07
    This error is happening to 6 out of 32 computers. I have created a base image from scratch using Ghost Enterprise, but error still shows on the same machines. It happens at the log on prompt and after doing a soft reset the message goes away, but it comes back eventually. -Error message- The Instruction at "0X74eF400e" referenced Memory at "0X00000000" The memory could not be "Written". Winlogon.exe - Application Error Any reason why this is happening? I have tried to run a memTest but everything shows okay.

    Read the article

  • How come I can't ping my home computer?

    - by bikefixxer
    I'm trying to set up a vpn into my home computer in order to access files from wherever. I have the home computer set up with a no-ip dynamic dns program so I can always connect, and have also tried using the actual ip address. However, when I try to connect or even ping from anywhere outside of my house I can't get through. I've tried putting that particular computer in the dmz, turned off the computers firewall and anti-virus, and I still don't get anything. I have comcast as my home internet provider. I have also tried from two different locations. Are there any other solutions I can try or is comcast the issue? I used to be able to do this when I ran a small web server at home for fun but now nothing works. Thanks in advance for any suggestions!

    Read the article

  • Automated Scanning for Corrupted Archive Files

    - by Synetech inc.
    Hi, I have all kinds of files that I have downloaded from everywhere over the years scattered around my hard drives. I’m in the process of trying to organize them all and have run into a problem. Sometimes a file was not downloaded correctly (this was a big issue when Chromium first came out) and is thus corrupt. For media files, this is relatively simple to determine (it requires actually opening and examining the file). For executables or other binaries, it is relatively difficult (executables may or may not crash, other binaries could be completely unknown). Archive files (eg zip, rar, 7z, exe, ace, etc.) however should be pretty simple, they have a built-in corruption detection facility. My problem now is that I really don’t want to open and test each and every single archived file throughout my drive; that would be a nightmare. I’m looking for a utility that can automate the process. Is there a program that can scan archive files on a drive and list the ones that are corrupt? Thanks a lot.

    Read the article

  • Is it possible to have Grub2's boot.img in the MBR and have it load core.img from a separate boot pa

    - by wesley
    I have a multiboot system that I would like to use Grub to manage. The version of Grub shipping with my Linux distro is Grub2, and it installs its equivalent of stage 1.5-2, core.img, into the remaining sectors on the first track after the MBR but before the first partition. Unfortunately, those sectors are needed by another program. I have a separate primary /boot partition. If I could only keep boot.img as my MBR but have it look in the /boot partition for core.img rather than the embedded one in the sectors immediately following the MBR, everything would work fine. Is this possible with grub2?

    Read the article

  • detecting when nav controller popped to root

    - by phil swenson
    Here is my code: SignupController* signupController = [[SignupController alloc] initWithNibName:@"SignupController" bundle:nil]; [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; self.navigationController.title = @"MyNavController"; [self.navigationController pushViewController:signupController animated:YES]; [signupController release]; Unfortunately for me calling pushViewController is not synchronous, so the next line ([signupController release]) is executed immediately. I need to detect hen the signupController has popped back to the root so I can take the data from the signup controller and do a registration or login. Any ideas? Thanks

    Read the article

  • how to see the optimized code in c

    - by sganesh
    I can examine the optimization using profiler, size of the executable file and time to take for the execution. I can get the result of the optimization. But I have these questions, How to get the optimized C code. Which algorithm or method used by C to optimize a code. Thanks in advance.

    Read the article

  • Python | How to send a JSON response with name assign to it

    - by MMRUser
    How can I return an response (lets say an array) to the client with a name assign to it form a python script. echo '{"jsonValidateReturn":'.json_encode($arrayToJs).'}'; in this scenario it returns an array with the name(jsonValidateReturn) assign to it also this can be accessed by jsonValidateReturn[1],so I want to do the same using a python script. I tried it once but it didn't go well array_to_js = [vld_id, vld_error, False] array_to_js[2] = False jsonValidateReturn = simplejson.dumps(array_to_js) return HttpResponse(jsonValidateReturn, mimetype='application/json') Thanks.

    Read the article

  • Workflow Foundation 4 - DeclarativeServiceLibrary - Error while calling second ReceiveAndSendReply

    - by dotnetexperiments
    Hi, I have created a DeclarativeServiceLibrary using VS2010 beta 2, Please check this image of Sequential Service Following is the code used to call these two activities ` int? data = 123; ServiceReference1.ServiceClient client1 = new ServiceReference1.ServiceClient(); string result1 = client1.GetData(data); //This line shows error :( string result2 = client1.Operation1(); Response.Write(result1 + " :: ::" + result2);` client1.GetData works perfectly, but client1.Operation1 show the following error. Please let me know how to fix this. There is no context attached to the incoming message for the service and the current operation is not marked with "CanCreateInstance = true". In order to communicate with this service check whether the incoming binding supports the context protocol and has a valid context initialized.

    Read the article

  • Communication framework recommendation

    - by Benny
    I have two applications, and one is keeping sending live images to the other and it need to be long-running. WCF - is it suitable? TCP/IP directly? Service bus, NServiceBus? Is there any better alternative for this communication?

    Read the article

  • In plain English, what are Django generic views?

    - by allyourcode
    The first two paragraphs of this page explain that generic views are supposed to make my life easier, less monotonous, and make me more attractive to women (I made up that last one): http://docs.djangoproject.com/en/dev/topics/generic-views/#topics-generic-views I'm all for improving my life, but what do generic views actually do? It seems like lots of buzzwords are being thrown around, which confuse more than they explain. Are generic views similar to scaffolding in Ruby on Rails? The last bullet point in the intro seems to indicate this. Is that an accurate statement?

    Read the article

  • Java - How to change context root of a dynamic web project in eclipse

    - by Yatendra Goel
    I have developed a dynamic web project in eclipse. Now I can access it through my browser using the following url: http://localhost:8080/MyDynamicWebApp Now I want to change the access url to http://localhost:8080/app I changed the context root from the project properties | Web Project Settings | Context Root But it is not working. The web app still has the access url as earlier. I have re-deployed the application on tomcat, re-started the tomcat and have done everything that should be done but the access url is the same as earlier. I found that there were no server.xml file attached with the WARfile. The how the tomcat is determining that the context root of my web app is /MyDynamicWebApp and is allowing me to access the application through that url

    Read the article

  • How can I use geoalchemy with elixir autoload tables?

    - by Dan Ellis
    I'm using geoalchemy and autoloaded tables, but I'd like to use Elixir, because it has a nicer query syntax. Does anyone know how to get them to work together? I did get it working with this code -- http://pastie.textmate.org/private/y3biyvosuejkrtxbpdv1a -- but that still gives the ugly warning about not recognising the geometry column when the table is reflected. Ideally, what I'd like to do is to get SQLAlchemy's own table reflection to recognise the geometry columns. How would I plumb them together?

    Read the article

  • SQL Import to update existing records?

    - by Kenundrum
    I've got a table in a database that contains costs for items that gets updated monthly. To update these costs, we have someone export the table, do some magic in excel, and then import the table back to the database. We're running MSSQL 2005 and using the built in SQL Management Studio. The problem is that when importing back into the table, we have to delete all the records before we import or else we'll get errors. The ideal situation would be for the import to recognize the primary keys and then update the records instead of trying to create a second record with a duplicate key- halting the import. The best illustration of the behavior we're trying to get can be found at http://sqlmanager.net/en/products/mssql/dataimport/documentation/hs2180.html the update or insert example. Is something like this possible with the built in tools or do we have to get third party software to make it happen?

    Read the article

  • Basic question about encryption - what exactly are keys?

    - by Tomas
    Hi, I was browsing and found good articles about encryption. However, none of them described why the key lenght is important and what exactly the key is used for. My guess is that could work this way: 0101001101010101010 Key: 01010010101010010101 //the longer the key, the longer unique sequence XOR or smth: //result Is this at least a bit how it works or I am missing something? Thanks

    Read the article

  • Testing a Django view cause "AttributeError: 'NoneType' object has no attribute 'handler500'" error

    - by jack
    I just wanted to start testing a Django view using the code below: from django.test.client import Client c = Client() response = c.get('/search/keyword') print response.content It just throws out following error message: "/usr/local/lib/python2.6/dist-packages/django/test/client.py", line 286, in get response = self.request(**r) File "/usr/local/lib/python2.6/dist-packages/django/test/client.py", line 230, in request response = self.handler(environ) File "/usr/local/lib/python2.6/dist-packages/django/test/client.py", line 74, in __call__ response = self.get_response(request) File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 143, in get_response return self.handle_uncaught_exception(request, resolver, exc_info) File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 178, in handle_uncaught_exception callback, param_dict = resolver.resolve500() File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 268, in resolve500 return self._resolve_special('500') File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 258, in _resolve_special callback = getattr(self.urlconf_module, 'handler%s' % view_type) AttributeError: 'NoneType' object has no attribute 'handler500' The view works in browser. What's wrong with above code?

    Read the article

  • How do I daemonize an arbitrary script in unix?

    - by dreeves
    I'd like a daemonizer that can turn an arbitrary, generic script or command into a daemon. There are two common cases I'd like to deal with: I have a script that should run forever. If it ever dies (or on reboot), restart it. Don't let there ever be two copies running at once (detect if a copy is already running and don't launch it in that case). I have a simple script or command line command that I'd like to keep executing repeatedly forever (with a short pause between runs). Again, don't allow two copies of the script to ever be running at once. Of course it's trivial to write a "while(true)" loop around the script in case 2 and then apply a solution for case 1, but a more general solution will just solve case 2 directly since that applies to the script in case 1 as well (you may just want a shorter or no pause if the script is not intended to ever die (of course if the script really does never die then the pause doesn't actually matter)). Note that the solution should not involve, say, adding file-locking code or PID recording to the existing scripts. More specifically, I'd like a program "daemonize" that I can run like % daemonize myscript arg1 arg2 or, for example, % daemonize 'echo `date` >> /tmp/times.txt' which would keep a growing list of dates appended to times.txt. (Note that if the argument(s) to daemonize is a script that runs forever as in case 1 above, then daemonize will still do the right thing, restarting it when necessary.) I could then put a command like above in my .login and/or cron it hourly or minutely (depending on how worried I was about it dying unexpectedly). NB: The daemonize script will need to remember the command string it is daemonizing so that if the same command string is daemonized again it does not launch a second copy. Also, the solution should ideally work on both OS X and linux but solutions for one or the other are welcome. (If I'm thinking of this all wrong or there are quick-and-dirty partial solutions, I'd love to hear that too.)

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >