Datasets
I really need help. I need to add an array with {label:"blah", data:"blahish"} into a dataset, and then have that connected to a list component. All in actionscript. And have it appear on the list as Blah with data of blahish. I can get it to work fine with usung the array as a dataprovider, but I need the dataset powers of filterfunc etc. A tutorial or a sample .fla would be appreciated beyond belief. I've searched google and macromedia for literealy over 13 hours.
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 06-30-2005, 11:39 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Datasets ?
Hi everyone....
im having some trouble getting my head around how to use the DataSet component in MX 2004.
I need to draw a heap of objects based off the following schema:
Code:
<Trable>
<Week>
<wID>13</wID>
<Task>
<UID>1223</UID>
<Description>blah blah</Description>
</Task>
</week>
</Trable>
i've got this data being loaded into the Dataset with no problems, however, now i need to build a class that cycles through the datasets items and attach a MC to the timeline for every 'task'.
now my question is, how do I cycle through the dataset? I've worked out how to do it on the root level [i.e. return items through dataset.currentItem.ID] but how to I dig down and cycle through its children? as the number of 'tasks' and 'weeks' vary greatly.
thanks for your help in advance......please someone help, I really need it !!!!
Cheers
Datasets ?
Hi everyone....
im having some trouble getting my head around how to use the DataSet component in MX 2004.
I need to draw a heap of objects based off the following schema:
Code:
<Trable>
<Week>
<wID>13</wID>
<Task>
<UID>1223</UID>
<Description>blah blah</Description>
</Task>
</week>
</Trable>
i've got this data being loaded into the Dataset with no problems, however, now i need to build a class that cycles through the datasets items and attach a MC to the timeline for every 'task'.
now my question is, how do I cycle through the dataset? I've worked out how to do it on the root level [i.e. return items through dataset.currentItem.ID] but how to I dig down and cycle through its children? as the number of 'tasks' and 'weeks' vary greatly.
thanks for your help in advance......please someone help, I really need it !!!!
Cheers
DataSets Quirky
I have been working with DataSets and DataHolders for about the past 9 months. I am binding the DataSet's DataProvider to an array that is defined in the DataHolder's schema. This array is populated through XML being passed by a .NET web service.
In some of my movies this has worked without a hitch. In some, the DataSet will populate correctly, but then will not iterate using the dataset.first() and dataset.next() etc. commands. Now, I am finding in some movies the DataSet will not populate at all. I'm running traces that show that the DataHolder array is populating correctly, but not the DataSet. It is showing a length of 0 after the DataHolder is populated.
I am using the exact same code in all of my movies and setting up the schemas and bindings exactly the same. Does anyone have any suggestions for why this could be happening? I am getting desperate! Thanks!
DataSets, DataGrid, XML Oh My
OK -= I am sure everyone is tired of hearing about everyone else's problems with data binding, but here is another one:)
I am using the Component Inspector to bind my XML Connector, DataSet, and DataGrid. No matter how many times I try it, all I get is a grid with column names.
So, what I need to know is how many bindings XML to dataSet, and dataSet to dataGrid,.
I have tried it MANY differnet ways, but currently, I have:
XML to dataSet: dataProvider to the resu;lts Schema Array, dataProvider to the paramater schema array, and SelectedIndex to dataSet.
dataSet to dataGrid: dataProvider and SelectedIndex.
When I open the SWF, it shows a grid with column names and no data. If I click on a column I get an error that reads:
Property 'Location' (or any column name) not found in schema for dataSet 'cs_ds' can't build index.
My XML is as follows:
<?xml version="1.0" encoding="iso-8859-1"?>
<Summary>
<CallRow>
<Call>#Q500COG30</Call>
<Priority>3</Priority>
<Type>1182</Type>
<Group>PD</Group>
<Area>512</Area>
<Unit></Unit>
<From>07:10</From>
<To></To>
<Location>Datadata</Location>
</CallRow>
<CallRow>
<Call>#Q500CO232</Call>
<Priority>3</Priority>
<Type>415M</Type>
<Group>PD</Group>
<Area>112</Area>
<Unit>1A35</Unit>
<From>07:11</From>
<To></To>
<Location>datadata</Location>
</CallRow>
<CallRow>
<Call>#Q500COO32</Call>
<Priority>3</Priority>
<Type>459C</Type>
<Group>PD</Group>
<Area>582A</Area>
<Unit>312</Unit>
<From>07:11</From>
<To></To>
<Location>DATADATA</Location>
</CallRow>
</Summary>
Any ideas???
TIA
Thia
Edited: 06/10/2007 at 08:01:26 PM by truly_great
Pretty Large Datasets
I'm a VB6 / VB.Net developer, looking into flash as an interface engine.
I figured skinning is all very nice, but why not take it a step further.
My main concern, before venturing any further, is how to display datdgrids
with 10.000 + rows, complete with up to 10 columns.
Usually sets this big would just be bad design, but this app is used for bulk
data manipulation. So there you go.
I doubt flash can deal with these kinds of numbers directly, so I'm wondering
if there are any work-arounds like virtual datagrids (virtual listviews) to get
the job done.
Any ideas?
Unable To Update INDEXED Datasets
Hello all,
I really hope that this can be resolved by someone. I've been coding flash for a few years, and been stuck on this one for a week... I've look at it from every angle... so I think... :-|
By experience, if I can't find an answer online, it's probably because the solution is staring me in the face. I've probably overlooked ONE fundamental principal on DataSets. Here's where the rest of you come in...
The problem I am having is that I can't seem to update fields in Datasets that are Indexed by ANOTHER dataset. The update looks great until I MOVE the iterator from the INDEXING dataset away (then back, of course).
Troubles associated to this are also, the locateById() function is unable to confirm the existance of a dataset item if the "indexing dataset's iterator" has been moved. (get/set Iterators don't work either).
Following is a zip of all the code described here.
Ok, here is how it works.
I have an XML file with THIS schema (only the important elements shown):
SYLLABUS
STAGES
[n]
TOPICS
[n]
UNITS
[n]
Links
So, what the XML file holds is an array of Stages which holds an array of Topics which holds an array of Units... The simplest way I found to parse through elements is to create a DataSet for Every level of Array. Each array being indexed by the
previous.
This works GREAT until I try to modify something in TOPICS (or UNITS).
In the files supplied, this problem is demonstrated as follows.
In the first pass (Round 1), the Output Box displays the contents of Stages and Topics.
Then in "Round 2", the dataset is re-iterated, replacing each value with "Blah"... Output Trace proves that something has been changed.
The "Round 3" checks the properties of the dataset, only to find that nothing has been changed.
To prove this, I've also added a onMouseDown and onMouseUp function to check the sequence.
If you click and HOLD the mouse on the stage, it shows you part of the operation. Then the release will show you the rest... if you click
over and over, you can see that nothing is really happening.
From what I can tell, I'm not "really" updating the dataset. Or the dataset just can't find the element once the iterator has moved in the
"indexing dataset". You can see the difference if you re-publish the movie after commenting the line that states "COMMENT THIS"...
It seems to work if I bind the Dataset.items property instead of the Dataset.dataProvider property... but, it really doesn't.
The file can be found here:
http://serge.linux-dude.com/~serge/UpdateData.zip
Thanks so much for your help...
Two Datasets + Datagrid + Xml + Loader = Headache
Hi all,
I'm not really sure how to explain this so please bear with me...
I am using 2 xml connectors, 2 php files, 2 datasets (1 i am not sure if i need or not), 2 dynamic text fields, and a bunch of loaders...
What I need to do is:
1) load mysql -> php -> xml -> dataset -> datagrid (this is working so far)
2) when a user clicks on a cell in the datagrid pass that selected item's value over to the second xml file to get data from a different database table and pass that back (this works kinda, i can pass the value and get it back)
3) also when a user clicks on a cell in the datagrid pass that selected dataset's row to the text fields (comments and date from the first xml/dataset, and this works too)
4) use the returned data from the second xml file to load images in loader components (this is where i am having problems...)
i am not familiar with arrays and loops at all and it's all very confusing. i can get the loaders to display the images only if i bind them directly to the xml connector's schema which would work if i didnt have to pull multiple rows from the database. an example is if the person has purchased two different putters i need to display both of them on the page. right now all it does is show the first row (which i know is a given since i cant figure out how to specify which returned row i can show). i've tried having the datagrid populate the loader but since it is telling the second xml connector to fire it will always return undefined because the xml file doesnt have a chance to get the values returned back before it asks the loader to load...
so here is a link to the swf file i am working on : http://www.slightergolf.com/flashfil...nials/2005.swf an example of a person with 2 products showing only one of them twice is Aaron Sundquist
and here's a link to the asp version of the page which shows what i am trying to accomplish here in flash : http://slightergolf.com/testimonials...undquist&id=54
and my code in the first frame:
Code:
this._lockroot = true;
myxml.trigger();
mydg.vScrollPolicy = "auto";
DGlistener = new Object();
DGlistener.cellPress = function(evt){
if(evt.target==mydg){
var nr:Number = evt.itemIndex
var st:String = evt.target.selectedIndex
myxmlpics.direction = "receive";
myxmlpics.URL = "<A href="http://www.slightergolf.com/flashfiles/testimonials/getdatapics.php?category="+mydg.selectedItem.cname">http://www.slightergolf.com/flashfiles/testimonials/getdatapics.php?category="+mydg.selectedItem.cname;
myxmlpics.trigger();
contenttxt.text = myds.items[st].comments;
info.text = myds.items[st].posttime;
this.updateData(0)
}
}
mydg.addEventListener("cellPress", DGlistener);
mydg.showHeaders = false;
mydg.sortableColumns = false;
stop();
i can also post a link to the .fla and other files if needed..
if anyone can take a look at this and maybe point me in the right direction for a tutorial or example or something i would be so greatful. i've been reading for days and days about all sorts of different ways to accomplish things not even close to this and i'm probably missing a very obvious solution.
thanks in advance for any help
Is There A Solution (class...) To Join Datasets Like Tables In SQL?
Hi,
I'm working on a application that needs a lot of datasets (~20) and I've lot of difficulties when I have to join two or more datasets to retreive data. It takes a long time and a lot of debug time. I'm looking for a solution that allow me to work with datasets as they were a part of a database (able to join datasets...). Any solution can interest me : actionscript classes/or third party solution(that extends flash capacities), free or not ... If someone knows something about this, he's welcome!
Thanks.
|