5 Replies Latest reply on Dec 18, 2006 12:42 PM by Mark12938

    Field Text Property Not Found

    Mark12938
      I have a Director MX 2004 based training course that is periodically getting the following error:

      property not found: #text

      This training program was developed in Director 6.5 and updated last year to MX 2004. The training program had been running without error for six years prior to the update. I didn't update the script that is causing the error until after receiving the error reports.

      After getting the error report I was able to reproduce the error while running in MX 2004 and the error said:

      Script error: Property not found
      set the text of member "IN" = tempIN & sp & pretempIN
      #text

      I checked the debugger and the local variables were all valid and nothing seem out of place. The field cast member "IN" exists and the member's sprite is static in the score (i.e., it's not being dynamically created).

      Since I couldn't figure out what the problem was I updated the field update scripts to the new syntax:

      member("INText", "Internal").text = tempIN & sp & pretempIN

      I also changed the name of the cast member thinking that the name "IN" may be causing the problem. There are no other cast members of the same name. Unfortunately, I'm still getting the same error. There are other field member sprites that are getting updated successfully before this line of code but for some reason this particular field member sprite is causing the error, even after changing the name of the member. I've since moved my text formatting script to the frame script in the score where the field members are located and tried preloading the member but neither of those changes helped.

      This error is very sporadic and I've only been able to reproduce it few times on my local machine, and not since I updated the script syntax and the field name, but my client is still encountering the error. I checked that my client's program file installation is up-to-date and they're running the newest executable.

      Any ideas of what might be causing the problem? I'm stumped...

      Mark
        • 1. Re: Field Text Property Not Found
          Level 7
          On Wed, 13 Dec 2006 22:02:57 GMT, Mark12938 posted in
          macromedia.director.lingo:

          > member("INText", "Internal").text = tempIN & sp & pretempIN

          Concatenation should handle it automatically, but just in case, if those
          variables are numbers, try:

          member("INText", "Internal").text = string(tempIN & sp & pretempIN)

          One thought. Since this was updated from a D6.5 project, (before the modern
          #text member existed, but, IIRC, static #rtf members were available). Delete
          the member and create it anew?

          You seem to be using #field member and #text member interchangably. They're
          not the same type of member and they have different properties.

          You mention formatting code. Note that field and text members use different
          methods.

          member("fieldMember").fontStyle = "bold, italic"
          member("textMember").fontStyle = [#bold, #italic]

          HTH


          --
          Mark A. Boyd
          Keep-On-Learnin' :)
          • 2. Re: Field Text Property Not Found
            Level 7
            To double check the member coflickt issue (director always operates on
            the first occurance of a member name)

            put member "IN"


            would report te first one with that name in the form: member(4, 1)



            You might test a simple text read command in message window.

            put member("INText").text




            THe ancient way to reference a field memer content would be


            put tempIN & sp & pretempIN into field "IN"
            • 3. Re: Field Text Property Not Found
              Mark12938 Level 1
              quote:

              You seem to be using #field member and #text member interchangably. They're
              not the same type of member and they have different properties.


              Actually, I'm not. It's a field member. The member's name "INText" probably led you to believe it's a text member. I changed the member's name from "IN" to "INText" as I thought perhaps the "IN" may be causing the problem. The member has always been a field member. I'm not formatting the field or anything like that, I'm only replacing the field contents. I don't use Director much anymore, other than this project, but having used both 7.5 and MX, I assumed that I could access the text property of a field using the member("myField", "castName").text syntax as per the docs.

              As for the concatenation, the variables are all strings so it shouldn't really matter. The real problem is that the field member's text property can't be found, not what I'm putting into it. And the fact that it only happens occasionally is what I can't figure out. Since I encountered the error myself inside of Director and was able to run the debugger I was able to see all of the variables in the debugger and check for the field member and its properties in the Message window and everything looked okay.

              quote:

              To double check the member coflickt issue (director always operates on the first occurance of a member name


              It's definitely the only member using the name "INText", plus, I checked all cast libs and it's a unique name.

              When I originally converted the movie I do recall that I had another cast member named "IN", the original name of the field member, when I converted the movie. I can't remember the type of member it was but I'm pretty sure it wasn't a field. Perhaps the movie still has some kind of reference to that not field member and may point to it occasionally, even though I've since renamed the original field cast member to "INText".

              Mark

              • 4. Re: Field Text Property Not Found
                Level 7
                On Thu, 14 Dec 2006 00:01:32 GMT, Mark12938 posted in
                macromedia.director.lingo:

                >
                quote:

                You seem to be using #field member and #text member interchangably.
                > They're
                > not the same type of member and they have different properties.

                >
                > Actually, I'm not. It's a field member. The member's name "INText"
                > probably
                > led you to believe it's a text member.

                Could be. Sorry about that.

                > The real problem is that the field member's text property can't
                > be found, not what I'm putting into it. And the fact that it only
                > happens occasionally is what I can't figure out.

                Strange indeed.

                I would try deleting the member, Save As..., create a new member, Save and
                Compact and see if things improve.

                Also, if you haven't done so lately, Recompile All Scripts.

                Here's another thought. I think that old dir files, when updated to MX2004,
                have the scriptExecutionStyle set to 9 by default. See what happens if you
                change that to 10 - careful to check the whole movie thoroughly in case
                there's some code in there that depends on 9 (timeout objects, MIAW, etc...)



                --
                Mark A. Boyd
                Keep-On-Learnin' :)
                • 5. Re: Field Text Property Not Found
                  Mark12938 Level 1
                  > The real problem is that the field member's text property can't
                  > be found, not what I'm putting into it. And the fact that it only
                  > happens occasionally is what I can't figure out.

                  Strange indeed.

                  I would try deleting the member, Save As..., create a new member, Save and
                  Compact and see if things improve.

                  Also, if you haven't done so lately, Recompile All Scripts.

                  Here's another thought. I think that old dir files, when updated to MX2004,
                  have the scriptExecutionStyle set to 9 by default. See what happens if you
                  change that to 10 - careful to check the whole movie thoroughly in case
                  there's some code in there that depends on 9 (timeout objects, MIAW, etc...)



                  I think I'll delete my field members and replace them with new renamed members. In my original movie I had a field member in the internal cast named "IN" and a bitmap cast member in an external cast named "IN" as well. I'm thinking that there's some kind of risidual reference to the bitmap cast member that sometimes pops up, even though I've renamed the field member name and use the cast name explicitly.

                  As far as the scriptExecutionStyle is concerned that's the first time I've ever heard of that property. Since my movies were originally built using Director 5 and upgraded to versions 6 then 10, I think I'll keep it at 9 for now even though I'm not using any MIAWs or Timeout objects. I also use a few older Xtras in other movies that I can't be sure about.

                  Thanks for your help. It kind of hard when I can't reproduce the error.