Daily Archives

Articles indexed Friday May 14 2010

Page 13/116 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • When using delegates, need better way to do sequential processing

    - by Padawan
    I have a class WebServiceCaller that uses NSURLConnection to make asynchronous calls to a web service. The class provides a delegate property and when the web service call is done, it calls a method webServiceDoneWithXXX on the delegate. There are several web service methods that can be called, two of which are say GetSummary and GetList. The classes that use WebServiceCaller initially need both the summary and list so they are written like this: -(void)getAllData { [webServiceCaller getSummary]; } -(void)webServiceDoneWithGetSummary { [webServiceCaller getList]; } -(void)webServiceDoneWithGetList { ... } This works but there are at least two problems: The calls are split across delegate methods so it's hard to see the sequence at a glance but more important it's hard to control or modify the sequence. Sometimes I want to call just GetSummary and not also GetList so I would then have to use an ugly class-level state variable that tells webServiceDoneWithGetSummary whether to call GetList or not. Assume that GetList cannot be done until GetSummary completes and returns some data which is used as input to GetList. Is there a better way to handle this and still get asynchronous calls? Update based on Matt Long's answer: Using notifications instead of a delegate, it looks like I can solve problem #2 by setting a different selector depending on whether I want the full sequence (GetSummary+GetList) or just GetSummary. Both observers would still use the same notification name when calling GetSummary. I would have to write two separate methods to handle GetSummaryDone instead of using a single delegate method (where I would have needed some class-level variable to tell whether to then call GetList). -(void)getAllData { [[NSNotificationCenter defaultCenter] addObserver:self              selector:@selector(getSummaryDoneAndCallGetList:)                  name:kGetSummaryDidFinish object:nil];     [webServiceCaller getSummary]; } -(void)getSummaryDoneAndCallGetList { [NSNotificationCenter removeObserver] //process summary data [[NSNotificationCenter defaultCenter] addObserver:self              selector:@selector(getListDone:)                  name:kGetListDidFinish object:nil];     [webServiceCaller getList]; } -(void)getListDone { [NSNotificationCenter removeObserver] //process list data } -(void)getJustSummaryData { [[NSNotificationCenter defaultCenter] addObserver:self              selector:@selector(getJustSummaryDone:) //different selector but                  name:kGetSummaryDidFinish object:nil]; //same notification name     [webServiceCaller getSummary]; } -(void)getJustSummaryDone { [NSNotificationCenter removeObserver] //process summary data } I haven't actually tried this yet. It seems better than having state variables and if-then statements but you have to write more methods. I still don't see a solution for problem 1.

    Read the article

  • How to disable typing in values in Dojo's NumberSpinner?

    - by callie16
    Hi, is there a way to disable typing in of values in the NumberSpinner of Dojo? Or is there a way for me to set back a previous value to it? Here's a sample situation: I have a spinner where the range is 1-3. However, the user types in an invalid value... say, a letter. The usual error handling happens. However, if the user deletes the value and focuses out (e.g. goes to another widget/control/etc. in the page), the spinner stays blank. Either I reset it to the last valid value or I disable typing so that the user can just use the up and down arrows to manipulate the widget. Any thoughts? Thanks!

    Read the article

  • jqGrid jQuery UI button wrapping in toolbar

    - by gurun8
    I have a jQuery UI Button that I'm placing in a jqGrid toolbar but the contents of the button are wrapping. I've tried to prevent the wrapping by using CSS white-space Property to no avail. Here's a snapshot of what's happening: Here are two code snippets of my attempt to fix the problem: $("#t_imageList").css("white-space", "nowrap").html('<button>Add</button>'); $("#t_imageList button").button({ icons: {primary: 'ui-icon-plus'}, text: true }); and/or $("#t_imageList button").css("white-space", "nowrap").button({ icons: {primary: 'ui-icon-plus'}, text: true }); Has someone experienced the same issue? If so, what was your solution?

    Read the article

  • Jquery ajax and php die()

    - by BizMark
    Hi, I have an IE problem. I am using the jquery ajax method to call a php script. The php script just calls die(). In firefox, the error message is displayed, but in IE the success message is displayed without any data. I would prefer the error function to be called. Is there any way to fix this? I'm guessing my javascript code needs change somehow. Thanks! <?php die() ?> $.ajax({ url: "phps/php.php?id="+the_id, dataType: "json", error: function(){ alert('error'); }, success: function(data){ alert("SUCCESS"); } });

    Read the article

  • How do I load Formtastic to test it?

    - by Alan
    I am using Rails 2.0.2 and following Github installation instructions: 1. add as gem source ie "gem sources -a http://gemcutter.org/".....ok 2. install gem ie "gem install formtastic"....gives error, could not find formtastic locally or in a repository I am learning Ruby on Rails and have no knowledge of gems

    Read the article

  • MySQL encoding problem after site move

    - by Quan Zhou
    Guys, I need your help. Since last month my friend has lost his database on Dreamhost, he decided to move his wordpress based blog site (written in Chinese) to my server. He's using a wp-plugin called wp-db-backup to perform regular db backups. And the servers backgrounds are: Dreamhost: Linux 2.6.31.5-modsign-aufs2-grsec-2-opt mysql Ver 14.12 Distrib 5.0.16, for pc-linux-gnu (i386) using readline 5.0 apache2 unknown version My Server: Linux li159-46 2.6.32.12-x86_64-linode12 mysql Ver 14.14 Distrib 5.1.45, for debian-linux-gnu (x86_64) using readline 6.1 nginx 0.8.36 His site's encoding was UTF-8 in both wp-config and db. I imported his db backup file in UTF-8 by default, then I sync'd files using rsync from dreamhost, then I just changed the db address and nothing more. But when I take first look at the "new" site, it was full of unreadable characters, I met this problem before, I changed charset options in browser but none of them can make it displayed properly. Then I converted his db to GB18030, it works with only if browser set charset to GB18030 either GBK, but by default they recognize the charset as UTF-8. I tried to edit the headers but it doesn't work. What could I do now? Thx~~

    Read the article

  • What is the best Web interface to bind9 for a small ISP?

    - by Gabble
    I am looking for a Web interface to bind9, to edit zones, add records, etc, with user access privileges (not Webmin please!) but free and possibly open-source. I have googled a lot, but I only found stalled projects, or very old ones, not updated after 2002 or so. It would be great a nice Web2.0 UI, but at this point it's not crucial. Thanks a lot! Gabble

    Read the article

  • Windows Boot disc to save files?

    - by acidzombie24
    Somehow after updating my legit windows 7 OS with no pirated or mod software on my PC i was welcome to a black screen. I popped in my ghost disc and copied the files i need to an external HD. IIRC windows 7 disc can do that too. Problem with the way i did it on ghost was it excepted me to select 1 file (an HD disc image) so i couldnt select multiple folders to move. Also when i did move i had no idea if it finished or how long it would take. My linux live cd couldnt access the HD. Anyways, is there a disc i can use to easily copy files from my laptop to my external HD? I think ghost, windows 7 and windows server all allow me but is there one that is better suited to copy files?

    Read the article

  • HTLM notes in freemind

    - by asdf
    Hi, I wonder if the following things can be done with the HTML notes pane of freemind: 1- is it possible on the layout view to decrease the separation between lines? 2- the panel is horizontal, is it possible to setup a vertical view? (I have a big, horizontal-like monitor) By the way, when I move the mouse pointer over a node, i can see the HTLM note associated with it, but its view (as a yellow square) only lasts for some seconds. Can it be made permament? Thanks a lot

    Read the article

  • PHP: Coding long-running scripts when servers impose an execution time limit

    - by thomasrutter
    FastCGI servers, for example, impose an execution time limit on PHP scripts which cannot be altered using set_time_limit() in PHP. IIS does this too I believe. I wrote an import script for a PHP application that works well under mod_php but fails under FastCGI (mod_fcgid) because the script is killed after a certain number of seconds. I don't yet know of a way of detecting what your time limit is in this case, and haven't decided how I'm going to get around it. Doing it in small chunks with redirects seems like one kludge, but how? What techniques would you use when coding a long-running task such as an import or export task, where an individual PHP script may be terminated by the server after a certain number of seconds? Please assume you're creating a portable script, so you don't necessarily know whether PHP will eventually be run under mod_php, FastCGI or IIS or whether a maximum execution time is enforced at the server level.

    Read the article

  • Retrieving multiple rows from a loop-created form... Stuck.

    - by hangston
    Let me start by saying that I'm new to PHP, but I'm here to learn and would really appreciate your help. I use the following code to pull in data and create a form. This creates up to 40 lines for a user to fill out. Each line consists of the same information: Description, Amount, and Frequency. The remainder of the information needed is generated by the database. (See hidden fields) <?php $row = 0; do { $optid = $row_options['option_id']; echo "<tr>\n\t<td>" . htmlentities($row_options['option']) . "</td>\n"; echo "\t<td>" . "<input name='description' type='text' size='40' maxlength='120'/>" . "</td>\n"; echo "\t<td>" . "<input name='option_id' type='hidden' value='$optid' />$<input name='amount' type='text' size='10' maxlength='7'/>" . "</td>\n"; echo "\t<td>" . "<select name='assisted_frequency'> <option value='Monthly'>Monthly</option> <option value='Weekly'>Weekly</option> <option value='Daily'>Daily</option> <option value='Hourly'>Hourly</option> <option value='One-Time'>One-Time</option> </select>" . "</td>\n</tr>\n"; $array[$row] = array( $arraydesc[$row] = $_POST['description'], $arrayamto[$row] = $_POST['amount'], $arrayoptid[$row] = $optid, $arrayfreq[$row] = $_POST['frequency'], ); $row ++; } while ($row_options = mysql_fetch_assoc($options)); $counter = $row - 1; ?> I'm having troubles retrieving the information that the user inputs. My intent is to loop through each row after the user has input their information, then upload the mix of my database information and the user's information into another database. For example, the user would see, albeit prettier: form1 Option 1: description [input box] amount [input box] frequency [option box] Option 2: description [input box] amount [input box] frequency [option box] Option 3: description [input box] amount [input box] frequency [option box] Option 4: description [input box] amount [input box] frequency [option box] submit Upon submitting the form above, I'm using a query similar to the following to input the data into the database: for($row=0; $row<=$counter; $row++){ $insertSQL2 = sprintf("INSERT INTO table (option_id, amount, description, frequency) VALUES (%s, %s, %s, %s)", GetSQLValueString($arrayoptid[$row], "int"), GetSQLValueString($arrayamto[$row], "int"), GetSQLValueString($arraydesc[$row], "text"), GetSQLValueString($arrayfreq[$row], "text")); // code to submit query } I've tried for, foreach, arrays (what feels like the everything I know) to post each row (row by row) into the database. I either get just the last row of data, or no data at all. I also worry that the [$row] technique is adding characters to my data. What is the best way to retrieve each row of the user's inputs, then upload this data (row by row) into the database? Also, I would really appreciate your suggestions for improving my coding technique and the approach I'm taking.

    Read the article

  • Why does Spring Security's BindAuthenticator require read permissions for users?

    - by Thomas
    Hi all, I'm currently implementing/configuring the LDAP authentication of a Java web application using Spring Security 3.0. I'm using Microsoft AD LDS as LDAP server and chose the Spring's BindAuthenticator. I found out that the authentication only works if the authenticated user is a member of the partition's Readers role. The BindAuthenticator tries to read the user's attributes after the authentication, which seems reasonable in scenarios where authorities are retrieved from the directory service. Being new to LDAP and AD, is this an acceptable practise when the application is integrated in an existing AD structure? Can fine-tune an give the user dns only read permissions for their own attributes rather than adding them to the Reader group? Thanks Thomas

    Read the article

  • Initialize generic object from a System.Type

    - by CaptnCraig
    I need to create a generic type, but I do not know the type at compile time. I would like to do this: Type t = typeof(whatever); var list = new List<t> this won't compile, because t is not a valid type. But it does know all about a valid type. Is there a way to dynamically create the generic list from a System.Type like this? I may need reflection, and that's ok, I am just a bit lost here.

    Read the article

  • Dynamic object property populator (without reflection)

    - by grenade
    I want to populate an object's properties without using reflection in a manner similar to the DynamicBuilder on CodeProject. The CodeProject example is tailored for populating entities using a DataReader or DataRecord. I use this in several DALs to good effect. Now I want to modify it to use a dictionary or other data agnostic object so that I can use it in non DAL code --places I currently use reflection. I know almost nothing about OpCodes and IL. I just know that it works well and is faster than reflection. I have tried to modify the CodeProject example and because of my ignorance with IL, I have gotten stuck on two lines. One of them deals with dbnulls and I'm pretty sure I can just lose it, but I don't know if the lines preceding and following it are related and which of them will also need to go. The other, I think, is the one that pulled the value out of the datarecord before and now needs to pull it out of the dictionary. I think I can replace the "getValueMethod" with my "property.Value" but I'm not sure. I'm open to alternative/better ways of skinning this cat too. Here's the code so far (the commented out lines are the ones I'm stuck on): using System; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; public class Populator<T> { private delegate T Load(Dictionary<string, object> properties); private Load _handler; private Populator() { } public T Build(Dictionary<string, object> properties) { return _handler(properties); } public static Populator<T> CreateBuilder(Dictionary<string, object> properties) { //private static readonly MethodInfo getValueMethod = typeof(IDataRecord).GetMethod("get_Item", new [] { typeof(int) }); //private static readonly MethodInfo isDBNullMethod = typeof(IDataRecord).GetMethod("IsDBNull", new [] { typeof(int) }); Populator<T> dynamicBuilder = new Populator<T>(); DynamicMethod method = new DynamicMethod("Create", typeof(T), new[] { typeof(Dictionary<string, object>) }, typeof(T), true); ILGenerator generator = method.GetILGenerator(); LocalBuilder result = generator.DeclareLocal(typeof(T)); generator.Emit(OpCodes.Newobj, typeof(T).GetConstructor(Type.EmptyTypes)); generator.Emit(OpCodes.Stloc, result); int i = 0; foreach (var property in properties) { PropertyInfo propertyInfo = typeof(T).GetProperty(property.Key, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy | BindingFlags.Default); Label endIfLabel = generator.DefineLabel(); if (propertyInfo != null && propertyInfo.GetSetMethod() != null) { generator.Emit(OpCodes.Ldarg_0); generator.Emit(OpCodes.Ldc_I4, i); //generator.Emit(OpCodes.Callvirt, isDBNullMethod); generator.Emit(OpCodes.Brtrue, endIfLabel); generator.Emit(OpCodes.Ldloc, result); generator.Emit(OpCodes.Ldarg_0); generator.Emit(OpCodes.Ldc_I4, i); //generator.Emit(OpCodes.Callvirt, getValueMethod); generator.Emit(OpCodes.Unbox_Any, property.Value.GetType()); generator.Emit(OpCodes.Callvirt, propertyInfo.GetSetMethod()); generator.MarkLabel(endIfLabel); } i++; } generator.Emit(OpCodes.Ldloc, result); generator.Emit(OpCodes.Ret); dynamicBuilder._handler = (Load)method.CreateDelegate(typeof(Load)); return dynamicBuilder; } } EDIT: Using Marc Gravell's PropertyDescriptor implementation (with HyperDescriptor) the code is simplified a hundred-fold. I now have the following test: using System; using System.Collections.Generic; using System.ComponentModel; using Hyper.ComponentModel; namespace Test { class Person { public int Id { get; set; } public string Name { get; set; } } class Program { static void Main() { HyperTypeDescriptionProvider.Add(typeof(Person)); var properties = new Dictionary<string, object> { { "Id", 10 }, { "Name", "Fred Flintstone" } }; Person person = new Person(); DynamicUpdate(person, properties); Console.WriteLine("Id: {0}; Name: {1}", person.Id, person.Name); Console.ReadKey(); } public static void DynamicUpdate<T>(T entity, Dictionary<string, object> properties) { foreach (PropertyDescriptor propertyDescriptor in TypeDescriptor.GetProperties(typeof(T))) if (properties.ContainsKey(propertyDescriptor.Name)) propertyDescriptor.SetValue(entity, properties[propertyDescriptor.Name]); } } } Any comments on performance considerations for both TypeDescriptor.GetProperties() & PropertyDescriptor.SetValue() are welcome...

    Read the article

  • Handling Model Inheritance in ASP.NET MVC2

    - by enth
    I've gotten myself stuck on how to handle inheritance in my model when it comes to my controllers/views. Basic Model: public class Procedure : Entity { public Procedure() { } public int Id { get; set; } public DateTime ProcedureDate { get; set; } public ProcedureType Type { get; set; } } public ProcedureA : Procedure { public double VariableA { get; set; } public int VariableB { get; set; } public int Total { get; set; } } public ProcedureB : Procedure { public int Score { get; set; } } etc... many of different procedures eventually. So, I do things like list all the procedures: public class ProcedureController : Controller { public virtual ActionResult List() { IEnumerable<Procedure> procedures = _repository.GetAll(); return View(procedures); } } but now I'm kinda stuck. Basically, from the list page, I need to link to pages where the specific subclass details can be viewed/edited and I'm not sure what the best strategy is. I thought I could add an action on the ProcedureController that would conjure up the right subclass by dynamically figuring out what repository to use and loading the subclass to pass to the view. I had to store the class in the ProcedureType object. I had to create/implement a non-generic IRepository since I can't dynamically cast to a generic one. public virtual ActionResult Details(int procedureID) { Procedure procedure = _repository.GetById(procedureID, false); string className = procedure.Type.Class; Type type = Type.GetType(className, true); Type repositoryType = typeof (IRepository<>).MakeGenericType(type); var repository = (IRepository)DependencyRegistrar.Resolve(repositoryType); Entity procedure = repository.GetById(procedureID, false); return View(procedure); } I haven't even started sorting out how the view is going to determine which partial to load to display the subclass details. I'm wondering if this is a good approach? This makes determining the URL easy. It makes reusing the Procedure display code easy. Another approach is specific controllers for each subclass. It simplifies the controller code, but also means many simple controllers for the many procedure subclasses. Can work out the shared Procedure details with a partial view. How to get to construct the URL to get to the controller/action in the first place? Time to not think about it. Hopefully someone can show me the light. Thanks in advance.

    Read the article

  • How do you Bind to a ComboBox in a DataTemplate?

    - by discwiz
    I have a listbox that is bound to an observable collection of Audio (custom class). The Audio class has two properties, DisplayText (string) and a property called TarpIds (Observable Collection of Integer). I need to allow the user to change the TarpID in the combo box for each list item displayed and catch the selection change. I created a DataTemplate that styles the DisplayText property from the Audio object and adds a ComboBox to display the available TarpIDs for this audio (These are dynamic and unique to each Audio). The DisplayText works great, but I can not get the TarpIDs to display in the ComboBox. Here is what I have so far and thanks for any help. FYI I set the ItemSource at run time that binds the ListUploadAudio to the Observable Collection of Audio. <Border BorderBrush="Red" Background="WhiteSmoke" CornerRadius="8"> <Border.Resources> <DataTemplate x:Key="UploadLayout" DataType="Audio"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Path=DisplayText}" FontWeight="Bold" Foreground="Blue"> </TextBlock> <ComboBox x:Name="ListBoxTarpIDs" ItemsSource="{Binding Path=TarpIds}"> </ComboBox> </StackPanel> </DataTemplate> </Border.Resources> <ListBox x:Name="ListUploadAudio" BorderBrush="Transparent" Background="Transparent" Width="230" Margin="10" Height="200" IsSynchronizedWithCurrentItem="True" SelectionMode="Multiple" ItemTemplate="{DynamicResource UploadLayout}"> </ListBox> </Border>

    Read the article

  • Subversion commit failed on Mac OS X with error "no such table: rep_cache"

    - by arun
    I created a subversion repository, imported an empty structure, checked out the repo, added a file to the working copy and tried commiting the working copy with the following commands: svnadmin create mysvn svn import -m "initial empty structure" test/ file:///tmp/mysvn svn co file:///tmp/mysvn mywc svn ci -m "test" The commit failed with the following error: Transmitting file data .svn: Commit failed (details follow): svn: While preparing '/tmp/mywc' for commit svn: no such table: rep_cache I am running Mac OS X 10.6.3 and subversion 1.6.5. Did I miss any steps or Mac specific commands? Thanks for your help.

    Read the article

  • Display data requested by an ajax.load() call once complete, not during the call.

    - by niczoom
    My jQuery code (using ajax) request's data from a php script (pgiproxy.php) using the following function: function grabPage($pageURL) { $homepage = file_get_contents($pageURL); echo $homepage; } I then extract the html code i need from the returned data using jQuery and insert it into a div called #BFX, as follows: $("#btnNewLoadMethod1").click(function(){ $('#temp1').load('pgiproxy.php', { data : $("#formdata").serialize(), mode : "graph"} , function() { $('#temp').html( $('#temp1').find('center').html() ); $('#BFX').html( $('#temp').html() ); }); }); This works fine. I get the html data (which is a gif image) i need displayed on screen in the correct div. The problem is i can see the html data loading into the div (dependant on network speed), but what I want is to insert the extracted html code into #BFX ONLY when the ajax request has fully completed.

    Read the article

  • Possible to manipulate UI elements via dispatchEvent()?

    - by rinogo
    Hi all! I'm trying to manually dispatch events on a textfield so I can manipulate it indirectly via code (e.g. place cursor at a given set of x/y coordinates). However, my events seem to have no effect. I've written a test to experiment with this phenomenon: package sandbox { import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextField; import flash.text.TextFieldType; import flash.text.TextFieldAutoSize; import flash.utils.setTimeout; public class Test extends Sprite { private var tf:TextField; private var tf2:TextField; public function Test() { super(); tf = new TextField(); tf.text = 'Interact here'; tf.type = TextFieldType.INPUT; addChild(tf); tf2 = new TextField(); tf2.text = 'Same events replayed with five second delay here'; tf2.autoSize = TextFieldAutoSize.LEFT; tf2.type = TextFieldType.INPUT; tf2.y = 30; addChild(tf2); tf.addEventListener(MouseEvent.CLICK, mouseListener); tf.addEventListener(MouseEvent.DOUBLE_CLICK, mouseListener); tf.addEventListener(MouseEvent.MOUSE_DOWN, mouseListener); tf.addEventListener(MouseEvent.MOUSE_MOVE, mouseListener); tf.addEventListener(MouseEvent.MOUSE_OUT, mouseListener); tf.addEventListener(MouseEvent.MOUSE_OVER, mouseListener); tf.addEventListener(MouseEvent.MOUSE_UP, mouseListener); tf.addEventListener(MouseEvent.MOUSE_WHEEL, mouseListener); tf.addEventListener(MouseEvent.ROLL_OUT, mouseListener); tf.addEventListener(MouseEvent.ROLL_OVER, mouseListener); } private function mouseListener(event:MouseEvent):void { //trace(event); setTimeout(function():void {trace(event); tf2.dispatchEvent(event);}, 5000); } } } Essentially, all this test does is to use setTimeout to effectively 'record' events on TextField tf and replay them five seconds later on TextField tf2. When an event is dispatched on tf2, it is traced to the console output. The console output upon running this program and clicking on tf is: [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=0 localY=1 stageX=0 stageY=1 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="rollOver" bubbles=false cancelable=false eventPhase=2 localX=0 localY=1 stageX=0 stageY=1 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseOver" bubbles=true cancelable=false eventPhase=3 localX=0 localY=1 stageX=0 stageY=1 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=2 localY=1 stageX=2 stageY=1 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=2 localY=2 stageX=2 stageY=2 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=2 localY=3 stageX=2 stageY=3 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=3 localY=3 stageX=3 stageY=3 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=5 localY=3 stageX=5 stageY=3 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=6 localY=5 stageX=6 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=7 localY=5 stageX=7 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=9 localY=5 stageX=9 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=10 localY=5 stageX=10 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=11 localY=5 stageX=11 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=12 localY=5 stageX=12 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseDown" bubbles=true cancelable=false eventPhase=3 localX=12 localY=5 stageX=12 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseUp" bubbles=true cancelable=false eventPhase=3 localX=12 localY=5 stageX=12 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="click" bubbles=true cancelable=false eventPhase=3 localX=12 localY=5 stageX=12 stageY=5 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=10 localY=4 stageX=10 stageY=4 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=9 localY=2 stageX=9 stageY=2 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseMove" bubbles=true cancelable=false eventPhase=3 localX=9 localY=1 stageX=9 stageY=1 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="mouseOut" bubbles=true cancelable=false eventPhase=3 localX=-1 localY=-1 stageX=-1 stageY=-1 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] [MouseEvent type="rollOut" bubbles=false cancelable=false eventPhase=2 localX=-1 localY=-1 stageX=-1 stageY=-1 relatedObject=null ctrlKey=false altKey=false shiftKey=false delta=0] As we can see, the events are being captured and replayed successfully. However, no change occurs in tf2 - the mouse cursor does not appear in tf2 as we would expect. In fact, the cursor remains in tf even after the tf2 events are dispatched. Please help! Thanks, -Rich

    Read the article

  • Sub-total and total columns

    - by Tass-man
    In Visual Foxpro 9 I am trying to wite an sql with a product "subtotal" column and a report "total" column. The sql code that works is as follows, but when I insert the commented out "Case" code I get errors that seem to increase as I correct the preceeding error. Can any one tell me in which place I should insert the "case" and what is wrong with the code? SELECT qItemSaleLines.ItemID, ; qItems.ItemID, ; qItemSaleLines.SaleID, ; qSales.SaleID, ; qSales.CardRecordID, ; qCustomers.CardRecordID, ; qItems.ItemNumber AS ProdCODE, ; qItems.ItemName AS StkNAME, ; qCustomers.LastName AS CUSTOMER, ; qSales.InvoiceNumber AS SaleINVNo, ; qSales.InvoiceDate AS SaleDATE, ; qItemSaleLines.Quantity AS SaleQTY, ; qItemSaleLines.TaxExclusiveTotal AS SALE, ; qItemSaleLines.CostOfGoodsSoldAmount AS COGS, ; qItemSaleLines.TaxExclusiveTotal - qItemSaleLines.CostOfGoodsSoldAmount AS MARGIN, ; (qItemSaleLines.TaxExclusiveTotal - qItemSaleLines.CostOfGoodsSoldAmount) * / qItemSaleLines.TaxExclusiveTotal AS MPERCENT ; FROM qItemSaleLines, qItems, qSales, qCustomers ; WHERE qSales.CardRecordID = qCustomers.CardRecordID AND qItemSaleLines.SaleID = qSales.SaleID AND ; qItemSaleLines.ItemID = qItems.ItemID AND qSales.InvoiceDate {^2009-06-30} ; ORDER BY qItems.ItemNumber, qSales.InvoiceDate ; *!* (SELECT qItems.ItemID, qItemSaleLines.ItemID, qItemSaleLines.TaxExclusiveTotal, ; *!* CASE WHEN qItems.ItemID = (SELECT TOP 1 qItems.ItemID FROM qItems.ItemID, ; *!* WHERE qItems.ItemID = qItemSaleLines.ItemID, ; *!* ORDER BY qItems.ItemID desc), ; *!* THEN (SELECT SUM(qItemSaleLines.TaxExclusiveTotal) FROM qItemSaleLines.TaxExclusiveTotal,; *!* WHERE qItems.ItemID <= qItemSaleLines.ItemID AND qItems.ItemID = qItemSaleLines.ItemID, ; *!* ELSE ' ' END AS 'PROD-SALE'), ; *!* CASE WHEN qItems.ItemID = (SELECT TOP 1 qItems.ItemID FROM qItems.ItemID, ; *!* ORDER BY qItems.ItemID desc), ; *!* THEN (SELECT SUM(qItemSaleLines.TaxExclusiveTotal) FROM qItemSaleLines.TaxExclusiveTotal, ; *!* ELSE ' ' END AS 'Grand Total') ;

    Read the article

  • javascript: Problems with multiple setIntervals running simultaniously

    - by user340879
    Hello, My first post here. I want to make a horizontal menu with submenu's sliding down on mouseover. I know I could use jQuery but this is to practice my javascript skills. I use the following code: var up = new Array() var down = new Array() var submenustart function titleover(headmenu, inter) { submenu = headmenu.lastChild up[inter] = window.clearInterval(up[inter]) down[inter] = window.setInterval("slidedown(submenu)",1) } function slidedown(submenu) { if(submenu.offsetTop < submenustart) { submenu.style.top = submenu.offsetTop + 1 + "px" } } function titleout(headmenu, inter) { submenu = headmenu.lastChild down[inter] = window.clearInterval(down[inter]) up[inter] = window.setInterval("slideup(submenu)", 1) } function slideup(submenu) { if(submenu.offsetTop > submenustart - submenu.clientHeight + 1) { submenu.style.top = submenu.offsetTop - 1 + "px" } } The variable submenustart gets appointed a value in another function which is not relevant for my question. HTML looks like this: <table class="hoofding" id="hoofding"> <tr> <td onmouseover="titleover(this, 0)" onmouseout="titleout(this, 0)"><a href="#" class="hoofdinglink" id="hoofd1">AAAA</a> <table class="menu"> <tr><td><a href="...">1111</a></td></tr> <tr><td><a href="...">2222</a></td></tr> <tr><td><a href="...">3333</a></td></tr> </table></td> <td onmouseover="titleover(this, 1)" onmouseout="titleout(this, 1)"><a href="#" class="hoofdinglink">BBBB</a> <table class="menu"> <tr><td><a href="...">1111</a></td></tr> <tr><td><a href="...">2222</a></td></tr> <tr><td><a href="...">3333</a></td></tr> <tr><td><a href="...">4444</a></td></tr> <tr><td><a href="...">5555</a></td></tr> </table></td> ... </tr> </table> What happens is the following: If I go over and out (for ex) menu A it works fine. If i go now over menu B the interval applied to A is now applied to B. There are now 2 interval functions applied to B. The one originally for A and a new one triggered by the mouseover on B. If I would go to A all the intervals are now applied to A. I have been searching for hours but and I am completely stuck. Thanks in advance.

    Read the article

  • How to conform to UITabBarControllerDelegate

    - by 4thSpace
    I have a tabbar based application and do the following to get a reference to the application delegate: MyAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; Which then gives this warning: warning: type 'id <UIApplicationDelegate>' does not conform to the 'UITabBarControllerDelegate' My application delegate header looks like this: #import <UIKit/UIKit.h> @interface MyAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> { UIWindow *window; UITabBarController *tabBarController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController; @end The only methods in the .m file are applicationDidFinishLaunching and dealloc. What else do I need to conform to the protocol?

    Read the article

  • Getting the old value of a asp.net control on postback

    - by D3no
    I want to be able to find the old value of a asp.net control (textbox, checkbox etc) without relying on events (e.g. OnTextChange event). Something like "someTextboxControl.OldText" would be perfect! I imagine that it is stored in the viewstate and need to somehow get at it via a custom control. Any ideas?

    Read the article

  • How do I get jquery & mootools to play nice?

    - by Vic
    I've been using Mootools 1.2.4 as my JS framework of choice. I've added Checkout by Amazon to one of my pages, and they inject jQuery 1.2.6 into the page and messes up my dollar function (among other things). I have control over Mootools, but not jQuery. I would rather not rewrite my existing code to accomodate jQuery since Checkout by Amazon was an afterthought and plug-in element. Any thoughts or suggestions are recommended. Thanks!

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >