Simple question of the DataGrid selection...

I have a simple datagrid that is filled by a HTTPService...

I want to return an Alert.show ("Please select point databagrid'"); If a user has NOT selected one of the items in the datagrid... Seems simple, but for some reason any one can understand...

Any suggestions?

If you look in the removeModule function, you access the mm.selecteditem.id property and the property of the system, THEN you check to see if it is null.  You need to put the control in front of the var null: string title... because they will error with an error "access to the property of a null object" that you said earlier.  As the written code will run never If(mm.selectedItem == null) code, because if mm.selectedItem is null, it would have already returned an error.

Mark

Tags: Flex

Similar Questions

  • simple question: is the f2280 a printer/scanner wireless?

    Simple question: is the f2280 a printer/scanner wireless?

    This widget could not be displayed.
  • I have a simple question about the meta-data.

    Hello. It is a simple question about the meta-data. How can I get the video bitrate of a flv or mp4 (video playing via NetStream file) file

    right now I have this:

    Code
    var netClient:Object = new Object();
    netClient.onMetaData = function(meta:Object)
    {
    for (var in meta props) {}
    trace (props + ":" + meta [props]);
    }
    MovieClip (root) .durations = meta.duration;
    trace (MovieClip (root) .durations);
    };
    NS.client = netClient;

    And my output is:

    videocodecid: avc1
    audiocodecid: m4as
    aacaot: 2
    Width: 960
    AudioChannels: 2
    videoframerate: 23.976
    TrackInfo: [object Object], [object Object]
    moovposition: 32
    avcprofile: 77
    audiosamplerate: 48000
    avclevel: 31
    seekpoints: [object Object], [object Object], [object Object], [object Object]
    height: 540
    Duration: 221.312

    As you can see, there is nothing of video bitrate.

    I know that the video bitrate of my videos, but then I have to manually type each number of bitrate into my flash project, and it would be such a fuss when I have a lot of videos. Would be nice if flash can detect the video bitrate.

    It's for my online portfolio.

    Why you divide by 8?  If you want to convert bytes into bits, multiply by 8.

  • Question of the Datagrid/accordion/master / detail

    I have a simple little application that I am trying to go. Available is an accordion with 3 components, each component has a Datagrid filled from MySql based on the WHERE clause of the same table (so each row on the grid of data regardless of component has the same structure). I can fill a panel detail or points of a single pane/Datagrid (ie. dg1.selectedItem.field) with a hardcoded DataSource. What approach would be to allow the Panel/form to be filled with all the Datagrids (dg1, dg2, dg3) without having to duplicate the code 3 times. I am VERY new to OOP but trying. Thanks in advance for any help and advice.

    "EWN - CMI" wrote in message
    News:gjc9pq$SHT$1@forums. Macromedia.com...
    > Yes, you figure you might reassign, but either I didn't
    > How
    > to do (arrayCollectionvar1 = arrayCollectionvar2).

    No, which will only create two tables that link to the same table.
    What you need to do, it is something like:

    private var ac1:ArrayCollection = new ArrayCollection();
    private var ac2:ArracyCollection = new ArrayCollection();
    private var ac3:ArrayCollection = new ArrayCollection();
    private var arrayToLoad: ArrayCollection collection;

    private function sendService (): void {}
    send your service here
    ...
    arrayToLoad = ac1, ac2 //or or ac3
    }

    private function onServiceResult (): void {}
    arrayToLoad = event.result;
    No matter what picture said you it load is now loaded with the result
    }

    But honestly, I wonder if you would be better to simply load all
    in an ac and using a filterFunction function to take the place of the place WHERE
    clause.

    > I finally created a
    > second connection and managed to make it work. Thanks for the help.

    You should probably refactor now and fix it ;-)

    > NOW - a really weird problem (I'm so late in this part).
    >
    > / / Extract the image associated with the item selected in the grid
    > private function getImage (): void {}
    > var cartGrid:DataGrid = dg.
    > var imageSource:String = ' assets /' + cartGrid.selectedItem.statsfile;
    > var movieSource:String = ' assets /' + cartGrid.selectedItem.moviefile;
    > / / swfLoader.load (movieSource);
    > stat.load (imageSource);
    > }
    >
    >
    > backgroundColor = "#D3CDB4" borderStyle = "framed" backgroundAlpha = "0.5".
    > borderColor = "#020202" >
    >
    > complete = "swfLoaded (event); » />
    >
    >
    > If I Uncomment the swfLoader line in the function, I get an error
    > #1009:
    > Cannot access a property or method of a null object reference.
    >
    > If I remove the code and test it - it works fine. I don't have a clue
    > since
    > This should be pretty basic and it drives me crazy.

    Probably a timing issue. Make sure that the swfLoader actually exists before you
    address it. Without more information about what is happening in your code, I can't
    speculate as to what might be the problem of synchronization.

    > Simple get another question, how in Flex a new 'compile' each
    > time,
    > it seems that some changes are not displayed the first time that the application is
    > generated
    > after a code change?

    Check project > build automatically

    HTH;

    Amy

  • Simple question on the passage of ID variables in a url after you add a new record

    Hello;
    I know it's a simple question, I have a brain block. I'm going from a form and insert a new record in the db, but after I insert the new record, I want to pass the ID variable that gets are entrusted to him. How can I do this?

    It's my code to insert:

    < cfset EventDate = "#DateFormat(form.eventDate,"mm/dd/yyyy") #" >
    < datasource = "" #APPLICATION.dataSource # cfquery "dbtype ="ODBC">"
    INSERT INTO events
    (title, eventDate, eventTime, location, contact, telephone, fax, email, URL, sponsor, body)
    VALUES (< cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.title #" >,)
    < cfqueryparam cfsqltype = 'cf_sql_date' value = "" #EventDate # ">,"
    < cfqueryparam cfsqltype = "cf_sql_time" value = "#form.eventTime #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.location #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.contact #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.phone #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.fax #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.email #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form. "URL #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.sponsor #" >.
    < cfqueryparam cfsqltype = "cf_sql_longvarchar" value = "#form.body #">) "
    < / cfquery >
    < cflocation url = "events_RecordView.cfm" >

    In the cflocation I want to pass the variable ID, how about a new record?

    Thank you.

    CFmonger

    Try this. This will select in the query exactly what was inserted just enter the id and pass id just to get in the variable. If two people fill out the form at the same exact time, that assure that they are redirected to the appropriate page.

  • Simple question about the signing of the app

    Hello.

    I develop libraries to be used in other apps.

    It will be a cod file, its name will be added to the jad as a dependency.

    My library has access to the secure API (call of the browser), so I have a simple question:

    can I register only my cod library or application that uses my library is expected to be signed in too?

    THX.

    You should be ok just signature cod of the library, if your application uses any API secure. However, I just make a habit to sign everything just in case.

  • Newby question about the Quick Selection tool

    I have what I think must be a simple background to remove a portrait.  This photo was taken near a white wall and a flash shadow was precipitated on the left.  The quick selection tool has no problem of selection of wall area in a mask.  The problem is when you try to register the shadow of the hood.   He has no problem with the hair.  There is a color difference evident between the hood and its shadow and its quite a different gray in the red channel.  Is it possible to adjust the tool quick selection to recognize different color or gray?

    TIA.

    Open the document you want to move to the first.

    Then return to this document (as in the screenshot), right-click on the selected layer in layers, "Duplicate layer", select the document target destination, press OK. Your layer, so that the mask is moved to the new document.

  • Color of text in the DataGrid selection

    In the style of my application, I used CSS to set the color of text for the selected lines in a datagrid control by using the following:

    DataGrid {}
    textSelectedColor: #ffffff;
    }

    When I compile and run the application, clicking on a data line sets the color of the text to white, but if I click on another line, the previously selected line remains white, and lines newly selected remains black. Is this a bug in the system, or have I missed something?

    Found the bug and workaround full info here:

    http://www.Adobe.com/cfusion/knowledgebase/index.cfm?id=7e26ee37

  • Simple questions on the earphones of events and memory management

    I am brand new to AS 3.0 (have not coded in 10 years!) and I have a two part question on the management of event listeners.

    1. is it possible to use variables or loops to simplify the process of creating event listener? For example, I have a scene that animates the leaves when they are hit. There are 25 or more leaves, so I need to handlers of 25 and 25 functions, even if the animation is the same. Right now my code looks like this:

    leaf1.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf1);
    leaf2.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf2);
    leaf3.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf3);

    etc. And then the functions all alike as well.

    function animateLeaf1(e:TouchEvent): void {}
    leaf1.gotoAndPlay ("animationStart");
    }

    function animateLeaf2(e:TouchEvent): void {}
    leaf2.gotoAndPlay ("animationStart");
    }

    etc. My instinct tells me there is an easier way to do this, but I don't know if it's just because I see a model and want to put it in a loop or if there is really a better way to do it. I have event listeners are doing right?

    2. How can I clean my waste? Each of my frames will have 100-300 earphones of events inside, for animations, etc., mainly because a single button can have 3-5 event listeners (touch Start, end touch, touch roll on, roll off touch, etc.). Is this too much for a mobile device to manage? When can I disable event listeners to make sure that they are the garbage collector to release the memory? I don't want memory leaks, but the event listeners must be active when the frame is active and destroyed when the setting is inactive; I don't know how to program which, or if such a garbage collection is already inherent in Flash.


    Thank you very much!
    Amber

    leaf1.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    leaf2.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    leaf3.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    leaf4.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    function animateLeaf(e:TouchEvent): void {}
    e.currentTarget.gotoAndPlay ("animationStart");
    }

  • simple question for the first time the user: someone please be a hero

    Forgive the restorative nature of this question but the FM help files are surprisingly usless for the first time and users.

    I did successfully a rectangle graphic.  Now, I want to put some text in the rectangle.  I see that I can't just click on and type.  Apparently I have to, I don't know, do a "framework" of text or something?  I don't see why this is so complicated or why the help docs do not begin at the obvious base.

    Please throw me a bone and wander if this.  I use 9 FM, but I am sure that the version is not serious.

    Thank you!

    There are two possibilities to place text on a chart.

    One is to use the "text tool" in which you can type a string of text whenever you click on the slider.  You can format the string, but you cannot apply a character tag or a paragraph tag. And you can't put a carriage return make several lines; to do this, you need to add the additional lines of text.

    The line of text tool is the letter 'A' that appears in the icons when you consider > toolbars > toolbar graphics.

    Second method is to create a text frame, and then type in it. You can apply paragraph tags, tags of characters, use of CRs and so on in a text frame.

    Text frame tool is the small square with several lines in, just above the "A" icon in the Graphics toolbar.

  • Simple question on the subset of the array

    Well guys, I have a table with a number of 1000, and I want to divide it into 10 tables with 100 numbers

    My question is:

    In the subset of the table, I can put the index and length, in the first subset of table, I put index 0 and length 100, I think it will start at index 1, since 0 does not exist, right?

    then in the next I set 100 index and he will leave the index 101, or I have to put the index 101 to start in 101?

    because the length will always be 100.

    Example:

    1000/10 = 100

    So I have to create 10 tables with 100 numbers each

    Sincerely,

    Eduardo

    LabVIEW arrays are 0 based, so the first element has index 0. 101 item has index 100. So yes, you must specify the 100 index and length 100 for obtaining 101.200.

  • Question of the insertion-selection

    Hi all

    I need help with this issue:

    [code]

        with table2 as
    (
        select 'N' col1,1 NR from dual union all
        select 'N',2 from dual union all
        select 'S',3   from dual union all
        select 'S',4  from dual union all
        select 'S',5 from dual union all
        select 'N',6  from dual union all
        select 'N',7  from dual union all
        select 'S',8  from dual
       )
       
            INSERT INTO table1 aa
            SELECT        
                CASE
                WHEN pl.col1 = 'N'   THEN '10'
                WHEN pl.col1 = 'S'   THEN
                                 ............
                                 .....
            FROM table2 PL 
            WHERE ....
    

    [/ code]

    Table 1 has a column

    How can insert into table 1, the value

    [code]

            insert '10' into first(1)  row of table1 when DML process first row of table2  AND has in col1=N
            insert '10' into second(2)  ......
           
                 insert '11' into (3) row of table1 when DML process 3 row of table2 and has in col1=S (it should be 11 (10 inserted in previous row(max value in table1)  and sum + 1)
                 insert '12' into (4) row of table1 when DML process 4 row of table2 and has in col1=S (it should be 12 (11 inserted in previous row and sum + 1)
                 insert '13' into (5) row of table1 when DML process 5 row of table2 and has in col1=S (it should be 13 (12 inserted in previous row and sum + 1)
            insert '10' into (6) row of table2
            insert '10' into (7) row of table2
                 insert '14' into (5) row of table1 when DML process 5 row of table2 and has in col1=S (it should be 14 (13 inserted in previous rows because max value in table1 is 13 and sum + 1)
    

    [/ code]

    It is my goal in table1:

    [code]

    1--> 10
    2--> 10
    3--> 11
    4--> 12
    5--> 13
    6--> 10
    7--> 10
    8--> 14
    

    [/ code]

    Thanks in advance for any help

    Hello

    You can use the ROW_NUMBER analytic function to generate consecutive numbers.

    Here's a way to do what you asked:

    INSERT INTO table1 (num_1)

    SELECT THE CHECK BOX

    WHEN col1 = ' don't

    THEN 10

    ANOTHER 10 + ROW_NUMBER () OVER (PARTITION BY col1

    ORDER BY NULL

    )

    END

    FROM table2

    ;

  • A seemingly simple question about the free transform tool.

    I have always used the free transform tool where the thing that turns in the background, and the transformation automatically makes a new layer. How can I do if the transformation will not cause a new layer, and it won't be the thing in the background which has been transformed to the original?

    I noticed that with other people, it is not the thing that has been transformed in the background, so they have to deal with him.

    Edit - Transform does not a new layer automatically AFAIK.

    Any chance you've been making is something like this?

    1. duplicate the layer with the tool move, possibly by holding down the Alt (or Option) key while dragging with the mouse.

    2 to see the transformation of the controls is enabled for the tool move, which means that the show handles when the move tool is selected and immediately, it would be possible to transform what has been moved / duplicated.

    -Christmas

  • simple question about the condition

    I have a simple code:

    function fl_TouchEndHandler_v(event:TouchEvent):void

    {

    event.target.stopTouchDrag (event.touchPointID);

    var targets_v;

    var obj_v = event.target;

    event.target.stopTouchDrag (event.touchPointID);

    targets_v = (obj_v.DropTarget.parent)

    obj_v.x = targets_v.x

    obj_v.y = targets_v.y

    trace (targets_v.Name);

    my_sound_v.play ();

    I need to write a condition (if or while) that will do something if my sound does not play (for some reason any).

    Find the Sound class in the Flash help documents.  In the section covering the load() method, there is an example that uses a try/catch approach, but also an event listener...

    try {}

    SND. Load (req);

    SND. Play();

    }

    catch (err: error) {}

    trace (Err.message);

    }

    snd.addEventListener (IOErrorEvent.IO_ERROR, errorHandler);

  • Simple question about the race of the Illustrator borders - help please!

    Hello

    I'm new to Illustrator, and I can't understand something.

    I have a simple rectangle with a fill color, say red and a color of outline of us Let's say blue. Then, I use the drop down menu on the horizontal tool bar options change the race of a simple contour to something that looks more like a decorative edge. In CS4, I use the last option on the drop down menu, which has to stroke brain/border corners around the inside of the curve. When I chose this option, the filling remains as a rectangle with sharp corners that 'out' where the accident vascular cerebral/border curve inwards.

    I would like to know how to keep the race/border while getting rid of corners of the rectangle that die. I tried the erasure of the rectangle, but negatively affecting the border/stroke shape.

    Thank you very much for your help.

    David

    There are a few ways (or maybe more) to do. Both involve separating the object into two parts, one with a fill and no respect and the other of a sudden and no fill. Make sure that the trace object is on top and apply the brush line, then lock it. Add and remove anchor points at the four corners to get the below form (magenta rectangle) that will be hidden by the brush line. You can also do it using object > decaying appearance to generate the two forms of the original.

Maybe you are looking for

  • Scanner seems to prevent initialization

    I got a used HP Officejet Pro L7780 all-in-one. I got it home, plugged into the wall outlet, seen pictures of faxes/scans/documents printed as well as the time, date, ink levels. I got the Panel to display in English, then went to configuring wireles

  • Battery high capacity for X60s

    On my X60s original battery died and I decided to buy the battery high capacity for it. I bought the battery 8 cells (40Y7003) the Lenovo Web site suggested according to my model number, but it does not fit! It corresponds to the binding, but it is t

  • Why have I not Outlook?

    I had a Hotmail account, then one day all of a sudden, it changed to Outlook. I never signed up for Outlook. I prefer Hotmail. How to get back to my simple Hotmail account?

  • Convert table 2D 1 d array of cluster of 2 elements

    Hello I would like to convert a 2D 1 d array of 2 elements cluster table, and I don't know how to do it. I use ImageToArray IMAQ for a 2D like this picture: 0 0 0 255 255 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 255 255

  • How adjust the tint or color of a highlighted selection inactive in Windows 7?

    I'm looking on how to adjust the color and the shadow of a selection inactive in Windows 7. Try to understand what I'm after: Explorer of files open in a window that is not maximized not so you can still see part of your office.Left click on any file