Manipulating mxml tags (view) in Cairngorm.

i have a cairngorm based app that consists of a tabnavigator
with 8 tabs. i need to set the visibility of tabs through app
initialization as well as through user gestures.
what's the best way to accomplish this? i have a function
that toggles tabs as i see fit; however, i need the
tabnavigators(view) id from the mxml tag. i can't get this to work.
besides, it's not the best practice to reference a view like that
through a command class, is it?
thanks in advance...
fd

No worries.
Also, be sure to read the Cairngorm series of articles by
Steven Webster in the ADOBE DEVELOPER CONNECTION site, if you
haven't already done so:
http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html
http://www.adobe.com/devnet/flex/articles/cairngorm_pt2.html
http://www.adobe.com/devnet/flex/articles/cairngorm_pt3.html
http://www.adobe.com/devnet/flex/articles/cairngorm_pt4.html
http://www.adobe.com/devnet/flex/articles/cairngorm_pt5.html
http://www.adobe.com/devnet/flex/articles/cairngorm_pt6.html
Happy holidays !

Similar Messages

  • Can I use variables in mxml tags?

    I want to control a lot of details in a layout.  I need to use variables to do this.  Of course I can use AS.  Is there a way to do it in the MXML tags?  See the code below.  I can do the "myLine.x = lineX" in AS.  But is there something like:  x="{lineX}" to use in a tag?  (This gives a warning, though it does work.)  It would make life faster if I could...   Is there a "right" way to do this?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   initialize="init()" >
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                internal var lineX:Number = 25;
                private function init():void {
                    myLine.x = lineX + 50;       
            ]]>
        </fx:Script>
        <s:Line id="myLine" xFrom="0" xTo="0" yFrom="50" yTo="300" >
            <s:stroke>
                <s:SolidColorStroke color="0x0000ff" weight="2" />
            </s:stroke>
        </s:Line>
        <s:Line id="myOtherLine" x="{lineX}" xFrom="0" xTo="0" yFrom="50" yTo="300" >
            <s:stroke>
                <s:SolidColorStroke color="0xff0000" weight="2" />
            </s:stroke>
        </s:Line>
    </s:Application>

    Hmm, thanks, that's very useful to know.
    I guess that means I should use AS.  It's not something I need to update often.  Rather, I have a whole bunch of groups of components/graphics that I want to line up based on each other--and when I change my mind about the size or position of one thing (possibly inside a container a level or two), I'd like to be able to just change one variable name rather than have to change them all by hand.  But AS can do it just fine.

  • Event handlers:  click in mxml tags or in AS?

    Is there an advantage to putting click event handlers in AS rather than in the mxml tags?  For example
    in AS
    button_1.addEventListenter(MouseEvent.CLICK, someFunctionName);
    or in mxml tags
    <s:Button click="someHandlerName(event) />
    Thanks

    I will say that there is another advantage to MXML.
    For instance, say that I have a static function I want to run any time you click a component and don't care about the event. I can do this in MXML:
    <s:Whatever>
    click="{doMyStaticMethod()}"
    </s:Whatever>
    In AS, I cannot do this. A click event in AS requires that I add an ActionListener and that the ActionListener be void and take an event. MXML gives a way around that if you like.

  • Custom AS3 Component / Event Definition for MXML Tag

    Custom AS3 Component / Event Definition for MXML Tag
    Exposing custom event in custom MXML tag.
    I have made an AS3 custom component named,
    'CustomListComponent'.
    Is a list type component extending UIComponent.
    When an item is clicked (selected) I generate a custom event
    named, 'selChange'
    I want the user to be able to use this tag, define a handler
    on the MXML tag.
    I tried using metadata like [Event("selChange")] in the
    component AS3 file with no luck.
    Any help / examples to expose a custom event from an AS3
    custom component to the MXML tag for the end user/developer would
    help significantly.
    Anyone? Thank you.

    Well, That did not take long.
    My mistake, Typo type.
    [Event(nane="selChange", type="flash.events.Event")]
    That is: naNe not naMe :(
    Thank you all for your time and responses.
    I WILL check my code more closely next time I post a
    question.
    P.S.: @VarioPegged : My code is big and not needed now. If
    you would like it anyway just message me. TY

  • [svn] 1153: ASDoc: minor correction to default style value in MXML tag syntax

    Revision: 1153
    Author: [email protected]
    Date: 2008-04-08 15:36:58 -0700 (Tue, 08 Apr 2008)
    Log Message:
    ASDoc: minor correction to default style value in MXML tag syntax
    Modified Paths:
    flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/ComboBox.as

    Running the script by python2 solves it for me:
    su - mythtv -c "nice -n 19 python2 /usr/bin/tv_grab_nl_py --output ~/listings.xml"
    Best regards,
    Cedric

  • Div tag viewing problem

    When I wrap a div tag around an image - I don't see that
    image in the "designer view"
    I do see it when I look at it in a browser.
    Isn't there some way that I should be able to see the image
    in the designer view?

    Hmm - I must admit, I've never had this problem. Can you tell
    me exactly
    what you are doing, please?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "jfsneumann" <[email protected]> wrote in
    message
    news:ebarml$517$[email protected]..
    > When I wrap a div tag around an image - I don't see that
    image in the
    > "designer
    > view"
    >
    > I do see it when I look at it in a browser.
    >
    > Isn't there some way that I should be able to see the
    image in the
    > designer
    > view?
    >

  • MP3 IDv2 Tag Viewer & File Renamer

    Just a simple perl script that views and renames files based on mp3 tags. It supports UTF-8. If any one interested check it out.
    Find ID3v2 tags inside mp3 files under linux/unix environment with perl and MP3::Tag module installed.
    Usage: ./mp3nfo.pl /dir/file.mp3
    Source: https://github.com/GoTux/Perl/blob/master/mp3nfo.pl
    You can also find exe/dll/ocx meta viewer script and few others if any one care: http://wiki.gotux.net/code
    Last edited by TuxLyn (2012-12-19 10:28:18)

    TuxLyn wrote:Alright, thanks mate. Move it.
    Done

  • Inconsistencies between an MXML tag instance's properties and an Actionscript instance's properties

    Hi everyone!  I've been using the SDK for several months, but I've only been using Flash Builder for a few weeks.  I finished the Flex In a Week videos and exercises a few days ago, and since then I've been playing around with the accompanying exercises.
    My question specifically refers to the PanelSkin.mxml file from 'Exercise 5.6: Creating custom skin properties'.  In this example, the function initTitleSkin() sets the 'headerSkinColor.color' property to a value passed from the main application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:s="library://ns.adobe.com/flex/spark"
        creationComplete="initTitleSkin()">
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>   
        <fx:Metadata>
                   [HostComponent("components.EmployeePortalPanel")]
       </fx:Metadata>
        <fx:Script>
            <![CDATA[
                private function initTitleSkin():void
                    headerSkinColor.color = hostComponent.panelTitleColor;
            ]]>
        </fx:Script>
    <s:Rect radiusX="4" radiusY="4" height="100%" width="100%" >
         <s:fill>
              <mx:SolidColor id="panelSkin" color="#E8E8E8"/>
          </s:fill>
    </s:Rect>
    <s:Path winding="nonZero" data="M 0.016 0.012 L 0.016 23.354 L 287.419 23.354 L 287.408 12.012 C 287.408 5.385 282.035 0.012 275.408 0.012 L 0.016 0.012 Z">
         <s:fill>
              <s:SolidColor id="headerSkinColor"/>
         </s:fill>
    </s:Path>
    <s:Label id="titleDisplay" lineBreak="explicit" left="10" right="4" top="2" height="30" verticalAlign="middle" fontWeight="bold"/>
    <s:Group id="contentGroup" top="23">
    </s:Group>
    </s:SparkSkin>
    This code works just fine.  I tried extending this example by setting the 'titleDisplay.color' property in the same way.  The 'titleDisplay' is an instance of the Label class.
         private function initTitleSkin():void
                    headerSkinColor.color = hostComponent.panelTitleColor;
                    titleDisplay.color = hostComponent.panelLabelColor;
    The above code results in the error 'Access of possibly undefined property color through a reference with static type spark.components:Label'.
    I set up the custom 'panelLabelColor' property and confirmed the 'hostComponent.panelLabelColor' property is being passed to the custom skin class correctly.  My question is, Why can I set the 'color' property in the MXML Label block, but not from the ActionScript instance.  The Language Reference shows the spark Label has a 'color' property.  Code Assist shows the 'color' property in the MXML block, but not in the ActionScript instance.  Am I missing something simple that's staring me right in the face?  I'm usually pretty good at that.  I'd appreciate any thoughts on this inconsistency.

    it's not likely.

  • Mp3 tag viewer with text encoding/decoding purpose

    I'm want suggest some idea:
    Let assume that we have many mp3 files with cyrillic or some else non ascii tags in different encodings. And let assume that each file may have several encodings (eg cp1251 for album and utf-8 for title). Programs like EasyTag is not convenient for such case.
    So idea: draw all tags for many files in simple table and decode what you want on the fly, independently for field, not whole file.
    ps I'm not like a programmer or so, so i dont know should i start new project or not. Here on my hands some very first script in python, pyqt, tagpy, chardet.
    github: https://github.com/LeoMirr/tagcoder
    screenshot: https://github.com/LeoMirr/tagcoder/blo … gcoder.png
    I dont know how to move thread so i stick to previous post
    Last edited by LeoMirr (2013-09-27 15:10:22)

    Because of zero attention for such idea in this topic and because i finally remove my messed up collection of music i decide to drop this git.
    PS. this program is just little sample end if no one is reply for idea and if it even doesn't need for me anymore creating is impossible. that's all : )

  • Mxml tag map to AS function

    How to do that? I can only map to public vars but i want to
    map to i function.
    For example i want to create a custom actionscript component
    with a button in it, and when i create this component in mxml to
    change the label of the button like this
    <comp:myCustomComp myFunction=myFunction("change
    label")/>
    Should i use setters and getters with a public var to change
    the label?

    Yes. Use getter setter then when you have the following the
    setter / getter functions are used:
    setter function executed
    <comp:myCustomComp id="myComp" label="Here is New Label
    Text"/>
    getter function executed
    <mx:Text text={myComp.label}/>

  • How do I hide duplicates in tag view in finder

    In finder, when I use tags, I see duplicate copies of many files. I have the iCloud version, the local copy in ~/Library/Mobile Documents, the local copy on my other machine in /Volumes/<other-machine-home>/Library/Mobile Documents, and another path to that other machine at /Volumes/<other-machine-HD>/Users/jason/Library/Mobile Documents.
    I have a similar problem for dropbox synced files (but without the iCloud version).

    You can't really "hide" content within the iTunes interface, though at a push you could mislabel some of your Music tracks as Audiobooks if you don't mind the wrong content showing up in that section of the library.
    Perhaps if you tell us the primary reason for wanting to hide things we might be able to suggest an alternative approach.
    tt2

  • Tag-View in Finder/Mavericks contains duplicates

    Tags are really buggy with my Finder.
    This is what it looks like when I click a tag, that i have put in the sidebar:
    Most files are displayed multiple times
    Some files don't have the tag displayed, even though GetInfo shows that the file is properly associated with the tag.
    Things I've tried:
    rebuilding the spotlight-index
    restarting finder
    trashing "com.apple.finder.plist"
    repairing disk-permissions
    repairing disk
    No solution so far, this is really bad!

    I have the same issue on my rMBP 15". I reported this as well during the open beta. I went back to my Mavericks backup because I though it might have to something with the installation. Now I installed the final and the problem is back.
    Sometimes the files do show up but the name tag is distorted and interacting with them, e.g. selecting them, opening folders, works but Finder will still show the files with the distorted names although I'm already in another folder. I made some screenshots.
    Already reset the PRAM, repaired the drive and permissions with no effect.
    Edit: it happens very randomly when opening folders or new finder windows. The only thing where I can see regularity is when unzipping a file – that folder will initially always be broken.

  • Mp3 tag viewer with encoding/decoding purpose

    I've got some idea about my mp3 collection: there is many files with cyrillic tags in different encodings, and furthermore each file may have tags in different encoding ( it is ugly mess ). So i can not use programs like EasyTag or tag2utf etc.
    What i can is to print every field in every tag in every file, list it in front of my eyes, and if i catch some buggy text, select appropriate encoding for only this filed. Also i can use chardet to pre-encode stuff.
    I've wrote simple script in python2 that use pyqt, tagpy and chardet. It has sortable table and editable fields and some other stuff, so you can open some files ( many many file like in my ugly collection ), unhurriedly scaning it with eyes for bugy text and correct what you find wrong.
    And what is the question? Is anyone in there need it?
    ps sory for my english.

    Welcome to the forums. For the future, you can use report to ask a moderator to move your thread. Closing this thread; please continue here.

  • Nested MXML Tags of Same Type not Closed Automatically

    Suppose you have a VGroup tag, and you want to nest another VGroup inside of it. In earlier versions of FB, as soon as you typed the closing '>' character, FB completed the whole tag for you:
    <s:VGroup>
         <s:VGroup>
         </s:VGroup>
    </s:VGroup>
    However, this doesn't work anymore. This issue happens when the two tags are of the same type. An HGroup inside a VGroup, for example, autocompletes fine.

    Hi,
    This is known issue http://bugs.adobe.com/jira/browse/FB-33477.  Thanks for posting the issue.
    -Divith

  • Font size manipulation in Month view

    I was looking for a way to increase the font size in iCal, and realised that as yet nobody at this forum has come up with a way to do it in OS X.
    However, since I just saw with my own eyes the different font sizes in iCal in two different user accounts on my MacBook, a bit of detective work led to the following discovery which I hope may prove helpful:
    Download and install the wonderful and free utility TinkerTool which will unlock all sorts of possibilities on your Mac. (Mr. Bresink recommends installing it in your Applications/Utilities folder.)
    By increasing font sizes in TinkerTool, I find that both the list of calendar types (left column) and the date & appointment time in the Information panel (right column) become much more legible. Alas the entries in the main Calendar itself as well as in the Notes in the Information panel still make me squint... (Please forgive if I'm not using the right English terms for 'calendar types', 'information panel' or 'notes' as my OS X is in French...)
    Perhaps some of you good folks could play around with TinkerTool and come up with a 'real' solution?! if so, please post back!
    MacBook/G4 iMac   Mac OS X (10.4.8)  

    I would strip this site back to basics by removing all font sizes in your CSS.
    Then avoid %.
    Re-build font sizes just using px.
    Don't mix units (ems, % etc) until you have a consistent baseline and reason for doing so..
    Pt is solid and reliable on paper. Px is solid and reliable on screen.

Maybe you are looking for

  • How do you change your apple id on your iphone 5

    how do you change your apple id on your iphone 5. I also increased storage and cannot update to latest software upgrade! ANNOYING!!!! Yes, I logged in and out of the Ap Store and it is correct on that end. I have signed in on my PC too and connected

  • Problems with my new MSI N580GTX-M2D15D5/OC Please help

    Hi, purchased the above card from kuala lumpur, Malaysia on the 19th February 2011 when I visited Malaysia. Installed the card on my Core i7 950 rig. My card is MSI N580GTX-M2D15D5/OC 3DMark 11 edition. Had issues installing the card, blue screened m

  • Connection between 2 points in a geodetic coordinate system

    In a geodetic coordinate system the connection between two points is a geodetic line or "great circle" (the shortest connection between two points on the surface of the earth). Since Oracle 9i distances and queries like "Is a point outside or inside

  • POL-3013 Message file is not loaded

    Hi, I have posted a publication to the server and I have succeeded also. I am able to update some tables that I have created. When I rebooted my machine I founded a popup message DMAgent failed to start during the startup. When I try to login to the

  • Offsetting Account Description

    Dear All, In FBL*N, we get fields for Offsetting account. But it does not show the description of offsetting account. How can i add field for offsetting account description Regards, Shreya