[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => limitedwave777 [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Repeater makes component vanish. - Macromedia Flex General Discussion

Repeater makes component vanish. - Macromedia Flex General Discussion

There's an awesome rating component I found in here ([url]http://www.asfusion.com/examples/item/rating-component[/url]) and I've got it working within my Flex project. One big problem - using example five - when the component is placed within a repeater (bare, no attributes or anything), it displays 'undefined' for the selected rating, on click. If I move the two lines of codes that makes the component and text indicator just outside the repeater tags, it works. Anyone know why this might be happening?...

  1. #1

    Default Repeater makes component vanish.

    There's an awesome rating component I found in here
    ([url]http://www.asfusion.com/examples/item/rating-component[/url]) and I've got it
    working within my Flex project. One big problem - using example five - when the
    component is placed within a repeater (bare, no attributes or anything), it
    displays 'undefined' for the selected rating, on click. If I move the two lines
    of codes that makes the component and text indicator just outside the repeater
    tags, it works. Anyone know why this might be happening?

    limitedwave777 Guest

  2. #2

    Default Re: Repeater makes component vanish.

    OK...how about this: can anyone tell me if using the addChild method is a suitable replacement for a repeater? If so, any good examples? Thanks.
    limitedwave777 Guest

  3. #3

    Default Re: Repeater makes component vanish.

    Yes, you can do it manually. Repeater really just wraps addChild/remove/child
    with a lot of convenience funtionality.

    I don't advise that though. Repeater is very effective.

    Is the data getting into the repeated component?

    Post some code. Use the Attach code button/window please.

    Tracy

    ntsiii Guest

  4. #4

    Default Re: Repeater makes component vanish.

    The code is getting deep with extra components so I'll post the area in
    question and if that doesn't do it I'll zip up a package.

    <mx:Canvas id="canvy" width="100%" height="100%">
    <!-- TILING BEGINS -->
    <mx:Tile id="tiler" height="100%" direction="horizontal" alpha="1.0"
    color="#E7E7E7" backgroundAlpha="1.0" horizontalAlign="center" left="10"
    right="10" y="10">
    <!-- REPEATING BEGINS -->
    <mx:Repeater id="slideRepeater" dataProvider="{fxcPager.pageData}"
    width="{slider.value}" height="{slider.value}">
    <mx:HBox styleName="box2p" verticalAlign="top" horizontalAlign="center">
    <mx:VBox>
    <mx:HBox>
    <custom:CustomImage
    source="../images/upload/{slideRepeater.currentItem.filename}"
    rating="{slideRepeater.currentItem.rating}" caption
    ="{slideRepeater.currentItem.caption}"
    path="../images/upload/{slideRepeater.currentItem.filename}"
    width="{slider.value}" height="{slider.value}"
    click="setPath(String(event.currentTarget.path),St ring(event.currentTarget.capti
    on),String(event.currentTarget.rating));" scaleContent="true"
    horizontalAlign="center">
    </custom:CustomImage>
    <mx:VBox>
    <mx:Text width="100" text="{slideRepeater.currentItem.caption}"
    textAlign="left" color="#CCCCCC" fontFamily="Arial" fontSize="14"
    height="100%"/>
    <!-- Next two tags are the rating control and text display. In this spot the
    seletedValue = undefined -->
    <controls2:Rating id="ratingExample5"
    value="{slideRepeater.currentItem.rating}" showSelectedValue="true" />
    <mx:Text text="Currently selected value: {ratingExample5.selectedValue}"
    />
    </mx:VBox>
    </mx:HBox>
    </mx:VBox>
    <mx:filters>
    <f:DropShadowFilter xmlns:f="flash.filters.*" alpha=".3" distance="1" />
    </mx:filters>
    </mx:HBox>
    </mx:Repeater>
    <!-- If I move the rating control to this line it works properly -->
    </mx:Tile>
    </mx:Canvas>

    limitedwave777 Guest

  5. #5

    Default Re: Repeater makes component vanish.

    Bump - any takers yet? <controls2:Rating /> cannot be placed within repeater tags ? Dying to know why. App is online now, view source on. http://host1.fusiontools.net/~frutista/gallery/gallery.htm
    limitedwave777 Guest

  6. #6

    Default Re: Repeater makes component vanish.

    You can't refer to a repeated components id from within the repeater:
    text="Currently selected value: {ratingExample5.selectedValue}"

    There is no run-time component with the id="rating5Example".

    For complex repeated content, encapsulate all of the content in a single
    component. Pass the entire currentItem into that component. Then you can code
    normally, debug the code, dispatch events, refer to the item in the handler,
    etc.

    You will be able to use that id within that component.

    Tracy

    ntsiii Guest

Similar Threads

  1. Use component within the repeater
    By Capho in forum Macromedia Flex General Discussion
    Replies: 3
    Last Post: February 27th, 07:14 PM
  2. Files vanish when viewing through Dreamweaver
    By @ndyB in forum Macromedia Contribute Connection Administrtion
    Replies: 0
    Last Post: August 5th, 11:10 AM
  3. FH MX My settings vanish
    By margot-jo in forum Macromedia Freehand
    Replies: 0
    Last Post: July 21st, 10:48 AM
  4. Freehand 9 causes all desktop icons to vanish
    By envirographics in forum Macromedia Freehand
    Replies: 3
    Last Post: July 10th, 04:41 PM
  5. Layer styles vanish when psd image flattened
    By John Wasserman in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 6
    Last Post: July 14th, 08:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •