List Function Syntax

I feel so stupid asking some of these questions because I
just came out of a semester of Director MX2004 and I feel like I
should know this...but it really wasn't addressed in class.
I'm trying to make Director check a list for a set of items.
For example, a list of numbers [1,3,4,1,1,6]. I want the program to
check for a specific set of numbers [1,1,1] so that it will trigger
a specific response. I know how to trigger the response using an on
mouseUp handler, but I can't figure out how to make it check for
the sets of numbers I need.
It's a dice game. The player uses a mouse click to roll 6
individual dice. The results (like 1,3,4,1,1,6) show up in text
fields above the roll button. The player then chooses which dice to
keep. From what was kept, the program figures a score and then (if
applicable) gives the player a chance to roll again with the
remaining dice. What the player keeps from the second roll is added
to the first score.
I can make it roll [random(6)] and put the result into the
field and I can even make it add all the field contents to a
list...but I can't make it check the list for patterns.
Am I making any sense at all? I feel like someone's going to
say "go back to the sandbox, little girl, you don't have enough
experience to be here" but I'm too frustrated not to ask.
Taking a Risk,
Shadowhawk's serenity

Handler: a separate chunk of code that you can execute. In
other programming languages it might be called a method or a
function.
Parameter: an item of data that you send to a handler. In
other languages, this might be called an attribute.
In my example "FindPatternInList()" is a handler, and "aList"
and "aPattern" are parameters.
Depending on what type of data you pass as a parameter, the
data may be the original data or a copy. The technical terms are
"reference" and "value". If you pass a list as a parameter to a
handler, Director will pass the original list. Any changes to that
list in the handler will affect the list anywhere else it is
referred to. Lists are "passed by reference".
Strings, on the other hand, are "passed by value". Director
will make a copy of the string and the handler will work on that
copy. The original string will not be affected.
Suppose you want to change the original string. In that case,
you must return the modified copy. Example:
aString = "This is "
aString = Concatenate(aString, "a string") -- the equals sign
places a new value in aString
put aString
-- "This is a string"
The Concatenate() handler might look like this:
on Concatenate(aString1, aString2)
put aString2 after aString1
return aString1
end
If you comment out the line "return aString1" above, then
aString will become <Void>, as no value will be returned from
the Concatenate() handler.
Variable names (and parameters are variables) are merely
human-readable labels that refer to the place in the computer's
Random Access Memory (RAM) where the beginning of a particular
piece of data is stored. When you pass a list as a parameter,
Director actually passes this memory address. You can thus have two
or more variables which "point" to the same chunk of memory. If you
use one variable to change the data at that memory address, the
other variable will instantly see the same change.
This is true of all "objects": lists, points, rects,
instances of Parent Scripts, images, sprites, members, colors and
so on are all objects.
Strings, floating point numbers and integers are not objects.
They are "primitives". When a primitive is passed to a handler,
Director copies the data from its current memory address and
creates a new copy at a new memory address. Because both objects
and primitives look like variable names, it is not immediately
evident whether the data is an object being passed by reference or
a non-object being passed by value.

