Why are my values not "taking"?

I've had this problem intermittently, and now it's back and I
don't know why.
I have 2 datagrids with drag and drop. The source is an
XMLList, as in:
<items>
<item ln1="Feta" ln2="crumbled feta" sn="feta" minQy="0"
maxQy=".5" qty=".5" units="cup" />
<item ln1="Fontina" ln2="shredded Fontina" sn="fontina"
minQy="0" maxQy=".5" qty=".5" units="cup" />
... etc ...
</items>
For the destination, I have created an ArrayCollection to
receive the dropped items. One column is a numeric stepper:
<mx:DataGridColumn dataField="@qty" headerText="Quantity"
width="70" itemEditor="myComponents.NSEditor"
itemRenderer="myComponents.NSEditor"
editorDataField="newTotal"/>
Which uses this component:
<mx:Script>
<![CDATA[
public function get newTotal ():Number{
return step.value;
]]>
</mx:Script>
<mx:NumericStepper id="step" minimum="{XML(data).@minQy}"
maximum="{XML(data).@maxQy}" stepSize=".25"
value="{XML(data).@qty}" width="50"/>
</mx:VBox>
I check the totals in the list with:
// adds up the quantities, returns sum
public function getTotal(_arr:ArrayCollection) : Number {
var _sum : Number = 0;
var _length : Number = _arr.length;
for(var i:Number=0; i<_length; i++) {
var _item : Object = _arr.getItemAt( i );
var _value : Number = _item["@qty"];
_sum += _value;
return _sum;
The problem is, I drag a couple of items over, their default
qty is 0.5 as indicated in the XML. But even if I change the
steppers to 0.25, I'm still getting a total as if they're 0.5. Why
is this?

Make the getter newTotal bindable:
[Bindable}
public function get newTotal():Number{ ... }
You may get either an error or warning telling you that you
have to have a setter for newTotal as well. If you do, just add the
setter, even though it won't do anything.
Another approach would be to have a public variable in your
NS component:
[Bindable]
public var changedQuantity:Number
<mx:NumericStepper id="step" minimum="{XML(data).@minQy}"
maximum="{XML(data).@maxQy}" stepSize=".25"
value="{XML(data).@qty}" width="50"
change="changedQuantity=step.value" />
and then
<mx:DataGridColumn dataField="@qty" headerText="Quantity"
width="70" itemEditor="myComponents.NSEditor"
itemRenderer="myComponents.NSEditor"
editorDataField="changedQuantity"/>
TS

Similar Messages

  • Why are animated gifs not displaying animations in the preview?

    Why are animated gifs not displaying animations in the preview?
    My coworkers and I are not seeing a animation in the preview pane in Adobe Bridge CS6 even when clicking the play button in the preview window. However, we do see a graphic of the first frame and one person sees 1 frame when clicking play and one other frame and then the animation stops, however, that is not the complete animation.
    I'm using Windows 7 32 bit
    My coworkers are using a mac.
    One coworker has apple OS Mountain Lion with a Intel Quad-Core Xeon – 64 bit system.
    Is this fixable or in the works as a patch? Otherwise we have to open these docs in a browser in order to view them properly.

    I've just come to the realization that some animated gifs do play fine and others do not. A coworker of mine suggests that if it's an animation made via Adobe Photoshop, it'll work in bridge but will not if it's made using something else.

  • Disc Burner. Why are some files not readable or writeable?

    Hello,
    I am trying to backup my friends computer files on a beige G3 (233 MHz). I am burning about 6 DVDs of AIF music files. Most of the files are about 30 - 40 Megs in size. Often I receive error messages on particular files that read:
    "The operation cannot be completed because some data cannot be read or written.
    (Error code - 36)"
    Followed by the choices: "Stop" or "Continue".
    I have a bad feeling that my startup disk is too small but I am not sure.
    Most of the files work fine. However some of the files cause disc burner to not be able to use them in the disc image before I burn. Why would this be?
    Here are the specifications:
    Computer: beige G3 with two hard drives (one SCSI and one ATA hard drive) and a Pioneer DVR-110D DVD writer which is Apple supported (Apple system profiler indicates Apple supported on this DVD writer). My blank DVD disks are Sony Vermatim DVD-R (1 - 16x speed support). Although I think my beige G3 only writes them at about 2 or 4x.
    I am using OS 10.1.5. My startup disk which has OS 10.1.5 in it is a 4 GIG SCSI disk. Is this big enough for a startup disk (for creating 4.5 GIG DVDs)? My files are on the second hard drive which is a 40 GIG ATA disk.
    I have a bad feeling that my OSX startup drive is too small for disk burning - it is only 4 GIGs in total and OSX Disc burner (Disc copy) is first making a disk image on my startup volume before it burns it. Perhaps that disk image is too large for the startup volume. Is there any way I could ask OSX to put this disk image on the second larger hard drive instead (not the startup drive?).
    Here is my process (I hope I am doing this right - I am new at this):
    1. I first insert a blank DVD-R
    2. A message pops up asking my if I would like to create a blank disc image for this disk (I think this is the typical Disk Copy utility window. I say "yes" and give it a name and choose the "DVD-R or DVD-RAM" option. (I am not sure if there are other important settings to choose here or better settings to use but I guessed the other options that seemed obvious. A blank disk image is created with an icon that looks like a DVD disk.
    3. Then I drag my chosen files to this blank disc image. It takes about 30 minutes to copy over. Thats when I receive the error message that some files couldn't be "read or written". The other files work fine but it would be nice if they all worked.
    Why would some files not be readable or writeable?
    4. Then I choose file/burn in the top menu and the DVD is created. This takes another 20 - 30 minutes. At the very end of the process another message pops up saying:
    "Sorry the operation could not be completed because an unexpected error occured (error code -28)" Followed by an "OK" button.
    However all the files that made it onto the final DVD are fine - its just that its not all of the ones I originally chose in the first step when dragging to create the disk image.
    Am I doing this the right way?
    Why are some files not "readable or writeable" as it indicates in the error message?
    Is my 4 GIG startup disk too small for this? or are the music files possibly corrupt? or could there be some other possible problem?
    Thanks

    To follow up, I have some good news. After following your advice Kappy, it now works very well Thanks! Instead of using the 4 GIG volume for the OS, I am now using an 8 GIG partition on an 80 GIG drive. So now the OS has some room to operate. No disk errors occured on my first DVD
    Now there was one problem. The second DVD burned gave me an error. I am not sure why but I am going to guess that because I had to installed the OS onto an 8 GIG partition maybe the OS needs to be rebooted in between disk burns because although 8 GIGs is certainly greater than the 4 GIGs I gave it last time, it still isn't a lot of space - maybe just enough to do one DVD at a time. Thats only a guess. So I rebooted to see if that clears the system out ready for the next DVD and I am trying to burn the second DVD again. If I remember I will report back. In any case, yes, this seems to be working. I hope this second DVD burns well too.
    Thanks Kappy

  • Why are the iPhotos not listed in the finder?

    why are the iPhotos not listed in the finder?

    There are many, many ways to access your files in iPhoto:   You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.  If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running:
    For users of 10.6 and later:  You can download a free Services component from MacOSXAutomation  which will give you access to the iPhoto Library from your Services Menu.
    Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5 Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    Show File:  a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.    3.b.
    b: On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected.

  • Why are my songs not completing play?

    why are my songs not completing play? plays half a song then on to the next

    Welcome to the Apple Community.
    Try restarting iTunes.

  • Why are my contacts not showing up in my iMessage on my macbook pro?

    Why are my contacts not showing up in my imessage on my macbook pro?

    open messages. go to messages>preferences>accounts. select your icloud account from the left sidebar, and uncheck 'enable this account' then recheck 'enable this account'
    you should also be using icloud to sync your contacts. sytem preferences>icloud. check the 'contacts' box

  • Why are my audiobooks not going through home sharing?

    why are my audiobooks not going through for home sharing.

    According to this thread (https://discussions.apple.com/thread/3525692), it looks like you are not able to share audiobooks through Home Sharing:
    You can share MP3, AIFF, WAV, AAC, and radio station links, but you cannot share iTunes Store Audio Books, Audible spoken word content, or QuickTime sound files.
    You can leave iTunes feedback here: http://www.apple.com/feedback/itunesapp.html

  • Why are my emails not deleting from all devices when deleted from one?  I have iCloud set up and turned on. I have ipad2, iphone5 and a Mac. What am I doing wrong?  Thank you

    Why are my emails not deleting from all devices when deleted from one?  I have iCloud mail set up and turned on. I have ipad2, iPhone 5 and a Mac desktop. What am I doing wrong?  Thank you.

    It depends on the type of email account you are using, not on iCloud.  If you are using an IMAP or exchange account, when you delete from one device, it is deleted from all devices.  If you are using a POP (POP3) account, it won't.  (iCloud email, Gmail and Yahoo are all IMAP accounts.)

  • Why are my thumbnails not matching photos?

    Why are my thumbnails not matching the photos in my smart album?

    I am rebuilding my thumbnails--a slow process I am learning.  We'll see how that does.  I believe I have the latest version of both iPhoto and OS.  What happens is that the thumbnail does not match the photo.  The photo in the thumbnail is in the same series, but not the same.  Many of the thumbnails are the same photo from the series.  I'll report back on the success of the thumbnail rebuilding process.

  • Why are my songs not numbered?

    why are my songs not numbered?

    Hi,
    In advance preferences, you can tell iTunes how to organise your library. Tick  keep iTunes organised and copy files to iTunes media folder.
    If this I has already been done, you may need to add track numbers from get info.
    Jim

  • Why are my bookmarks not being saved locally if the save to cloud feature is disabled?

    Why are my bookmarks not being saved locally on my ipad mini if the save to cloud feature is disabled?

    They should be. If you have lost bookmarks try restarting Safari:
    1. Press the Home button
    2. Double click the Home button to bring up the "Recent Apps" tray.
    3. Touch and hold on the Safari icon in the "Recent Apps" tray until a "-" appears.
    4. Touch the "-" to terminate Safari.
    5. Restart Safari and see if your Bookmarks are back.

  • Why are my books not deleting?

    Why are my books not deleting?

    It depends on the type of email account you are using, not on iCloud.  If you are using an IMAP or exchange account, when you delete from one device, it is deleted from all devices.  If you are using a POP (POP3) account, it won't.  (iCloud email, Gmail and Yahoo are all IMAP accounts.)

  • Why are my pictures not sending in imessage?

    Why are my pictures not sending in iMessage?

    Check out this support document http://support.apple.com/kb/ht4221

  • Why are my apps not downloading?

    Why are my apps not downloading? They just sit there waiting and I keep getting an error saying that my purchases cannot be downloaded at this time and to try again later. I have tried logging out and in, and rebooting but neither has worked

    Same problem here.  Not able to update any apps or to download new purchased music.  Doesn't work on iPad, iPhone, or iTunes.  Tried with 3G download rather than wifi on the phone and iPad.  It still hasn't worked.  I changed me credit card, but without success.
    The store is currently broken for some users, maybe all.

  • Why are my movies not showing on my Mac Book, which is the computer that I used to purchase the movie, but showing on my IMAC at home...I am currently deployed.

    why are my movies not showing on my Mac Book, which is the computer that I used to purchase the movie, but showing on my IMAC at home...I am currently deployed so this ***** a bit. Also how do I keep this incedent from happending in the future?

    No, this is not the case. I know where i purchased the movie and I also know movies cant be added to the cloud such as music, TV shows can.  The instance happened during the dowload. I think that depending which computer is up and running and the bandwith allocated on either network, which ever computer that finishes first is the one that gets the movie. Just a thought. So next time I will ensure my IMAC is not running. I think that fixes it.
    Thanks

Maybe you are looking for

  • Standard BAPI Names Requires

    Experts, Can you please tell me the 2 standarad BAPIS names available in R/3... 1st............................. Input: Sales order no (req), date of order (optional) Output: 1.     Status 2.     Dispatch date 3.     Why not dispatched yet? 4.     Is

  • Error message after iTunes upgrade

    The error message reads: "The attempt to burn the disc failed. The device failed to calibrate the laser power level for this media." What does this mean? I am using the same discs as I always have. I just installed the latest upgrade. version 6.0.5 i

  • Cdrom & dvd do not work at all after an upgrade... ?

    Hi! I was using this /dev/cdrom /media/cdrom   auto    iocharset=utf8,ro,user,noauto,unhide   0      0 /dev/cdrom1 /media/cdrom1   auto    iocharset=utf8,ro,user,noauto,unhide   0      0 /dev/dvd /media/dvd   auto    ro,user,noauto,unhide   0      0

  • A draft will not 'stay' deleted,it doesn't reappear in drafts but does when I attempt to comopse a new gmail message//os 10.6.8

    Cut, delete, commandX all delete a line of "s's" from a new compose message..HOWEVER the line of "s's" reappear when I open a fresh compose message (ie) doesn't delete the single line of s's from the discarded draft.  I'm using gmail via a/my univers

  • How do I move my photos from the organizer into the photo bin?

    PSE 11 on Mac running Mountain Lion.  I managed to import some photos into the Organizer, But how do I get those photos into the Photo bin of the Elements Editor? I actually have opened 3 of the photos with Editor but they don't appear in the photo b