Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default groups of dates

    Hi,
    I have a list of objects with dates, and I need to put them into groups per
    year. Is there any way to creat something where I can interchange variables
    with properties? I need a system like

    currentYear = "_"&dateObject.year&""
    put archiveList.currentYear

    and this would return a list of items inside the list
    archiveList.currentYear
    I already have archiveList = [#_1999, #_2000, #_2001] etc etc.
    How do I go about this???
    Im so lost,
    Jacob


    Jacob Farber Guest

  2. Similar Questions and Discussions

    1. Permission groups
      We cannot connect to our site as we have no permsion groups showing. Does anyone know how we recreate the administrator permission group?
    2. I'm still confused by the difference between Global Groups and Domain Local Groups
      Experts, I'm still confused by the difference between Global Groups and Domain Local Groups. I mean, they seem to me to accomplish the very same...
    3. Getting AD Groups
      Hi Gurus, I seek you expert advice on the following scenario:- Environment: Windows 2003, IIS6, Windows Integrated Authentication, .Net...
    4. Supplementary groups
      Is there a function for setting supllementary groups? I don't see a method documented in Process. I want the equivalent of man (2) setgroups: ...
    5. OT about CSS (other groups wont help)
      hello all. this is some CSS code that I have and it works great with links. however, is it possible to achieve the same effect for images, buttons,...
  3. #2

    Default Re: groups of dates

    On 2/12/03 8:39 AM, in article bqgch9$rsn$1@forums.macromedia.com, "Jacob
    Farber" <jacobfarber@sympatico.ca> wrote:
    > Hi,
    > I have a list of objects with dates, and I need to put them into groups per
    > year. Is there any way to creat something where I can interchange variables
    > with properties? I need a system like
    >
    > currentYear = "_"&dateObject.year&""
    > put archiveList.currentYear
    >
    > and this would return a list of items inside the list
    > archiveList.currentYear
    > I already have archiveList = [#_1999, #_2000, #_2001] etc etc.
    Hi,

    I'm not sure if I understand your question properly, but if you want to
    group objects together with a date, you could use a property list like this

    MyList = [:]
    WhatYear = dateObject.year
    If voidP(MyList .getAprop(whatYear) then
    -- make a new group for this year
    myList.addProp(whatYear, [])
    End if
    -- now add the dateObject to the 'group list'
    GroupList = myList.getAProp(whatYear)
    GroupList.add(dateObject)

    Doing this will give you a list like
    [1999: [obj1, obj2], 2000: [obj3, obj4]...etc ]

    Luke


    LukeWig Guest

  4. #3

    Default Re: groups of dates

    Thank you- I will try that. However, I managed to manually creat an array
    where numbers were properties, like you list
    [1999: [obj1, obj2], 2000: [obj3, obj4]...etc ]
    but- If I tried to call something like
    put myList.1999
    it would give me a messed up array...did this not happen for you?
    Jacob

    "LukeWig" <lukewig@hotmail.com> wrote in message
    news:BBF21879.58D4%lukewig@hotmail.com...
    > On 2/12/03 8:39 AM, in article bqgch9$rsn$1@forums.macromedia.com, "Jacob
    > Farber" <jacobfarber@sympatico.ca> wrote:
    >
    > > Hi,
    > > I have a list of objects with dates, and I need to put them into groups
    per
    > > year. Is there any way to creat something where I can interchange
    variables
    > > with properties? I need a system like
    > >
    > > currentYear = "_"&dateObject.year&""
    > > put archiveList.currentYear
    > >
    > > and this would return a list of items inside the list
    > > archiveList.currentYear
    > > I already have archiveList = [#_1999, #_2000, #_2001] etc etc.
    >
    > Hi,
    >
    > I'm not sure if I understand your question properly, but if you want to
    > group objects together with a date, you could use a property list like
    this
    >
    > MyList = [:]
    > WhatYear = dateObject.year
    > If voidP(MyList .getAprop(whatYear) then
    > -- make a new group for this year
    > myList.addProp(whatYear, [])
    > End if
    > -- now add the dateObject to the 'group list'
    > GroupList = myList.getAProp(whatYear)
    > GroupList.add(dateObject)
    >
    > Doing this will give you a list like
    > [1999: [obj1, obj2], 2000: [obj3, obj4]...etc ]
    >
    > Luke
    >
    >

    Jacob Farber Guest

  5. #4

    Default Re: groups of dates


    > Thank you- I will try that. However, I managed to manually creat an array
    > where numbers were properties, like you list
    > [1999: [obj1, obj2], 2000: [obj3, obj4]...etc ]
    > but- If I tried to call something like
    > put myList.1999
    > it would give me a messed up array...did this not happen for you?
    > Jacob
    Yeah - its one of the 'gotchas' using integers as properties in property
    lists... You cannot access the value using syntax like
    pList.Propname
    pList[PropName]

    You have to use the syntax

    pList.getaProp(propName)

    Luke

    LukeWig Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139