Search Results

Search found 256 results on 11 pages for 'programmatic'.

Page 1/11 | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • How can I animate between states in a programmatic skin? [FLEX]

    - by Lewis
    I have a button with the various states (up/over/down etc) that uses a skin file to render the display. I want to achieve animation between the states. For instance, between the change from 'up' to 'over' I want to fade in a color and a border. The way I am doing this at the moment is to use viewstates and animate between them using transitions and the mx:AnimateProperty. However, using this method I can only animate one property per viewstate. So only the border, or the color can be animated. Does anyone know how I can achieve multiple animations on multiple properties of a programmatic button skin? Thanks in advance! Note: I have looked into using tweener but cannot see how it would help my situation

    Read the article

  • Fast programmatic compare of "timetable" data

    - by Brendan Green
    Consider train timetable data, where each service (or "run") has a data structure as such: public class TimeTable { public int Id {get;set;} public List<Run> Runs {get;set;} } public class Run { public List<Stop> Stops {get;set;} public int RunId {get;set;} } public class Stop { public int StationId {get;set;} public TimeSpan? StopTime {get;set;} public bool IsStop {get;set;} } We have a list of runs that operate against a particular line (the TimeTable class). Further, whilst we have a set collection of stations that are on a line, not all runs stop at all stations (that is, IsStop would be false, and StopTime would be null). Now, imagine that we have received the initial timetable, processed it, and loaded it into the above data structure. Once the initial load is complete, it is persisted into a database - the data structure is used only to load the timetable from its source and to persist it to the database. We are now receiving an updated timetable. The updated timetable may or may not have any changes to it - we don't know and are not told whether any changes are present. What I would like to do is perform a compare for each run in an efficient manner. I don't want to simply replace each run. Instead, I want to have a background task that runs periodically that downloads the updated timetable dataset, and then compares it to the current timetable. If differences are found, some action (not relevant to the question) will take place. I was initially thinking of some sort of checksum process, where I could, for example, load both runs (that is, the one from the new timetable received and the one that has been persisted to the database) into the data structure and then add up all the hour components of the StopTime, and all the minute components of the StopTime and compare the results (i.e. both the sum of Hours and sum of Minutes would be the same, and differences introduced if a stop time is changed, a stop deleted or a new stop added). Would that be a valid way to check for differences, or is there a better way to approach this problem? I can see a problem that, for example, one stop is changed to be 2 minutes earlier, and another changed to be 2 minutes later would have a net zero change. Or am I over thinking this, and would it just be simpler to brute check all stops to ensure that The updated run stops at the same stations; and Each stop is at the same time

    Read the article

  • Programmatic removing Exit Popup from Page? [closed]

    - by Jose Garcia
    I have a page A which has exit popup. I want it to be show on Page B. I used iframe for displaying page A on B. Edit:Page A is having a Exit Popup which i dont want in Page 2. But Page A is having annoying popup. Assuming i can't edit Code of Page A. Can i just make some code in my page B . To remove Exit Popup? Please provide me with sample code. I would prefer it to run on My Lamp Shared hosting. I can use anything in place of Iframe if need be. Thanks.

    Read the article

  • Web Services Example - Part 2: Programmatic

    - by Denis T
    In this edition of the ADF Mobile blog we'll tackle part 2 of our Web Service examples.  In this posting we'll take a look at using a SOAP Web Service but calling it programmatically in code and parsing the return into a bean. Getting the sample code: Just click here to download a zip of the entire project.  You can unzip it and load it into JDeveloper and deploy it either to iOS or Android.  Please follow the previous blog posts if you need help getting JDeveloper or ADF Mobile installed.  Note: This is a different workspace than WS-Part1 Defining our Web Service: Just like our first installment, we are using the same public weather forecast web service provided free by CDYNE Corporation.  Sometimes this service goes down so please ensure you know it's up before reporting this example isn't working. We're going to concentrate on the same two web service methods, GetCityForecastByZIP and GetWeatherInformation. Defing the Application: The application setup is identical to the Weather1 version.  There are some improvements to the data that is displayed as part of this example though.  Now we are able to show the associated image along with each forecast line when using the Forecast By Zip feature.  We've also added the temperature Hi/Low values into the UI. Summary of Fundamental Changes In This Application The most fundamental change is that we're binding the UI to the Bean Data Controls instead of directly to the Web Service Data Controls.  This gives us much more flexibility to control the shape of the data and allows us to do caching of the data outside of the Web Service.  This way if your application is, say offline, your bean could still populate with data from a local cache and still show you some UI as opposed to completely failing because you don't have any connectivity. In general we promote this type of programming technique with ADF Mobile to insulate your application from any issues with network connectivity. What's different with this example? We have setup the Web Service DC the same way but now we have managed beans to process the data.  The following classes define the "Model" of our application:  CityInformation-CityForecast-Forecast, WeatherInformation-WeatherDescription.  We use WeatherBean for UI interaction to the model layer.  If you look through this example, we don't really do that much with the java code except use it to grab the image URL from the weather description.  In a more realistic example, you might be using some JDBC classes to persist the data to a local database. To have a good architecture it is always good to keep your model and UI layers separate.  This gets muddied if you start to use bindings on a page invoked from Java code and this java code starts to become your "model" layer.  Since bindings are page specific, your model layer starts to become entwined with your UI.  Not good!  To help with this, we've added some utility functions that let you invoke DC methods without having a binding and thus execute methods from your "model" layer without requiring a binding in your page definition.  We do this with the invokeDataControlMethod of the AdfmfJavaUtilities class.  An example of this method call is available in line 95 of WeatherInformation.java and line 93 of CityInformation.Java. What's a GenericType? Because Web Service Data Controls (and also URL Data Controls AKA REST) use generic name/value pairs to define their structure and don't have strongly typed objects, these are actually stored internally as GenericType objects.  The GenericType class is simply a property map of name/value pairs that can be hierarchical.  There are methods like getAttribute where you supply the index of the attribute or it's string property name.  Why is this important to know?  Because invokeDataControlMethod returns GenericType objects and developers either need to parse these GenericType objects themselves or use one of our helper functions. GenericTypeBeanSerializationHelper This class does exactly what it's name implies.  It's a helper class for developers to aid in serialization of GenericTypes to/from java objects.  This is extremely handy if you have a large GenericType object with many attributes (or you're just lazy like me!) and you just want to parse it out into a real java object you can use more easily.  Here you would use the fromGenericType method.  This method takes the class of the Java object you wish to return and the GenericType as parameters.  The method then parses through each attribute in the GenericType and uses reflection to set that same attribute in the Java class.  Then the method returns that new object of the class you specified.  This is obviously very handy to avoid a lot of shuffling code between GenericType and your own Java classes.  The reverse method, toGenericType is also available when you want to go the other way.  In this case you supply the string that represents the package location in the DataControl definition (Example: "MyDC.myParams.MyCollection") and then pass in the Java object you have that holds the data and a GenericType is returned to you.  Again, it will use reflection to calculate the attributes that match between the java class and the GenericType and call the getters/setters on those. Issues and Possible Improvements: In the next installment we'll show you how to make your web service calls asynchronously so your UI will fill dynamically when the service call returns but in the meantime you show the data you have locally in your bean fed from some local cache.  This gives your users instant delivery of some data while you fetch other data in the background.

    Read the article

  • Programmatic skins in Flex

    - by Flexer
    Hi, I am having 2 problems creating programmatic skin for Canvas. First problem: I would like to have background with rounded corners and I am using GraphicsUtil.drawRoundRectComplex in order to have round corners for only the upper two corners. The problem is that drawRoundRectComplex takes for each corner one single parameter - the corner radius. However my scaleX and scaleY factors are different and in fact the corners are not properly rounded because I either can set the radius using scaleX or scaleY. Graphics.drawRoundRect is better because it takes two parameters for the corners - elipse width and height and then you could apply both scale factors but it doesn't allow me to specify different radius for different corners. I am looking for an idea how to use GraphicsUtil.drawRoundRectComplex when scaleX and scaleY are different. Second problem: Even though I set my programmatic skin through style - < the skin's updateDisplayList gets executed only once and after that somehow "backgroundImage" style gets "undefined" and my programmatic skin is not associated anymore to the Canvas instance. As a workaround I am setting on each resize event "backgroundImage" style again but this is ugly. What could cause such "silent" resetting of the "backgroundImage" style to undefined? Thanks!

    Read the article

  • Solaris: Programmatic interface to ifconfig?

    - by David Citron
    I'm looking for a programmatic interface to the Solaris ifconfig(1M) command. Apparently Linux has the getifaddrs(3) command, but as far as I can tell this has not been ported to Solaris. Short of attempting to use the code at the link above, is there any way to determine ifconfig(1M)-type data (network interface presence, state, etc.) without forking the system command and parsing the output?

    Read the article

  • Android - Declarative vs Programmatic UI

    - by Steve
    Has anyone seen or compiled benchmarks comparing declarative (XML) versus programmatically created UI's in Android? There are things that Google has done to speed up the declarative approach, but you still do have the layout inflation step done at runtime. Have you ever switched (or considered) changing your UI from declarative to programmatic for any reason?

    Read the article

  • Programmatic Bot Detection

    - by matt
    Hi, I need to write some code to analyze whether or not a given user on our site is a bot. If it's a bot, we'll take some specific action. Looking at the User Agent is not something that is successful for anything but friendly bots, as you can specify any user agent you want in a bot. I'm after behaviors of unfriendly bots. Various ideas I've had so far are: If you don't have a browser ID If you don't have a session ID Unable to write a cookie Obviously, there are some cases where a legitimate user will look like a bot, but that's ok. Are there other programmatic ways to detect a bot, or either detect something that looks like a bot? thanks!

    Read the article

  • How to activate and deactivate tabbed bar programmatic .

    - by user291247
    I am using 2 tabbed bars in one window, I want to activate and deactivate it programmatic . how it is possible? Code: var tb2 = Titanium.UI.createTabbedBar({ labels:['Search','Most viewed','Most recent'], backgroundColor:'#333333', style:Titanium.UI.iPhone.SystemButtonStyle.BAR }); var flexSpace = Titanium.UI.createButton({ systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE }); win1.setToolbar([flexSpace,tb2,flexSpace]); // title control var tb4 = Titanium.UI.createTabbedBar({ index:0, labels:['Home','Log in','Upload video'], backgroundColor:'#333333', style:Titanium.UI.iPhone.SystemButtonStyle.BAR }); win1.setTitleControl(tb4);

    Read the article

  • Generating .coverage file programmatic way with Visual Studio 2010

    - by prosseek
    I need to generate .coverage file programmatic way. This post explains a C# code to do it as follows. using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using Microsoft.VisualStudio.Coverage; using Microsoft.VisualStudio.Coverage.Analysis; // You must add a reference to Microsoft.VisualStudio.Coverage.Monitor.dll namespace Microsoft.VisualStudio { class DumpProgram { static void Main(string[] args) { Process p = new Process(); StringBuilder sb = new StringBuilder("/COVERAGE "); sb.Append("hello.exe"); p.StartInfo.FileName = "vsinstr.exe"; p.StartInfo.Arguments = sb.ToString(); p.Start(); p.WaitForExit(); // TODO: Look at return code – 0 for success // A guid is used to keep track of the run Guid myrunguid = Guid.NewGuid(); Monitor m = new Monitor(); m.StartRunCoverage(myrunguid, "hello.coverage"); // Complete the run m.FinishRunCoverage(myrunguid); Unfortunately, when I compile this code, I get the following error. bin2xml.cs(26,22): error CS0246: The type or namespace name 'Monitor' could not be found (are you missing a using directive or an assembly reference?) bin2xml.cs(26,38): error CS0246: The type or namespace name 'Monitor' could not be found (are you missing a using directive or an assembly reference?) As this post says, there are some changes between VS2008 and VS2010, I think the Monitor class is in some different namespace. What might be wrong? How can I generate the .coverage file programmatically with Visual Studio 2010? ADDED I added using System.Threading to run to get the following error. I run the command csc bin2xml.cs /r:Microsoft.VisualStudio.Coverage.Analysis.dll. bin2xml.cs(28,21): error CS0723: Cannot declare a variable of static type 'System.Threading.Monitor' bin2xml.cs(28,33): error CS0712: Cannot create an instance of the static class 'System.Threading.Monitor' bin2xml.cs(29,23): error CS1061: 'System.Threading.Monitor' does not contain a definition for 'StartRunCoverage' and no extension method 'StartRunCoverage' accepting a first argument of type 'System.Threading.Monitor' could be found (are you missing a using directive or an assembly reference?) bin2xml.cs(31,23): error CS1061: 'System.Threading.Monitor' does not contain a definition for 'FinishRunCoverage' and no extension method 'FinishRunCoverage' accepting a first argument of type 'System.Threading.Monitor' could be found (are you missing a using directive or an assembly reference?) ADDED2 I compiled the code with the following command. csc bin2xml.cs /r:Microsoft.VisualStudio.Coverage.Analysis.dll /r:Microsoft.VisualStudio.Coverage.Monitor.dll Then, I got these error messages. Monitor m = new Monitor(); is at the line 27. bin2xml.cs(27,21): error CS0246: The type or namespace name 'Monitor' could not be found (are you missing a using directive or an assembly reference?) bin2xml.cs(27,37): error CS0246: The type or namespace name 'Monitor' could not be found (are you missing a using directive or an assembly reference?)

    Read the article

  • WPF DataGrid programmatic multiple row selection

    - by MicMit
    Is there anything simpler than sample below ? I do have observable collection ( "list" in the code ) bound to DataGrid lstLinks for (int i = 0; i < list.Count ; i++) { object rowItem = lstLinks.Items[i] ; DataGridRow visualItem = (DataGridRow)lstLinks.ItemContainerGenerator.ContainerFromItem(rowItem); if (list[i].Changed) visualItem.IsSelected = false; else visualItem.IsSelected = false; }

    Read the article

  • Programmatic DNS

    - by Chad
    I'm a long time developer but not very experienced with DNS. Here's my problem: Our app launches servers on Amazon EC2 for clients. One client wants to use custom DNS's for every server launched instead of the normal long public DNS provided by AWS: for example server-5.demo.ourclient.com, server-6.demo.ourclient.com. What's the easiest/cleanest/best way to solve this challenge from inside our application that launches the servers and knows the Amazon public DNS? We can probably get control of demo.ourclient.com as well.... Are there nice hosted solutions with API's? Would we need to manage a DNS server for *.demo.ourclient.com? Thanks! Chad

    Read the article

  • AppEngine BlobStore upload failing when request is programmatic

    - by Joe Ludwig
    I have an AppEngine application that uses the blobstore to store user-provided image data. When I upload images to that application from a form in Chrome it works fine. When I try to upload an image from an Android application it fails. Both methods work fine if I am running against the development server, but the Android upload doesn't work against the live service. This is the request from Chrome: POST /_ah/upload/?userToken=11001/AMmfu6ZCyMQQ9YdiXal3SmSXIRTQIuSRXkNc-i3JmU0fqx_kJbUJ2OMLcS2lXhVJSK4qs7regViTKzOPz5ejoZYi0nAD5o8vNltiOViQw6DZO7_byZz3Ut0/ALBNUaYAAAAAS_lusgPMAGmpPrg0BuNsJyymX-57ob4i/ HTTP/1.1 Host: photohuntservice.appspot.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5 Referer: http://photohuntservice.appspot.com/debug_newpuzzle?userToken=11001 Content-Length: 60360 Cache-Control: max-age=0 Origin: http://photohuntservice.appspot.com Content-Type: multipart/form-data; boundary=----WebKitFormBoundarybl05YLmLbFRf2MzN Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 ------WebKitFormBoundarybl05YLmLbFRf2MzN Content-Disposition: form-data; name="userToken" 11001 ------WebKitFormBoundarybl05YLmLbFRf2MzN Content-Disposition: form-data; name="img"; filename="Photo_020908_001.jpg" Content-Type: image/jpeg <image data> ------WebKitFormBoundarybl05YLmLbFRf2MzN Content-Disposition: form-data; name="longitude" -122.084095 ------WebKitFormBoundarybl05YLmLbFRf2MzN Content-Disposition: form-data; name="latitude" 37.422006 ------WebKitFormBoundarybl05YLmLbFRf2MzN-- This is the request from my client (which is written in Java on Android, but I don't think that's relevant): POST /_ah/upload/?userToken=11001/AMmfu6Zf9an6AU4lT9UuhIpxOZyOYb1LMwimFpeSh8zr6J1sX9F2ddJW3Qlsw0kwV3oALv-TNPWRQ6g4_Dgwk0UTwF47bbc78Yl44kDeV69MydTuR3N46S4/ALBNUaYAAAAAS_mMr3CYqTg3aVBDjhRxP0DyyRdvotyG/ HTTP/1.1 Content-Type: multipart/form-data;boundary=----WebKitFormBoundaryhdyNAhmOouRDGErG Cache-Control: max-age=0 Accept: */* Origin: http://photohuntservice.appspot.com Connection: keep-alive Referer: http://photohuntservice.appspot.com/getuploadurl?userToken=11001 Content-Length: 2638 Host: photohuntservice.appspot.com User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4) Expect: 100-Continue ------WebKitFormBoundaryhdyNAhmOouRDGErG Content-Disposition: form-data; name="userToken" 11001 ------WebKitFormBoundaryhdyNAhmOouRDGErG Content-Disposition: form-data; name="img";filename="PhotoHunt.jpg" Content-Type: image/jpeg <image data> ------WebKitFormBoundaryhdyNAhmOouRDGErG Content-Disposition: form-data; name="latitude" 37.422006 ------WebKitFormBoundaryhdyNAhmOouRDGErG Content-Disposition: form-data; name="longitude" -122.084095 ------WebKitFormBoundaryhdyNAhmOouRDGErG-- In both cases the AppEngine Python code to catch the request is the same: class UploadPuzzle( blobstore_handlers.BlobstoreUploadHandler ): def post(self): upload_files = self.get_uploads( ) The problem is that when running on the production AppEngine service self.get_uploads() returns an empty list when the request is made from my client app. Both requests return what I expect (a list with one blob_info in it) on the development server, and Chrome returns what I expect in both cases.

    Read the article

  • Blurry UILabel as programmatic subview of UITableViewCell contentView

    - by Alex Reynolds
    I am adding a UILabel instance as a subview of my custom UITableViewCell instance's contentView. When I select the cell, the row is highlighted blue, except for the background of the label. The label text is sharp. When I set the label and content view backgroundColor property to [UIColor clearColor], the label text becomes blurry. How do I set the label background color to be clear, to allow the row highlight to come through, while still keeping the label text sharp? One suggestion I read elsewhere was to round the label's frame values, but this did not have any effect. CODE Here is a snippet of my custom UITableViewCell subview's -setNeedsLayout method: UILabel *_objectTitleLabel = [[UILabel alloc] initWithFrame:CGRectNull]; _objectTitleLabel.text = [self.awsObject cleanedKey]; _objectTitleLabel.font = [UIAppDelegate defaultObjectLabelFont]; _objectTitleLabel.highlightedTextColor = [UIColor clearColor]; //[UIAppDelegate defaultLabelShadowTint]; _objectTitleLabel.backgroundColor = [UIColor clearColor]; //[UIAppDelegate defaultWidgetBackgroundTint]; _objectTitleLabel.frame = CGRectMake( kCellImageViewWidth + 2.0 * self.indentationWidth, 0.5 * (self.tableView.rowHeight - 1.5 * kCellLabelHeight) + kCellTitleYPositionNudge, contentViewWidth, kCellLabelHeight ); _objectTitleLabel.frame = CGRectIntegral(_objectTitleLabel.frame); _objectTitleLabel.tag = kObjectTableViewCellTitleSubviewType; //NSLog(@"_objectTitleLabel: %@", NSStringFromCGRect(_objectTitleLabel.frame)); [self.contentView addSubview:_objectTitleLabel]; [_objectTitleLabel release], _objectTitleLabel = nil; ... self.contentView.backgroundColor = [UIAppDelegate defaultWidgetBackgroundTint]; self.contentView.clearsContextBeforeDrawing = YES; self.contentView.autoresizesSubviews = YES; self.contentView.clipsToBounds = YES; self.contentView.contentMode = UIViewContentModeRedraw;

    Read the article

  • Avoid hardcoding iPhone screen size with programmatic view creation

    - by miorel
    Hi, I was looking up how to create a view programmatically and found the following example code: self.view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; This works great, except I don't like that it hardcodes the size of the screen. Is there a way to look up the size of the screen? An important point someone brought up is that if the app is running during a phone call then the screen will be slightly smaller because of the green "return to call" bar.

    Read the article

  • Programmatic authentication in JEE 6

    - by Kevin
    Hello, is it possible to authenticate programmatically a user in J2ee 6? Let me explain with some more details: I've got an existing Java SE project with Servlets and hibernate; where I manage manually all the authentication and access control: class Authenticator { int Id string username } Authenticator login(string username, string password) ; void doListData(Authenticator auth) { if (isLoggedIn(auth)) listData(); else doListError } void doUpdateData (Authenticator auth) { if (isLoggedAsAdmin(auth)) updateData() ; else doListError(); } void doListError () { listError() ; } And Im integrating J2ee/jpa/servlet 3/... (Glassfish 3) in this project. I've seen anotations like : @RolesAllowed ("viewer") void doListdata (...) { istData() ; } @RolesAllowed("admin") void doUpdateData (...) { updateData() ; } @PermotAll void dolisterror () { listerror() ; } but how can I manually state, in login(), that my user is in the admin and/or viewer role?

    Read the article

  • Programmatic use of ARP

    - by sizzzzlerz
    I have a need for some C or C++ code, compilable under Linux, to be able to take a list of IP addresses of some arbitrary number of remote hosts machines and obtain a ethernet MAC address for each one. These host machines may be on the same subnet or they could be on a different subnet behind a router. Its OK if the MAC address of some or all of the remote hosts is the address of the interface on the router. Ultimately, I want to hand off the IP address and MAC address to an FPGA who will use these pieces of information to format and send UDP/IP packets over ethernet to the hosts. Obviously, the FPGA will also be given its own MAC address and IP address to fill in the source MAC and source IP addresses in the packets. Is there some code I can be pointed to that can create and broadcast ARP packets to these remote machines and receive back the ARP response packets such that the destination MAC addresses can be extracted?

    Read the article

  • Project Euler: Programmatic Optimization for Problem 7?

    - by bmucklow
    So I would call myself a fairly novice programmer as I focused mostly on hardware in my schooling and not a lot of Computer Science courses. So I solved Problem 7 of Project Euler: By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10001st prime number? I managed to solve this without problem in Java, but when I ran my solution it took 8 and change seconds to run. I was wondering how this could be optimized from a programming standpoint, not a mathematical standpoint. Is the array looping and while statements the main things eating up processing time? And how could this be optimized? Again not looking for a fancy mathematical equation..there are plenty of those in the solution thread. SPOILER My solution is listed below. public class PrimeNumberList { private ArrayList<BigInteger> primesList = new ArrayList<BigInteger>(); public void fillList(int numberOfPrimes) { primesList.add(new BigInteger("2")); primesList.add(new BigInteger("3")); while (primesList.size() < numberOfPrimes){ getNextPrime(); } } private void getNextPrime() { BigInteger lastPrime = primesList.get(primesList.size()-1); BigInteger currentTestNumber = lastPrime; BigInteger modulusResult; boolean prime = false; while(!prime){ prime = true; currentTestNumber = currentTestNumber.add(new BigInteger("2")); for (BigInteger bi : primesList){ modulusResult = currentTestNumber.mod(bi); if (modulusResult.equals(BigInteger.ZERO)){ prime = false; break; } } if(prime){ primesList.add(currentTestNumber); } } } public BigInteger get(int primeTerm) { return primesList.get(primeTerm - 1); } }

    Read the article

  • Dojo DataGrid, programmatic creation

    - by djna
    I'm trying to create a DataGrid dynamically. Declarative creation is working fine: A source of data: <span dojoType="dojo.data.ItemFileReadStore" jsId="theStore" url="dataonly001.json"> </span> a simple layout: <script type="text/javascript" > var layout = [ { field: 'custId', name: 'Id', } // more items elided ... ]; </script> The grid: <body class="tundra" id="mainbody"> <div id="grid" dojoType="dojox.grid.DataGrid" store="theStore" structure="layout" autoWidth="true" ></div> </body> And I get the grid displayed nicely. Instead, I want to create the grid dynamically. For the sake of figuring out what's broken I've tried to use exactly the same layout and store, removing just teh grid declaration and adding this script: <script type="text/javascript" djConfig="parseOnLoad: true, debugAtAllCosts: true"> dojo.addOnLoad(function(){ // initialise and lay out home page console.log("Have a store:" + theStore); console.log("Have a structure:" + layout); var grid = new dojox.grid.DataGrid({ id:"grid", store : theStore, clientSort : "true", structure : layout }); grid.startup(); dojo.place(grid.domNode, dojo.body(), "first"); }); </script> The effect that I get is a completely empty rectangle is displayed. Using FireBug I can see that the DataGrid widget is created but that it has no rows or columns. So my guess is that the datastore or layout are not being passed correctly. However, it does appear that at the point of creation the values of theStore and layout are correct. Suggestions please, or indeed a working example of a programmic grid might solve the problem.

    Read the article

1 2 3 4 5 6 7 8 9 10 11  | Next Page >