Search Results

Search found 33969 results on 1359 pages for 'custom view'.

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

  • iPhone Using a Modal View from a TabBar View

    - by mbarron
    Using a Modal View from a TabBar View I always get the following error: Error from Debugger: Previous Frame identical to this frame (gdb could not unwind past this frame) I have an App using a TabBar. From one of the TabViews I need to display a View modally. I try: if(self.gmailController == nil) { self.gmailController = [[GMailViewController alloc] initWithNibName:@"GMailView" bundle:nil]; } [[self.navigationController] presentModalViewController:gmailController animated:YES]; //////// And I have tried: [self.parentViewController presentModalViewController:gmailController animated:YES]; and [self.tabBarController presentModalViewController:gmailController animated:YES]; and [self presentModalViewController:gmailController animated:YES]; Thanks for reading! Any comments welcome. Mark

    Read the article

  • Should custom data elements be stored as XML or database entries?

    - by meteorainer
    There are a ton of questions like this, but they are mostly very generalized, so I'd like to get some views on my specific usage. General: I'm building a new project on my own in Django. It's focus will be on small businesses. I'd like to make it somewhat customizble for my clients so they can add to their customer/invoice/employee/whatever items. My models would reflect boilerplate items that all ModelX might have. For example: first name last name email address ... Then my user's would be able to add fields for whatever data they might like. I'm still in design phase and am building this myself, so I've got some options. Working on... Right now the 'extra items' models have a FK to the generic model (Customer and CustomerDataPoints for example). All values in the extra data points are stored as char and will be coerced/parced into their actual format at view building. In this build the user could theoretically add whatever values they want, group them in sets and generally access them at will from the views relavent to that model. Pros: Low storage overhead, very extensible, searchable Cons: More sql joins My other option is to use some type of markup, or key-value pairing stored directly onto the boilerplate models. This coul essentially just be any low-overhead method weather XML or literal strings. The view and form generated from the stored data would be taking control of validation and reoganizing on updates. Then it would just dump the data back in as a char/blob/whatever. Something like: <datapoint type='char' value='something' required='true' /> <datapoint type='date' value='01/01/2001' required='false' /> ... Pros: No joins needed, Updates for validation and views are decoupled from data Cons: Much higher storage overhead, limited capacity to search on extra content So my question is: If you didn't live in the contraints impose by your company what method would you use? Why? What benefits or pitfalls do you see down the road for me as a small business trying to help other small businesses? Just to clarify, I am not asking about custom UI elements, those I can handle with forms and template snippets. I'm asking primarily about data storage and retreival of non standardized data relative to a boilerplate model.

    Read the article

  • WCF RIA Services Custom Type with Collection of Custom Types

    - by Blakewell
    Is it possible to have a custom type within a custom type and have the result returned via WCF RIA services? I have the following two classes below, but I can't gain access to the Verticies property within the Polygon class. I assume it is because it is a custom class, or something to do with it being a List collection. Polygon Class public class Polygon { public Polygon() { _vertices = new List<Location>(); } private int _id; [Key] public int Id { get; set; } private List<Location> _vertices; public List<Location> Vertices { get { return _vertices; } set { _vertices = value; } } } Location Class public class Location { public Location() { } /// <summary> /// Default constructor for creating a Location object /// </summary> /// <param name="latitude"></param> /// <param name="longitude"></param> public Location( double latitude, double longitude ) { _latitude = latitude; _longitude = longitude; } private int _id; [Key] public int Id { get { return _id; } set { _id = value; } } private double _latitude; /// <summary> /// Latitude coordinate of the location /// </summary> public double Latitude { get { return _latitude; } set { _latitude = value; } } private double _longitude; /// <summary> /// Longitude coordiante of the location /// </summary> public double Longitude { get { return _longitude; } set { _longitude = value; } } }

    Read the article

  • Magento: Attribute always returns default value in catalog view, works fine in product view

    - by colinodell
    I've created a new Yes/No attribute for products. I've extended the Product model to do some custom logic and the custom functions are working everywhere. When I initially tried getting the custom attribute value, I ran into some issue. Magento wasn't loading it for me, so calls to $product-getMyAttributeName() did nothing. In the product views, I got it working with this additional function: public function getAttrVal($attr_name) { return $this->getResource()->getAttribute($attr_name)->getFrontend()->getValue($this); } So that worked great when viewing a product on the frontend. It would fetch the assigned value if set, or the default if not. When I view any Category (grid of all products in that category), the same exact code is being executed. But my getAttrVal() function always returns the default value, even if I've explicitly set this value for my product. I can't, for the life of me, figure out why the attribute loads correctly in the Product view but the Category view always grabs the default value, despite running the same exact code. Any thoughts?

    Read the article

  • MVC - Ajax form - return partial view doesnt update in <div> target

    - by Jack
    I have an index view that I want to update automatically as the user types in a client id. I got something similiar to work (only it was updating just a label) - but this will not work. What happens is the partial is just rendered by itself (not in place of the UpdateTargetID). So the data is rendered on a new page. Here is my code: Controller: public ActionResult ClientList(string queryText) { var clients = CR.GetClientLike(queryText); return PartialView("ClientIndex", clients); } Partial View: <table> <thead> <tr> <td>Client ID</td> <td>Phone1</td> <td>Phone2</td> <td>Phone3</td> <td>Phone4</td> </tr> </thead> <tbody> <% if (Model != null) { foreach (Client c in Model) { %> <tr> <td><%= Html.Encode(c.ClientID)%></td> <td><%= Html.Encode(c.WorkPhone)%></td> <td><%= Html.Encode(c.WorkPhone1)%></td> <td><%= Html.Encode(c.WorkPhone2)%></td> <td><%= Html.Encode(c.WorkPhone3)%></td> </tr> <% } } %> </tbody> Main View: Insert code messed up, so this is just copy/pasted: $(function() { $("#queryText").keyup(function() { $('#sForm').submit(); }); }); <% using (Ajax.BeginForm("ClientList", /* new { queryText = Form.Controls[2] ?? }*/"", new AjaxOptions { UpdateTargetId = "status", InsertionMode = InsertionMode.Replace }, new { @id = "sForm" })) { % <% } % <div id="status" class="status" name="status"> <%--<% Html.RenderPartial("ClientIndex", ViewData["clients"]); %> Should this be here???? --%> </div>

    Read the article

  • jqGrid multi-checkbox custom edittype solution

    - by gsiler
    For those of you trying to understand jqGrid custom edit types ... I created a multi-checkbox form element, and thought I'd share. This was built using version 3.6.4. If anyone has a more efficient solution, please pass it on. Within the colModel, the appropriate edit fields look like this: edittype:'custom' editoptions:{ custom_element:MultiCheckElem, custom_value:MultiCheckVal, list:'Check1,Check2,Check3,Check4' } Here are the javascript functions (BTW, It also works – with some modifications – when the list of checkboxes is in a DIV block): //———————————————————— // Description: // MultiCheckElem is the "custom_element" function that builds the custom multiple check box input // element. From what I have gathered, jqGrid calls this the first time the form is launched. After // that, only the "custom_value" function is called. // // The full list of checkboxes is in the jqGrid "editoptions" section "list" tag (in the options // parameter). //———————————————————— function MultiCheckElem( value, options ) { //———- // for each checkbox in the list // build the input element // set the initial "checked" status // endfor //———- var ctl = ''; var ckboxAry = options.list.split(','); for ( var i in ckboxAry ) { var item = ckboxAry[i]; ctl += '<input type="checkbox" '; if ( value.indexOf(item + '|') != -1 ) ctl += 'checked="checked" '; ctl += 'value="' + item + '"> ' + item + '</input><br />&nbsp;'; } ctl = ctl.replace( /<br />&nbsp;$/, '' ); return ctl; } //———————————————————— // Description: // MultiCheckVal is the "custom_value" function for the custom multiple check box input element. It // appears that jqGrid invokes this function the first time the form is submitted and, the rest of // the time, when the form is launched (action = set) and when it is submitted (action = 'get'). //———————————————————— function MultiCheckVal(elem, action, val) { var items = ''; if (action == 'get') // the form has been submitted { //———- // for each input element // if it's checked, add it to the list of items // endfor //———- for (var i in elem) { if (elem[i].tagName == 'INPUT' && elem[i].checked ) items += elem[i].value + ','; } // items contains a comma delimited list that is returned as the result of the element items = items.replace(/,$/, ''); } else // the form is launched { //———- // for each input element // based on the input value, set the checked status // endfor //———- for (var i in elem) { if (elem[i].tagName == 'INPUT') { if (val.indexOf(elem[i].value + '|') == -1) elem[i].checked = false; else elem[i].checked = true; } } // endfor } return items; }

    Read the article

  • How to Set Opacity (Alpha) for View in Android

    - by ncakmak
    I have a button as in the following: <Button android:text="Submit" android:id="@+id/Button01" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button> In my onCreate event, I am calling Button01 like this: setContentView(R.layout.main); View Button01 = this.findViewById(R.id.Button01); Button01.setOnClickListener(this); There is a background in the application, and I want to set an opacity on this submit button. How can I set an opacity for this view? Is it something that I can set on the java side, or can I set in the main.xml file? On the java side I tried Button01.mutate().SetAlpha(100), but it gave me an error. Thank you.

    Read the article

  • Spark-View-Engine with ASP.NET MVC2

    - by Ben
    How do you modify a ASP.NET MVC 2.0 project to work with the Spark View Engine? I tried like described here: http://dotnetslackers.com/articles/aspnet/installing-the-spark-view-engine-into-asp-net-mvc-2-preview-2.aspx But somehow it still tries to route to .aspx files. Here the code of my global.asax: public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } protected void Application_Start() { SparkViewFactory svf = new SparkViewFactory(); PrecompileViews(svf); AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); } public static void PrecompileViews(SparkViewFactory svf) { var controllerFactory = svf; var viewFactory = new SparkViewFactory(controllerFactory.Settings); var batch = new SparkBatchDescriptor(); batch .For<HomeController>() .For<AccountController>(); viewFactory.Precompile(batch); } } }

    Read the article

  • ASP.NET MVC Strongly Typed Partial View, gives could not load type error

    - by Matt
    I am attempting to create a strongly typed view with a "MVC View User Control" that is being rendered using Html.RenderPartial(). The top of my ascx file looks like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>" %> There is nothing else on this page, currently. When I execute the app and load the page that renders this control, I get the following error: Could not load type 'System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>'. So, then I simplified it: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<String>" %> And then, just in case it needed to be fully qualified: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.String>" %> Everytime I get the same error (substituting type). what am I doing wrong here? I'm on .NET 3.5 with ASP.NET MVC 1.0 RTM.

    Read the article

  • Outlook 2003 View Control with C#

    - by Eleasar
    I want to embed a custom c# windows form (or WPF) user control into an outlook view. I am using Outlook 2003 and Visual Studio 2008. I did download an example for Outlook 2007 here: http://blogs.msdn.com/e2eblog/archive/2008/01/09/outlook-folder-homepage-hosting-wpf-activex-and-windows-forms-controls.aspx and also here: http://msdn.microsoft.com/en-us/library/aa479345.aspx I tested it and under 2007 it is working, but for 2003 i am getting the following error when i want to open the view: Could not complete the operation due to error 80131509 I can start it from Visual Studio, it is registering the folder just fine, debugging works and all that. It creates an HTML page that contains my type as an object parameter - but the Initialize method that should be called is either not present (not shown via JS) or it has some errors. The breakpoints for RegisterSafeForScripting are also never hit - maybe related to that. Thx in advance!

    Read the article

  • weblogic 10.3 custom authenticator

    - by hbagchi
    we are migrating weblogic from 8.1 to 10.3. We had custom authenticator provider. Is there any standard way to migrate custom authenticator from 8.1 to 10.3? In fact, I could not find the wlManagement.jar in 10.3. I did find a wlManagement.jar file but it only contains .java files, no .class files. Please advise.

    Read the article

  • Custom Control Not Playing Nice With PropertyGrid

    - by lumberjack4
    I have a class that is implementing a custom ToolStripItem. Everything seems to work great until I try to add the item to a ContextMenuStrip at design time. If I try to add my custom control straight from the ContextMenuStrip the PropertyGrid freezes up and will not let me modify my Checked or Text properties. But if I go into the ContextMenuStrip PropertyGrid and add my custom control through the Items(...) property, I can modify the custom control just fine within that dialog. I'm not sure if I'm missing an attribute somewhere of if its a problem with the underlying code. Here is a copy of the CustomToolStripItem class. As you can see, its a very simple class. [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ContextMenuStrip)] public class CustomToolStripItem : ToolStripControlHost { #region Public Properties [Description("Gets or sets a value indicating whether the object is in the checked state")] [ReadOnly(false)] public bool Checked { get { return checkBox.Checked; } set { checkBox.Checked = value; } } [Description("Gets or sets the object's text")] [ReadOnly(false)] public override string Text { get { return checkBox.Text; } set { checkBox.Text = value; } } #endregion Public Properties #region Public Events public event EventHandler CheckedChanged; #endregion Public Events #region Constructors public CustomToolStripItem() : base(new FlowLayoutPanel()) { // Setup the FlowLayoutPanel. controlPanel = (FlowLayoutPanel)base.Control; controlPanel.BackColor = Color.Transparent; // Add the child controls. checkBox.AutoSize = true; controlPanel.Controls.Add(checkBox); ContextMenuStrip strip = new ContextMenuStrip(); } #endregion Constructors #region Protected Methods protected override void OnSubscribeControlEvents(Control control) { base.OnSubscribeControlEvents(control); checkBox.CheckedChanged += new EventHandler(CheckChanged); } protected override void OnUnsubscribeControlEvents(Control control) { base.OnUnsubscribeControlEvents(control); checkBox.CheckedChanged -= new EventHandler(CheckChanged); } #endregion Protected Methods #region Private Methods private void CheckChanged(object sender, EventArgs e) { // Throw the CustomToolStripItem's CheckedChanged event EventHandler handler = CheckedChanged; if (handler != null) { handler(sender, e); } } #endregion Private Methods #region Private Fields private FlowLayoutPanel controlPanel; private CheckBox checkBox = new CheckBox(); #endregion Private Fields }

    Read the article

  • Flex - Custom Component - Percentage Width/Height

    - by Hamish
    I am trying to create a Custom Flex Component using the Flex Component framework: http://www.adobe.com/livedocs/flex/3/html/help.html?content=ascomponents_advanced_3.html. All good components allow you to define their dimensions using percentage values using: MXML: TextInput width="100%" or Actionscript at runtime: textinp.percentWidth = 100; My question is how do you implement percentage width/height in the measure() method of your custom component? More specifically, these percentages are converted to pixels values at some stage, how is this done?

    Read the article

  • Push/Present Modal View Controller

    - by Yakattak
    I have a table in my view controller (let's call it TVC1). I have rows in TVC1 that are used so the user can input some more data in addition to the data on TVC1. So, when someone taps a specific row in TVC1, it will show another view controller (let's call it TVC2). However, when TVC2 is shown, all of the data in TVC1 is cleared. How can I save the data in TVC1? Should I do it through the app delegate? DescriptionInputViewController *descriptionController = [[DescriptionInputViewController alloc] initWithNibName:@"DescriptionInputView" bundle:nil]; [self presentModalViewController:navController animated:YES]; [self.navigationController pushViewController:descriptionController animated:YES]; [descriptionController release];

    Read the article

  • Select query 2-3 times faster than view

    - by Richard Knop
    This query run alone: SELECT -- lots of columns FROM (((((((((((`table1` `t1` LEFT JOIN `table2` `t2` ON(( `t2`.`userid` = `t1`.`userid` ))) LEFT JOIN `table3` `t3` ON(( `t1`.`orderid` = `t3`.`orderid` ))) LEFT JOIN `table4` `t4` ON(( `t4`.`orderitemlicenseid` = `t3`.`orderitemlicenseid` ))) LEFT JOIN `table5` `t5` ON(( `t1`.`orderid` = `t5`.`orderid` ))) LEFT JOIN `table6` `t6` ON(( `t5`.`transactionid` = `t6`.`transactionid` ))) LEFT JOIN `table7` `t7` ON(( `t7`.`transactionid` = `t5`.`transactionid` ))) LEFT JOIN `table8` `t8` ON(( `t8`.`voucherid` = `t7`.`voucherid` ))) LEFT JOIN `table9` `t9` ON(( `t8`.`voucherid` = `t9`.`voucherid` ))) LEFT JOIN `table10` `t10` ON(( ( `t10`.`vouchergroupid` = `t9`.`vouchergroupid` ) AND ( `t2`.`territoryid` = `t10`.`territoryid` ) ))) LEFT JOIN `table11` `t11` ON(( `t11`.`voucherid` = `t8`.`voucherid` ))) LEFT JOIN `table12` `t12` ON(( `t12`.`orderid` = `t1`.`orderid` ))) GROUP BY `t5`.`transactionid` Takes about 2.5 seconds to finish. When I save it to a view and run it as: SELECT * FROM viewName; It takes 7 seconds to finish. What is the reason and how can I make the view faster?

    Read the article

  • How to add a view helper directory (zend framework)

    - by Cédric Girard
    Hi, I begin with ZF (1.9.7), and I want to use View Helpers from a library shared between all my projects. But I can't find how to add it directory to the helpers path. My herpers works fines when I put them in application's helpers path. Here is the error, where I find the path to ZF helpers, and path to the applications ones. object(ArrayObject)#71 (3) { ["exception"]=> object(Zend_Loader_PluginLoader_Exception)#70 (6) { ["message:protected"]=> string(151) "Plugin by name 'Voo' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/;C:/ZendStd/www/applis/VOO4_PROJECTX/views\helpers/" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(89) "C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Loader\PluginLoader.php" ["line:protected"]=> int(401) Best regards Cédric

    Read the article

  • Magento loadByAttribute for Custom Category Attributes

    - by Chris
    I have created custom attributes for a category in my module's install script like so: $attrib = array( 'type' => 'varchar', 'group' => 'My Data', 'backend' => '', 'frontend' => '', 'label' => 'My Custom Field', 'input' => 'text', 'class' => '', 'source' => '', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'visible' => true, 'required' => false, 'user_defined' => false, 'default' => '', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'unique' => true, ); $installer->addAttribute(3, 'custom_field', $attrib); The field shows up fine in the admin, and when I create the category in my script like so: $p_category = Mage::getModel('catalog/category') ->setStoreId(0) ->load(2); $category = Mage::getModel('catalog/category'); $category->setStoreId(0) ->setName('Test Category') ->setCustomField('abcd') ->setDisplayMode('PRODUCTS') ->setAttributeSetId($category->getDefaultAttributeSetId()) ->setIsActive(1) ->setIsAnchor(1) ->setPath(implode('/',$p_category->getPathIds())) ->setInitialSetupFlag(true) ->save(); I can see the value 'abcd' in the Magneto admin interface. But when I call the code below: <?php $category = Mage::getModel('catalog/category')->loadByAttribute('custom_field', 'abcd'); print_r($category); ?> I get no result. But if I loadByAttribute using the 'name' field set to 'Test Category', I DO get a result. So, in the database, I looked into the catalog_category_entity_varchar table and noticed that the 'name' attribute had an entry for both store_id = 0 AND store_id = 1 whereas the 'custom_field' attribute had only an entry for store_id = 1. When I added a store_id = 0 entry for 'custom_field' with the value set to 'abcd' in the catalog_category_entity_varchar table, loadByAttribute got the expected result. My question is, why is the 'name' field getting a store_id = 0 entry in catalog_category_entity_varchar and my custom field is not? How do I load categories by custom attributes?

    Read the article

  • Loop through all subclasses in an Android view?

    - by Slapout
    I’m working on a game for Android. To help implement it, my idea is to create a subclass of a view. I would then insert several instances of this class as children of the main view. Each instance would handle detecting when it was pressed (via OnTouchListener). The problem I’m having now is how do I loop through all these sub-views so I can read their statuses and process them? (I.e. when they all reach a certain state something should happen). Or is there a better way to have several objects on the screen that respond to touch and whose status I can check?

    Read the article

  • SQL Server view: how to add missing rows using interpolation

    - by Christopher Klein
    Running into a problem. I have a table defined to hold the values of the daily treasury yield curve. It's a pretty simple table used for historical lookup of values. There are notibly some gaps in the table on year 4, 6, 8, 9, 11-19 and 21-29. The formula is pretty simple in that to calculate year 4 it's 0.5*Year3Value + 0.5*Year5Value. The problem is how can I write a VIEW that can return the missing years? I could probably do it in a stored procedure but the end result needs to be a view.

    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

  • Design view not working in Web Projects in Visual Studio 2008

    - by HenryHey
    When I try to edit an ASPX file with the Design View it freezes for a moment and does nothing, not even an error message. Looking through menus I've seen some strange things: If I go to Tools-Options-HTML Designer it gives me no options on the right panel, just a "Error loading property page" message. When I try to open a file using "Open With..." there should be something like "Web Form - Editor", but it is missing and I can only open them using Code View. I've tried repairing Visual Studio and reinstalling WebDesignerCore, but nothing works. Anyone had the same problem?

    Read the article

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