Similar Messages

  • How to setup a mailing list function bar

    I'm wanting to know what is the best way to add a mailing list function to an ipad magazine I'm creating. Is it setup as an email button? I'm not 100% sure on how to go about doing it. I've attached a photo of what I'm talking about.
    thanks,

    I would create an html form that submits to my web server where I would process the information and store the form value in a database.

  • Receipts view RRP4 can default open standard list functions on

    When you use the receipts view
    /SAPAPO/RRP4
    when selecting large data sets, it takes a while to open, but THEN when you click the PLUS to open all the features within, like being able to FILTER, which is the bitton
    standard list functions on
    Then it seems to reload everything again and take the same amount of time again.
    Is there a way to default this option open, so that it opens with the function on so that you dont have to take twice as long to open each time to get to the filter?
    thanks
    John

    Hi John,
    Are you looking for something like this:
    This is what the APO help said:
    Key to Limit the Selection
    Defines a further selection.
    Use
    Using the input help select one of the entered selection rules.
    Dependencies
    The selection rules made available by the input help are defined in
    Customizing for the product planning table under Maintain extended
    selection.
    You correspondingly modify the Business Add-In (BADI) /sapapo/ppt_select  
    for the selection of the data.
    Thanks and Regards,
    Mariano

  • Documentation for RS_EU_CROSSREF (where-used list function module)

    Hi,
    I'm trying to understand how to use the "RS_EU_CROSSREF" function module.
    It corresponds to the where-used list function you find in so many SAP screens.
    I need to use it in a program, but I can't find any good documentation about it.
    I'd like something that tells me what values I have to fill in parameters.
    For example, how to search form "TEST_FORM" in all programs ? or even in a given program, I didn't get how to restrict the search to a program...
    Thank you for any help,
    Quentin

    Hi Gurpreet Singh,
    table cross does not find any function modules although I know for sure that there are function modules calling the function module.
    Please post an example of how to find function modules calling a function module with RS_EU_CROSSREF.
    /Elvez

  • If Choose from list function included after SBO 2004 patch 31?

    Hi, there
    I know Choose from list function valid in SBO 2005, but I don't know if it is included in SBO 2004, especially after SBO 2004 patch 31?
    Thanks.

    Hi Indika,
    You are right - the Choose from list is only available from SBO 2005.

  • Get Shared Variable List function

    I have created a Project; when I use "Get Shared Variable List" function, I'm enountering this error: "Error 1055 occurred at Property Node in Mechanical Room1.lvlib:MechRoom5.vi; Object reference is invalid". I've just connected the name of the process the shared variable is belong to. The vi is also in this Project library. I appreciate any help.

    Hi,
    I've created an example vi which should help out. It gets a list of all processes deployed, and then returns a list of variables for each of those processes.
    This should help to make sure that you are specifying a valid process name to the function, as this could be the cause of the error.
    Try running this and see if you get the same error. If you do then can you post your project files, or a smaller project that still shows the problem, and I'll take a further look at this for you.
    Regards
    Hannah
    NIUK & Ireland
    Attachments:
    get variables.vi ‏15 KB

  • Calendar...list function shows only events for date select instead of events from that date forward.

    Calendar list function shows only events for date selected....instead of events for date selected and events forward from that date.  Is there a setting change needed?  Help!

    Hi,
    Did you check that your universe object referring "Date of Completion" has Date data type?
    Can you also provide the BOE verson you are using?
    I remembered that the calendars were not displayed in XIR2 version.
    Didier

  • Unknown error code 13014 on iTunes 8.0.2-genius play list function is dead

    After I upgraded my PC, I copied old libraries and music files from the old hard drive to the new one. I installed the newest version of iTunes (8.0.2) and when I plugged in my ipod, I saw something I had never seen. Guess what it is?
    'Unknown error code 13014!'
    I had no problems for using every function that my iPod touch and iTunes have (including Genius play list) and of course, I've been updating every version of firmwares and iTunes programs. After I googled about this incident, I figured out this problem should not be seen on the newest version of iTunes but I'm still suffering from it.
    Temporally, I turned off Genius Play List and now, that error code doesn't pop up but of course, I can not use Genius Play list because of it.
    I *uninstalled and reinstalled iTunes*, *restored firmware*, *moved Library Extras & Genius.itdb* and *do them again and again*. Of course, *none of them worked*.
    What shall I do? Is there anyone else who is experiencing same thing to me? How can I get my Genius Play List function back?
    Please Help me. I'm desperate. :<
    Any help would be really appreciated.

    We have the same problem! i just purchased an ipod touch and that same error kept popping up. so i searched, and disabled the Genius, and now i can't use it. im really mad. and sad.
    im thinking about going to the apple store to fix this problem.. but i dont know if theyll help me.. plus, do i have to bring my laptop with me to the apple store? OMG. apple is so frustrating!!! i feel your pain !!!!!!

  • Listing functionality in MSA 7.0

    Hi,
    My customer has used the listing functionality in MSA 4.0 and he wants to continue with listings in the 7.0 version. I am wondering if the model has changed as I can see a higher level of integration with CRM Online and R/3. I also know that SAP wanted to replace listings with PPR.
    Does anybody know if I can migrate listings 100% from 4.0 to 7.0 or in other words use the same businesslogic in 7.0 as in 4.0?
    Regards
    Whity

    Everything is still available and working fine it just has to be made visible on application level - despite SAP's feedback that the old Listing component is no longer supported and has to be replaced by PPR!!!!

  • Where did the iPhone Calendar list function(s) go with iOS7? The Calendar has gone all 'spread sheet' on me and definitely not user friendly. Please advise.

    Where did the iPhone Calendar list function(s) go with iOS7?  The Calendar has gone all 'spread sheet' on me. If you select an item (grey dot) from the month display it will open up the 'spread sheet' at the current time of day, not necessarily when the calendar entry takes place.  I liked iOS6 where you could turn your iPhone to landscape mode and get that special 'spread sheet' feel if that's what you're into.  Has a 'List' presentation been removed from the iPhone Calendar with iOS7?

    The List view is displayed by tapping the Search magnifying glass.

  • Generate Page List Function

    Can anyone let me know where to launch the 'generate page list' function? I am developing a module based on strict coding from the client. The instructions tell me to delete code where they've marked it and then generate using the "Generate Page List" function. It is supposed to list the pages, in order, that make up the entire lesson.
    I attached an image of what the Generate Page List window looks like. Someone please help!!! Thanks in advance!

    I never got it. Which is why I was asking the forums how to access it. There were specific instructions given by our client and within these instructions they say to generate using the 'Generate Page List' function. The instructions are as follows:

  • List of Syntax and Functions

    Hi All,
    Can you please let me know where can i get all the syntax and functions to write reports in Siebel Analytics.As i don't know many functions, i end up writing bigger queries.
    Quick response is highly appreciated

    Hi Mike,
    Thanks for the quick response....
    Do we have any BETWEEN function which should work like this.
    If the count is between 0-40 then RED1
    If the count is between 41-60 then Red2
    Regrads,
    BK

  • Guest list functions, questions, etc.

    Hey everyone,
    I've only just started using Numbers today, so a lot of the forum posts about functions and so on didn't make much sense to me. Now, what I'm trying to do is the following: I'm trying to create a guest list for a party and a pie chart with it to show the female/male ratio attending. Now, I've just popped in a picture of what I have done so far:
    As you can see, I have added check boxes for attending and for the gender of the respective guests. Now, what I wanted to find out was the total amount of guests attending (including people that guests are bringing along -> number of attendees). So I put the function "=SUMIF(attending;TRUE;number of attendees)" into I11. I got this function from the Event Planer template in Numbers. So now every time I tick someone's 'attending' box, the sum changes and gives me the number, which is great! But what I now want is two seperate sums for women and men, so that I can use that information in the pie chart. So what I want is a similar function as the one above but with two conditions: that the person's 'attending' box is ticked and that, in the case of the sum for the women, the person's 'female' box is ticked and the other way around for the sum for the men. Then in the fields 'C11' and 'D11' I'd have the total number of women attending and the total number of men. So if anybody could give me a SUM function with those two conditions, I'd be grateful. I've been fiddling with adding plusses and changing the function to a SUMIFS function but I always get syntax errors or other problems.
    My second question is whether anybody knows a way of adding two check boxes to one field, so that you tick one and then the second one is automatically unticked. A 'one or the other' choice, so that you don't have a situation like the one displayed on my picture, that Megan Fox is both male and female does anyone know of a way to insert two check boxes into one field and making only one of them 'choosable'?
    Thanks in advance guys!
    XtremeFluX

    XtremeFluX wrote:
    Hey everyone,
    As you can see, I have added check boxes for attending and for the gender of the respective guests. Now, what I wanted to find out was the total amount of guests attending (including people that guests are bringing along -> number of attendees). So I put the function "=SUMIF(attending;TRUE;number of attendees)" into I11. I got this function from the Event Planer template in Numbers. So now every time I tick someone's 'attending' box, the sum changes and gives me the number, which is great! But what I now want is two seperate sums for women and men, so that I can use that information in the pie chart. So what I want is a similar function as the one above but with two conditions: that the person's 'attending' box is ticked and that, in the case of the sum for the women, the person's 'female' box is ticked and the other way around for the sum for the men. Then in the fields 'C11' and 'D11' I'd have the total number of women attending and the total number of men. So if anybody could give me a SUM function with those two conditions, I'd be grateful. I've been fiddling with adding plusses and changing the function to a SUMIFS function but I always get syntax errors or other problems.
    From my point of view, there is no need for two columns attending / not attending. A single 'attending' one is sufficient
    Same thing for genders.
    As far as I know, a single box (choose the one which you want) would be sufficient.
    Your problem is not completely defined.
    If I read correctly, there is no way to know the gender of the person(s) accompannying a given one so there is no way to calculate correctly the number of each gender.
    My second question is whether anybody knows a way of adding two check boxes to one field,
    This unavailable feature would be better done with radio buttons .
    In this table There are two header rows and two footer ones.
    In C11, the formula =COUNTIF(C,TRUE) calculates the number of male guests.
    In C12, the formula =COUNTIF(C,FALSE) calculates the number of female guests.
    In F11, the formula =COUNTIF(F,TRUE) calculates the number of attending guests.
    In F12, the formula =COUNTIF(F,FALSE) calculates the number of non attending guests.
    In G11 the formula =SUMIFS(G,F,TRUE,C,TRUE) calculate the number of attending persons whose guest one is a male.
    I guess that you encountered problems with SUMIFS because the parameters are not ordered as they are for SUMIF.
    Read carefully the descriptions of both functions in iWork Formulas and Functions User Guide
    Yvan KOENIG (VALLAURIS, France) samedi 9 janvier 2010 19:33:13

  • New iTunes "wish" list function Removed

    I'm hoping somone might be able to offer a suggestion to help get my workflow back since the new iTunes 11 release has removed my most useful feature. 
    I am a DJ and spend a good 6-8 hours a week creating playlist, partly managing the music I own and partly locating songs in the itunes store.   What I used to do:  If I didn't own a song, I'd locate it in the itunes store, drag it into a general playlist where I could move it around (unpurchased) to other playlists and when I was done I could go through my playlist and purchase the songs that I wanted to. Many people never knew this was possible. This streamlined the process and allowed me to give the boot to songs that I didn't think were worth the purchase (when purchasing 20-40 songs a week, every $1.29 counts!)    I learned of this function from apple years ago... They didn't promote it much, but it was a function they built in to allow people to do just what I did... create a list and then purchase the songs. 
    The new itunes does not seem to support creating these "wish lists" on my desktop... I know about the wishlist feature that is store based.  The problem is that I only have the ability to have ONE wishlist... when I need at least three to keep my music organized for my upcoming events. I still have the older version installed on my main computer, but I know I'm going to have to make the leap soon and know the loss of this functionality is going to be extremely stiffling to my productivity.  
    Any assistance, tricks, ideas, etc would be welcome and appreciated!!

    I figured out a workaround and posted it in this thread - https://discussions.apple.com/message/20751126#20751126
    It is kind of a hassle, but at least you can still put songs in your own wishlists.

  • PL/SQL Function Syntax help please...

    Can someone help me with the syntax here please? I am sure i am doing something wrong in my LOOP.
    create or replace FUNCTION fcn_chk_dec(p_date number)
    return NUMBER
    as
    --DECLARE
    v_date NUMBER;
    v_active NUMBER;
    v_prev NUMBER;
    v_delta NUMBER;
    v_perc_delta NUMBER:
    CURSOR c_prev_active IS
         select date,people,
    lag(people,1) over (order by date)
         from stats
    where date between to_date(p_date, 'YYYYMMDD')-2 and to_date(p_date, 'YYYYMMDD')-1
         order by date desc
    BEGIN
         OPEN c_prev;
    loop
         FETCH c_prev INTO v_date,v_active,v_prev;
         exit when c_prev%NOTFOUND;
         v_delta:=v_active-v_prev;
    v_perc_delta:=trunc((v_delta/v_active*100),2)
    end loop;
    close c_prev;
    return v_perc_delta;
    END fcn_chk_dec;

    what i am trying to do is create a funtion that will return one value for the first row that comes back.
    here is my initial query. the reason i did not go with this query is because there are too many selects and i was told that's not good and slows down the system. Plus, i need to have a function call in another program that will access this function to compare it's output to a value in a table.
    here was my initial start:
    select date,people,delta,trunc((delta/people*100),2) as perc_delta
    from (select date, people,people-prev_dly_people as delta
    from
    (select date,people,
    lag(people,1) over (order by date) as prev_dly_people
    from stats
    where date between to_char(sysdate-2,'YYYYMMDD') and to_char(sysdate-1,'YYYYMMDD')
    order by date desc))
    basically, i have a table that has a total number of people. I want to get the percentage growth and decline from the most recent date and the date before it. This will give me a day to day percentage of people population change as of the most recent date.
    I need this to be a function becaus i want to be able to pass any date i want into it and get the given delta percentage at the time for the people's population.
    hope this makes sense.

