Search Results

Search found 6420 results on 257 pages for 'mathieu parent'.

Page 42/257 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Windows Forms: Enable/Disable WS_CLIPCHILDREN

    - by Agnel Kurian
    How do I turn on/off the WS_CLIPCHILDREN window style in a Windows Forms parent control? I would like to display some text on top of the child control after it has painted. In my parent control, this is what I have: class Parent : public Control { void Parent::OnPaint(PaintEventArgs ^e){ Control::OnPaint(e); // parent draws here // some drawing should happen over the child windows // in other words, do not clip child window regions } }; On checking with Spy++ I find that the parent has the WS_CLIPCHILDREN window style enabled by default. What is the Windows Forms way to turn this off? Note: Sample code is in C++/CLI but I have tagged this C# for visibility... language is immaterial here. Feel free to translate the code to C#.

    Read the article

  • OperationalError: foreign key mismatch

    - by Niek de Klein
    I have two tables that I'm filling, 'msrun' and 'feature'. 'feature' has a foreign key pointing to the 'msrun_name' column of the 'msrun' table. Inserting in the tables works fine. But when I try to delete from the 'feature' table I get the following error: pysqlite2.dbapi2.OperationalError: foreign key mismatch From the rules of foreign keys in the manual of SQLite: - The parent table does not exist, or - The parent key columns named in the foreign key constraint do not exist, or - The parent key columns named in the foreign key constraint are not the primary key of the parent table and are not subject to a unique constraint using collating sequence specified in the CREATE TABLE, or - The child table references the primary key of the parent without specifying the primary key columns and the number of primary key columns in the parent do not match the number of child key columns. I can see nothing that I'm violating. My create tables look like this: DROP TABLE IF EXISTS `msrun`; -- ----------------------------------------------------- -- Table `msrun` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `msrun` ( `msrun_name` VARCHAR(40) PRIMARY KEY NOT NULL , `description` VARCHAR(500) NOT NULL ); DROP TABLE IF EXISTS `feature`; -- ----------------------------------------------------- -- Table `feature` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `feature` ( `feature_id` VARCHAR(40) PRIMARY KEY NOT NULL , `intensity` DOUBLE NOT NULL , `overallquality` DOUBLE NOT NULL , `charge` INT NOT NULL , `content` VARCHAR(45) NOT NULL , `msrun_msrun_name` VARCHAR(40) NOT NULL , CONSTRAINT `fk_feature_msrun1` FOREIGN KEY (`msrun_msrun_name` ) REFERENCES `msrun` (`msrun_name` ) ON DELETE NO ACTION ON UPDATE NO ACTION); CREATE UNIQUE INDEX `id_UNIQUE` ON `feature` (`feature_id` ASC); CREATE INDEX `fk_feature_msrun1` ON `feature` (`msrun_msrun_name` ASC); As far as I can see the parent table exists, the foreign key is pointing to the right parent key, the parent key is a primary key and the foreign key specifies the primary key column. The script that produces the error: from pysqlite2 import dbapi2 as sqlite import parseFeatureXML connection = sqlite.connect('example.db') cursor = connection.cursor() cursor.execute("PRAGMA foreign_keys=ON") inputValues = ('example', 'description') cursor.execute("INSERT INTO `msrun` VALUES(?, ?)", inputValues) featureXML = parseFeatureXML.Reader('../example_scripts/example_files/input/featureXML_example.featureXML') for feature in featureXML.getSimpleFeatureInfo(): inputValues = (featureXML['id'], featureXML['intensity'], featureXML['overallquality'], featureXML['charge'], featureXML['content'], 'example') # insert the values into msrun using ? for sql injection safety cursor.execute("INSERT INTO `feature` VALUES(?,?,?,?,?,?)", inputValues) connection.commit() for feature in featureXML.getSimpleFeatureInfo(): cursor.execute("DELETE FROM `feature` WHERE feature_id = ?", (str(featureXML['id']),))

    Read the article

  • Java method overloading + double dispatch

    - by Max
    Can anybody explain in detail the reason the overloaded method print(Parent parent) is invoked when working with Child instance in my test piece of code? Any pecularities of virtual methods or methods overloading/resolution in Java involved here? Any direct reference to Java Lang Spec? Which term describes this behaviour? Thanks a lot. public class InheritancePlay { public static class Parent { public void doJob(Worker worker) { System.out.println("this is " + this.getClass().getName()); worker.print(this); } } public static class Child extends Parent { } public static class Worker { public void print(Parent parent) { System.out.println("Why this method resolution happens?"); } public void print(Child child) { System.out.println("This is not called"); } } public static void main(String[] args) { Child child = new Child(); Worker worker = new Worker(); child.doJob(worker); } }

    Read the article

  • Cannot set g:checkbox to off for a child on one-to-many relationship

    - by icon911
    Got a weird issue with g:checkbox not being saved when its switched from on to off for a child in one-to-many relationship. For example: class Parent { Boolean enabled static hasMany = [children: Child] static constraints = { enabled(blank: true, nullable: true) } } class Child { Boolean enabled static belongsTo = [parent: Parent] static constraints = { enabled(blank: true, nullable: true) } } Posting to Parent controller true/false values will work for Parent: <g:checkBox name="enabled" value="${parentInstance?.enabled}"/> However, not for Child! When posting to Parent controller I can only go from false to true, trying to change from true to false again will not work: <g:each in="${parentInstance.children}" status="i" var="child"> <g:checkBox name="child[${i}].enabled" value="${child?.enabled}" /> </g:each> That seems to be a bug. Any ideas? Thanks.

    Read the article

  • How to get this.grandparent() functionality in Mootools?

    - by RyOnLife
    I have built a class in Mootools and extended it twice, such that there is a grandparent, parent, and child relationship: var SomeClass1 = new Class({ initialize: function() { // Code }, doSomething: function() { // Code } }); var SomeClass2 = new Class({ Extends: SomeClass1, initialize: function() { this.parent(); }, doSomething: function() { this.parent(); // Some code I don't want to run from Class3 } }); var SomeClass3 = new Class({ Extends: SomeClass2, initialize: function() { this.parent(); }, doSomething: function() { this.grandParent(); } }); From Class3, the child, I need call the doSomething() method from Class1, the grandparent, without executing any code in Class2#doSomething(), the parent. What I need is a grandParent() method to complement the Mootools parent(), but it appears that one does not exist. What's the best way to accomplish this in either Mootools or pure JavaScript? Thanks.

    Read the article

  • Filtering and copying with PowerShell

    - by Bergius
    In my quest to improve my PowerShell skills, here's an example of an ugly solution to a simple problem. Any suggestions how to improve the oneliner are welcome. Mission: trim a huge icon library down to something a bit more manageable. The original directory structure looks like this: /Apps and Utilities /Compile /32 Bit Alpha png /Compile 16 n p.png /+ 10 or more files /+ 5 more formats with 10 or more files each /+ 20 or so icon names /+ 22 more categories I want to copy the 32 Bit Alpha pngs and flatten the directory structure a bit. Here's my quick and very dirty solution: $dest = mkdir c:\icons; gci -r | ? { $_.Name -eq '32 Bit Alph a png' } | % { mkdir ("$dest\" + $_.Parent.Parent.Name + "\" + $_.Parent.Name); $_ } | gci | % { cp $_. FullName -dest ("$dest\" + $_.Directory.Parent.Parent + "\" + $_.Directory.Parent) } Not nice, but it solved my problem. Resulting structure: /Apps and Utilities /Compile /Compile 16 n p.png /etc /etc /etc How would you do it?

    Read the article

  • Retrieving/simulating run-time "layer" functionality in Flash under ActionScript 3.

    - by Triynko
    Are there any AS3 classes to help arrange objects into layers, like in the designer, such that the objects all have the same parent? Obviously, I can use container clips to simulate layers, but I specifically want this kind of functionality for objects that have the same parent. My understanding is that the design-time notion of layers does not exist at run-time, and objects just have a depth index. I'm creating a class to simulate layering functionality with a single parent, but if one already exists, I'd like to check it out. On a side note... how do design-time layer masks manifest themselves at runtime in AS3? I thought maybe all objects on the masked layer share the same mask object, but the "mask" property appears to be null for all objects on the masked layer, even though they share the same parent timeline as the unmasked objects (i.e. unmasked layer object parent == masked layer object parent; therefore, no masked subcontainers appear to be in use).

    Read the article

  • Moving ordered elements and adding arbitrary text in Deliverance

    - by Jon Hadley
    Using the following XPath derived rule, I am able to select a list of events from a Plone site (similar to Plone Community events) and display them in my Deliverance themed site: <replace content="//*[@id='parent-fieldname-title' or @class='explain' or @id='parent-fieldname-location' or @id='parent-fieldname-text']" theme="#center-content-to-replace-one" /> However, two separate, but related, problems now rear their heads. I can't work out how to: Re-order elements within the replaced theme, such as moving images originally held within #parent-fieldname-text to before #parent-fieldname-title Put arbitrary text before elements. Such as 'Page Title:' before #parent-fieldname-title I could do both if I was just dealing with one record, as place holders(1) or text before place holders(2) could be specified in the template - but I can't see a away for that template behaviour to repeat across multiple items in one page. (if that is indeed the solution) Is this a job for pyQuery?

    Read the article

  • Fluent many-to-many: Deleting one end does not remove the entry in the relation table

    - by Kristoffer
    I have two classes (Parent, Child) that have a many-to-many relationship that only one end (Parent) knows about. My problem is that when I delete a "relation unaware" object (Child), the record in the many-to-many table is left. I want the relationship to be removed regardless of which end of it is deleted. How can I do that with Fluent NHibernate mappings, without adding a Parent property on Child? The classes: public class Parent { public Guid Id { get; set; } public IList<Child> Children { get; set; } } public class Child { public Guid Id { get; set; } // Don't want the property below: // public Parent Parent { get; set; } }

    Read the article

  • jquery event namespace bubbling issue

    - by Adrian Adkison
    Hi, I stumbled upon an issue with event namespacing while developing a jQuery plugin. here is the html <div class="parent"> <div class="child"> </div> </div> <a class="btn-a">trigger a</a> <a class="btn-b">trigger b</a> <a class="btn-c">trigger c</a> Here is the jQuery jQuery('#content div.child') .bind('child.a',function(){alert('a-child');}) .bind('child.b',function(){alert('b-child');}) .bind('child.c',function(){alert('c-child');}); jQuery('#content div.parent') .bind('child.b',function(){alert('b-parent');}) .bind('child.c',function(){alert('c-parent');}); jQuery('a.btn-a') .click(function(){ jQuery('#content div.child').trigger('a.a'); }); jQuery('a.btn-b') .click(function(){ jQuery('#content div.child').trigger('a.b'); }); jQuery('a.btn-c') .click(function(){ jQuery('#content div.child').trigger('a.c'); }); In sum, I have attached a namespaced event listener to the child and parent and created three buttons that trigger each of the events(a.a, a.b, a.c). Note the parent is only listening to a.b and a.c. When I click on the button that triggers a.a on the child, only the div.child listener for a.a is fired, but the entire 'a' namespace event bubbles up to div.parent listeners, a.b and a.c, and triggers them. My question is, how would I still use event namespacing but only have the intended event bubble up(i.e. a.a is the only event that fires for both child and parent). I am aware of stopPropagation and stopImmediatePropagation. I would not want to put these on the child a.b and a.c listeners because there are times when i do want them to bubble. For instance when I trigger 'a.b' on the child, I would expect the 'a.b' and only the 'a.b' event to be handled by the child and the parent. Thanks

    Read the article

  • javascript inherance? with Private vars and methods too

    - by Totty
    Hy i need to inherent a class from another. Parent has private var "_data" and private method "_test" and public method "add" Now the child have a public method "add", that uses the private method from the parent "_test" and the private var "_data". How do i do this? var Parent = function(){ var _data = {}; var _test = function(){alert('test')}; this.add = function(){alert('add from parent')} } var Child = function(){ this.add = function(){// here uses the _data and _test from the Parent class alert('add from child') } } // something to inherent Child from Parent // instance Child and use the add method And i think im miss the prototype concept (http://stackoverflow.com/questions/892467/javascript-inheritance)

    Read the article

  • Json to treeview (<ul>)

    - by Pieter
    Hi I get the following data back from my WCF Data Service (I cut out the metadata) { "d" : [ {"CodeId": 6, "Title": "A Child Sub Item", "Parent":}, {"CodeId": 5, "Title": "Another Root Item", "Parent": -1}, {"CodeId": 4, "Title": "Child Item", "Parent": 2}, {"CodeId": 2, "Title": "Root Item", "Parent": -1} ] } I am trying to get this into a <ul> style tree with Parent = -1 as root and then the rest as sub items of their parent id's. Can anyone help me please, preferably in jQuery? I will use this in jstree if someone knows of a better way to do this. Thanks

    Read the article

  • Hibernate - EhCache - Which region to Cache associations/sets/collections ??

    - by lifeisnotfair
    Hi all, I am a newcomer to hibernate. It would be great if someone could comment over the following query that i have: Say i have a parent class and each parent has multiple children. So the mapping file of parent class would be something like: parent.hbm.xml <hibernate-mapping > <class name="org.demo.parent" table="parent" lazy="true"> <cache usage="read-write" region="org.demo.parent"/> <id name="id" column="id" type="integer" length="10"> <generator class="native"> </generator> </id> <property name="name" column="name" type="string" length="50"/> <set name="children" lazy="true"> <cache usage="read-write" region="org.demo.parent.children" /> <key column="parent_id"/> <one-to-many class="org.demo.children"/> </set> </class> </hibernate-mapping> children.hbm.xml <hibernate-mapping > <class name="org.demo.children" table="children" lazy="true"> <cache usage="read-write" region="org.demo.children"/> <id name="id" column="id" type="integer" length="10"> <generator class="native"> </generator> </id> <property name="name" column="name" type="string" length="50"/> <many-to-one name="parent_id" column="parent_id" type="integer" length="10" not-null="true"/> </class> </hibernate-mapping> So for the set children, should we specify the region org.demo.parent.children where it should cache the association or should we use the cache region of org.demo.children where the children would be getting cached. I am using EHCache as the 2nd level cache provider. I tried to search for the answer to this question but couldnt find any answer in this direction. It makes more sense to use org.demo.children but I dont know in which scenarios one should use a separate cache region for associations/sets/collections as in the above case. Kindly provide your inputs also let me know if I am not clear in my question. Thanks all.

    Read the article

  • how to use listctrl in notebook wxPython

    - by ???
    I have one question.. wxPython listctrl in notebook I created 2 tab use notebook. I added button in first tab and added Listctrl in second tab. If i click the button, Add value in Listctrl to second tab. how to solve this problem? import wx class PageOne(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) self.query_find_btn = wx.Button(self, 4, "BTN", (40,40)) self.Bind(wx.EVT_BUTTON, self.AddList, id = 4) def AddList(self, evt): self.list1.InsertStringItem(0,'Hello') class PageTwo(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) self.list1 = wx.ListCtrl(self,-1,wx.Point(0,0),wx.Size(400,400),style=wx.LC_REPORT | wx.SUNKEN_BORDER) self.list1.InsertColumn(0,'values') class MyFrame(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self,parent,id,title,size=(400,400),pos=wx.Point(100,100), style=wx.SYSTEM_MENU |wx.CAPTION ) p = wx.Panel(self) nb = wx.Notebook(p) MainFrame = PageOne(nb) SecondFrame = PageTwo(nb) nb.AddPage(MainFrame, "One") nb.AddPage(SecondFrame, "Two") sizer = wx.BoxSizer() sizer.Add(nb, 1, wx.EXPAND) p.SetSizer(sizer) class MyApp(wx.App): def OnInit(self): self.frame=MyFrame(None,-1,'Unknown.py') self.frame.Centre() self.frame.Show() return True if __name__ == '__main__': app = MyApp(False) app.MainLoop()

    Read the article

  • Confusing calling method in Java

    - by vBx
    class Parent { private void method1() { System.out.println("Parent's method1()"); } public void method2() { System.out.println("Parent's method2()"); method1(); } } class Child extends Parent { public void method1() { System.out.println("Child's method1()"); } } class test { public static void main(String args[]) { Parent p = new Child(); p.method2(); } } I'm confuse why does in Parent::method2() when invoking method1() it will cal Parents method1() and not Childs method1 ? I see that this happens only when method1() is private? Can someone explain me why ? Thanks you.

    Read the article

  • is it possible to add DataRelation to DataSet if child table contains rows that have no parent in pa

    - by matti
    If I fill the DataSet with DataAdapters that select all rows from Orders and Customers and call: private void CreateRelation() { // Get the DataColumn objects from two DataTable objects // in a DataSet. Code to get the DataSet not shown here. DataColumn parentColumn = DataSet1.Tables["Customers"].Columns["CustID"]; DataColumn childColumn = DataSet1.Tables["Orders"].Columns["CustID"]; // Create DataRelation. DataRelation relCustOrder; relCustOrder = new DataRelation("CustomersOrders", parentColumn, childColumn); // Add the relation to the DataSet. DataSet1.Relations.Add(relCustOrder); } (from http://msdn.microsoft.com/en-us/library/system.data.datarelation.aspx) there will be a runtime error if there is orders that do not have customers. This might happen when a buggy program has not deleted customer's orders when customer was deleted. What can I do except put Orders select string a additional where-condition: CUSTID IN (SELECT DISTINCT CUSTID FROM CUSTOMERS) OR: is it really that way (that all children have to have parents)? My code might have a bug also. The exception occurs when IN MY CODE I add the relation to filled DataSet. The exception is: An unhandled exception of type 'System.ArgumentException' occurred in System.Data.dll Additional information: This constraint cannot be enabled as not all values have corresponding parent values. Thanks & Best Regards - Matti

    Read the article

  • get parent elements in xml with simplexml in php?

    - by fayer
    with $element->children() i cant get all the child elements of current element. but how can i get all the parent elements for current element with simplexml? lets say it looks like this: <entity id=1> <name>apple</name> <entities> <entity id=2> <name>mac</name> <entities> <entity id=3> <name>safari</name> </entity> </entities> </entity> </entities> </entity> if my current $element is id=3, i want to get the mac and apple entity ids. is this possible with simplexml cause i cant find any function allowing me to do this?

    Read the article

  • What is the Best way to databind an ASP.NET TreeView for table with many to many parent child relati

    - by Matt W
    I've got a table which has the usual ParentID, ChildID as it's first two columns in a self-referencing tree data structure. My issue is that when I pull this out and use the following code: DataSet set = DA.GetNewCategories(); set.Relations.Add( new DataRelation("parentChildCategories", set.Tables[0].Columns["CategoryParentID"], set.Tables[0].Columns["CategoryID"]) ); StringBuilder buildXml = new StringBuilder(); StringWriter writer = new StringWriter(buildXml); set.WriteXml(writer); TreeView2.DataSource = new HierarchicalDataSet(set, "CategoryID", "CategoryParentID"); TreeView2.DataBind(); I get the error: These columns don't currently have unique values I believe this is because my data has children with multiple parent nodes. This is fine for my application - I don't mind if one row of data is rendered in multiple nodes of my TreeView. Could someone shed light on this please? It doesn't seem unreasonable to have a DataSet render XML which has nodes appearing in multiple places, but I can't figure out how to do it. Thanks, Matt.

    Read the article

  • jQuery - Not sure which method to use, closest() and parent() don't work.

    - by Nike
    Hello, again. :) God i feel like i'm spamming stackoverflow, this is my 3rd post for today. Sorry, heh. I even posted a question regarding this before, kind of, but i've changed the code a bit since so i thought it was better to post a new question. $('.pmlist ul li h4 .toggle').click(function() { $(this).closest('.meddel').toggle(250); }); That's what i've got now. The reason why the closest() method isn't working is because the div .meddel is just next to the h4 element. And closest() only crawls right up the DOM tree, ignoring other child elements. Right? parent() works almost the same and doesn't work either. And as i only want to toggle the closest .meddel div in the element, i need something that, yeah justs grabs the nearest one, and not all of them. To clear it up a bit, here's the HTML for one list item: <li class="item"> <h4><a class="toggle">ämne</a><small>2010-04-17 kl 12:54 by <u>nike1</u></small></h4> <div class="meddel"> <span> <img style="max-width: 70%; min-height: 70%;" src="profile-images/nike1.jpg" alt="" /> <a href="account.php?usr=47">nike1</a> </span> <p>text</p> </div> </li> I have several items like that, and if i click one toggle link, i just want the nearest .meddel to be toggled, as mentioned before. Thanks. -Nike

    Read the article

  • How do I keep child elements together with parent jQuery sortable.

    - by unknowndomain
    I have a list of items like this... <ol> <li> <span></span> <img src="image.png" /> <p>Image Caption</p> </li> </ol> And I want to be able to sort the LI's but not the sub elements, they should just move with their parent. I am using the jQuery to do that... $('ol li').sortable({ 'cursor': 'move' }); And its working but not moving the whole lot just the element you clicked i.e. the <p>, <img> or <span> I can't figure out how to solve this so I looked about and found an option called 'items': '> li' which was recommended but upon using this nothing drags any more but using firebug + jquery plugin I can see there is a sortable on the <li> still. Not sure what to do, example here: http://clareshilland.unknowndomain.co.uk/ Press ctrl+l to login. Enter the login details: Username: clarePassword: demo Select 'edit' from under then 'image' portion of the menu. The sortables should be those polaroids. Thanks in advance, another one I've been banging my head on the table with.

    Read the article

  • How to scroll the horizontal scrollbar in an iFrame from the parent frame?

    - by Mohammad
    Is there any cross browser way to scroll the horizontal scroll bar of an IFrame with super wide content with Javascript inside the parent frame. Also I need it to be attached to the mouse wheel event. This is what I have so far, it's a bit copy and paste at the moment and doesn't work unfortunately. //var myIframe = document.getElementById('iframeWithWideContent'); //myIframe.onload = function (myIframe) { var mouseWheelEvt = function (e){ var event = e || window.event; if (document.body.doScroll){ document.body.doScroll(event.wheelDelta>0?"left":"right"); }else if ((event.wheelDelta || event.detail) > 0){ document.body.scrollLeft -= 10; }else{ document.body.scrollLeft += 10; } return false; } if ("onmousewheel" in document.body){ document.body.onmousewheel = mouseWheelEvt; }else{ document.body.addEventListener("DOMMouseScroll", mouseWheelEvt); } //}? I probably should uncomment that code, replace document.body with myIframe though I wouldn't know what I'm doing wrong. Demo on JSBIN link fixed Any help from you JavaScript Lords would be very appreciated. Thank you!

    Read the article

  • CSS Layout-- Make table cell contents appear in row below and set height of parent row/cell

    - by Laramie
    I am modifying a skin for the CKEdit component so that the toolbar is hidden unless clicked. To do so, I moved the toolbar collapser to the row below it using position: relative and top:18px. My goal is to have the parent tr of the anchor element a height of 2px, but keep the anchor at 11px. Is this possible? I cannot alter the DOM, just the styles. Here's my reduced code <style type="text/css"> table { width: 80px;} td { border: solid 1px #ccc; } .header { background-color: #99f; /* This is being ignored */ height:2px; } .below { float: right; position: relative; top: 18px; /*If I shrink, the BG image goes Away*/ height: 11px; width: 11px; background-image: url('http://ckeditor.com/apps/ckeditor/3.3/skins/kama/images/sprites.png'); background-position: 4px -1387px; border: 1px outset #D3D3D3; } .hidden { display:none; } </style> <table> <tr><td class="header"><a class="below"><span class="hidden">#</span></a></td></tr> <tr><td>next row</td></tr> </table>

    Read the article

  • Javascript: Check if checkboxes are selected on page load and add a class to parent html li

    - by BoDiE2003
    Im looking a way to do it with prototype, this js, needs to loads with the page and interate over all the elements (inputs - checkboxes, in this case) with the given id and assign a class to its parent <li></li> The JS is: function changeSelectionStyle(id) { var inputId = id.substr(0,id.length-2); if(document.getElementById(inputId).checked){document.getElementById(id).className = 'yes';} alert(document.getElementById(inputId).checked); /* * if(document.getElementById(id).className != 'yes'){ * document.getElementById(id).className = 'yes'; * } else{document.getElementById(id).className = '';} */ } And the HTML (piece of it) that interacts with this JS is: <li id="selectedAuthorities-4_1li"> <input type="checkbox" id="selectedAuthorities-4_1" name="selectedAuthorities" value="ROLE_ADD_COMMENT_TO_CV" checked="checked" onclick="changeSelectionStyle(this.id + 'li'); checkFatherSelection(this.id);"> <a href="#" onclick="document.getElementById('selectedAuthorities-4_1').click(); return false;"> Agregar comentario <samp><b></b>Permite agregar comentario en el detalle</samp> </a> </li> After iteration, checking is the checkbox is checked, it has to add the class="yes" to the <li id="selectedAuthorities-4_1li">

    Read the article

  • In this example, would Customer or AccountInfo properly be the entity group parent?

    - by Badhu Seral
    In this example, the Google App Engine documentation makes the Customer the entity group parent of the AccountInfo entity. Wouldn't AccountInfo encapsulate Customer rather than the other way around? Normally I would think of an AccountInfo class as including all of the information about the Customer. import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.KeyFactory; @PersistenceCapable public class AccountInfo { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; public void setKey(Key key) { this.key = key; } } // ... KeyFactory.Builder keyBuilder = new KeyFactory.Builder(Customer.class.getSimpleName(), "custid985135"); keyBuilder.addChild(AccountInfo.class.getSimpleName(), "acctidX142516"); Key key = keyBuilder.getKey(); AccountInfo acct = new AccountInfo(); acct.setKey(key); pm.makePersistent(acct);

    Read the article

  • Migrating from a single entity to an abstract parent entity with child entities, NSEntityMigrationPolicy not called.

    - by Jimmy Selgen Nielsen
    Hi. I'm trying to upgrade my current application to use an abstract parent entity, with specialized sub entities. I've created a custom NSEntityMigrationPolicy, and in the mapping model I've set the Custom Policy to the name of my class. I'm initializing my persistent store like this, which should be fairly standard : NSError *error=nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: [self managedObjectModel]]; NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, nil]; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&error]) { NSLog(@"Error adding persistent store : %@",[error description]); NSAssert(error==nil,[error localizedDescription]); } When i run the app i get the following error : Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The operation couldn’t be completed. (Cocoa error 134140.)' [error userInfo] contains "reason=Can't find mapping model for migration" I've verified that version 1 of the data model will open, and if i set NSInferMappingModelAutomaticallyOption i get a migration, although my entities are not migrated correctly (as expected). I've verified that the mapping model (cdm) is in the application bundle, but somehow it refuses to find it. I've also set breakpoints and NSLog() statements in the custom migration policy, and none of it runs, with or without NSInferMappingModelAutomaticallyOption Any hints as to why it seems unable to find the mapping model ?

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >