Closed GoogleCodeExporter closed 9 years ago
Thank you for the bug report.
Unfortunately, I cannot reproduce the error. When I load this yaml with the
following code
public function onTestIssueFive(event : Event, ldr : URLLoader) : void
{
var yaml : Array = YAML.decode(ldr.data) as Array;
for each(var obj: Object in yaml)
{
var dte: Date = obj.consumed_at as Date;
trace(dte.toDateString())
}
}
I get the following output:
Mon Oct 29 2007
Mon Nov 5 2007
Mon Nov 12 2007
Mon Nov 19 2007
I am running this on Windows, so I'll check to see if I can reproduce the error
on
Linux (though I really hope that this is not the problem).
Original comment by dwischu...@gmail.com
on 31 Mar 2008 at 12:12
Thank you for the prompt response.
I'll attempt to make a small Flex builder project that demonstrates this bug
(if it's
really as3yaml's).
Thanks before.
Original comment by ceefour666@gmail.com
on 31 Mar 2008 at 12:32
here's a very small flex 3 project that demonstrates the bug.
the package is big because i included the compiled SWF files, in case
something's
wrong with my compiler. so checkout the SWF from bin-debug first before
recompiling
the app with your own.
Original comment by ceefour666@gmail.com
on 31 Mar 2008 at 12:58
Attachments:
this is that app screenshot in my computer
the _str fields is the input in yaml
other fields are the parsed Date objects, which are incorrect
"should_be" is basically the same as *_str but human readable
note that it also signifies that the timezone didn't get parsed correctly.
input is
(for *_tz data points) in UTC so if possible, output should also be UTC. if
translated to localtime, then the resulting localtime should have timezone
shift/correction as well.
Original comment by ceefour666@gmail.com
on 31 Mar 2008 at 1:01
Attachments:
Thank you.
I was able to reproduce the bug. The bug actually appears to be a problem with
the
setMonth method on the Date class (sometimes it just doesn't do anything).
I've found a solution though. I'll do some more testing and hopefully post an
update
tomorrow.
Original comment by dwischu...@gmail.com
on 31 Mar 2008 at 4:11
YESSS! :)
So it's a Flex bug (?)
I was so frustrated with this bug I almost wanted to change "back" into XML..
Also had weird fun while finding this bug. Because I had about 5800 data points
the
first time and I was wondering why the chart doesn't always draw "right-wards".
Then I changed it to have only fewer data points (several weeks rather than
days in a
year). Lucky I also set the proper dataUnits so I can see that the chart series
is
sometimes overlapping with each other. Was very weird feeling since I was sure
that
the data input is aligned exactly weekly.
So I turned on dataTips and last used a data grid instead of a chart and the
problem
becomes clear.
Can you describe more about the Date class problem? If it's indeed a Date bug
then it
probably should be reported to Adobe's bug tracker.
Thanks a lot. I've to say as3yaml is one of the most useful libraries we've came
across in Flex. Tried to use XML, JSON before but YAML seems to be doing the
best
balance of them. Not to mention that our backend of choice is currently
Rails/Ruby
(doesn't have to, though) so making YAMLs is quite a snap.
Original comment by ceefour666@gmail.com
on 31 Mar 2008 at 8:26
Ahhh... nevermind, the issue was in my code.
The problem was that the Date object was getting initialized to the current date
(e.g, 3-31-2008) and I was setting the month before I was setting the date.
So, for
example, when I would try to set the month to February I was trying to set the
full
date to 2-31-08 which, of course, does not exist.
In any case, the fix is simple enough and I should have a new version posted
later today.
Original comment by dwischu...@gmail.com
on 31 Mar 2008 at 3:38
You're awesome too here :) Thanks for willing to take matters into details :)
Original comment by ceefour666@gmail.com
on 31 Mar 2008 at 4:06
Attaching the updates to this page because Google is generating an error when I
try
to to upload the files to the Downloads section.
Original comment by dwischu...@gmail.com
on 1 Apr 2008 at 3:19
Attachments:
Original comment by dwischu...@gmail.com
on 1 Apr 2008 at 3:20
Original issue reported on code.google.com by
ceefour666@gmail.com
on 30 Mar 2008 at 11:01