Tag Archives: view

UIWebViewDelegate not monitoring XMLHttpRequest?

Questions: Is it true that the UIWebViewDelegate does not monitor requests made by using a XMLHttpRequest? If so, is there a way to monitor these kind of requests? e.g. UIWebViewDelegate does not catch this in -(BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSMutableURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType; var xhr = new XMLHttpRequest(); xhr.open(“GET”, “http://www.google.com”, true); xhr.onreadystatechange=function() { if (xhr.readyState==4) { alert(xhr.responseText);… Read More »

View AJAX response content in Chrome developer tools?

Questions: Traditionally I use FireBug to debug my AJAX requests. It lets you examine both the contents of your request as well as the response that was sent back from the server. (it also notifies you in the console when these occur, which is a useful feature that Chrome seems to lack). In Chrome, I… Read More »

Preview Image before uploading Angularjs

Questions: Hi I was wondering if there was a way to preview images before I upload them using angularjs? I am using the this library. https://github.com/danialfarid/angular-file-upload Thanks. Here is my code: template.html <div ng-controller=”picUploadCtr”> <form> <input type=”text” ng-model=”myModelObj”> <input type=”file” ng-file-select=”onFileSelect($files)” > <input type=”file” ng-file-select=”onFileSelect($files)” multiple> </form> </div> controller.js .controller(‘picUploadCtr’, function($scope, $http,$location, userSettingsService) { $scope.onFileSelect… Read More »

'Failed to find style mapViewStyle' error persists

Questions: I’ve been working on this app for almost a year now (senior project) when it just decided to break a few days ago. My application has been developed using Eclipse version 3.7.2 64bit targeting Froyo Android 2.2, using my Windows 7 64bit pc. So far I have tried: rearranging the uses-library tag in the… Read More »

Annotation processor-generated Errors/warnings not showing in Eclipse editor or Problems view

Questions: I have written a customer annotation processor to generate various source files, wrapped in an Eclipse plugin. As part of this process it also logs various errors and warnings using the usual call ProcessingEnvironment#getMessager().printMesssage(Kind, String, Element). I have been testing the processor by debugging the plugin in Eclipse. In the launched sub-instance of Eclipse… Read More »

How can I redirect JNI console output to Eclipse Console view, when Eclipse plugin uses JNI?

Questions: I have an Eclipse plugin (A) which has a dependency on another plugin (B). Plugin B is simply a wrapper around a jar, which contains a native dll, and performs jni functionality. Given this setup, I have the following code in A’s Activator class’s start method: MessageConsole jniConsole = new MessageConsole(“Opereffa Output”, null); ConsolePlugin.getDefault().getConsoleManager().addConsoles(new… Read More »

MVC Return Partial View as JSON

Questions: Is there a way to return an HTML string from rendering a partial as part of a JSON response from MVC? public ActionResult ReturnSpecialJsonIfInvalid(AwesomenessModel model) { if (ModelState.IsValid) { if(Request.IsAjaxRequest() return PartialView(“NotEvil”, model); return View(model) } if(Request.IsAjaxRequest()) { return Json(new { error=true, message = PartialView(“Evil”,model)}); } return View(model); } Answers: You can extract the… Read More »