Maybe you are looking for

  • CAN SOMEONE TELL ME HOW TO RESET MY IPOD PLEASE?.

    CAN SOMEONE PLEASE HELP ME WITH MY IPOD,IT IS TELLING ME I HAVE TO WAIT 22,718,878 MINUTES BEFORE I CAN SIGN INTO IT.CAN SOMEONE IN HERE HELP ME.

  • Itunes problems with Windows 8.1 and Iphone 4S

    I can't sync my Iphone 4 S to my Itunes.  I get the following error:  "This Iphone can not be used because the required software is not installed. Run the Itunes installer to remove itunes then install the 64bit version of Itunes."  I am running the

  • Getting count - formula variable

    Hi Guys, Need you help. I have a cube with data like this: Division | Customer | Keyfig1 | KeyFig2 D1     A     10      20 D1     B     10      20 D1     C     10      20 D1     D     10      20 D1     E     10      20 In my Query i need to get the c

  • Thinkstation S10 will not boot or post after GPU upgrade

    Hello, I am having a hard time getting this thinkstation S10 to boot with a new GPU. The pc runs just fine with the standard quadro fx 1700 in it. But as soon as i put my ati hd 5770 or nvidia gtx 460 in it wont post. When i put the new cards in i ge

  • Finder jumping to previously selected file - iMac 10.6.8

    I am having the frustrating problem on my IMac running 10.6.8 that the finder is jumping to previously selected file whenever I expand a new folder. So, if I select file A in Folder A, then scroll down and expand Folder B, the Finder automatically ju