Text Member Director bug?

Hi there,
Whilst trying to track down what I though was my own bug, I
discovered that
with Director 8.5's text member charPosToLoc() function I
seem to have found
a strange anomaly....
1. Create a text member. Set framing to Adjust To Fit and
wordWrap to on.
2. Starting with an empty member type text into it until the
first line, is
almost filled.
3. Type a row of empty space chars (not they do not force the
text member to
return to the second line).
4. Put the member.charPosToLoc(member.char.count).
5. You will observe that the resulting loc.locH is way beyond
the right hand
edge of the text member's width!
Can anyone replicate, or suggest a work around? It's a real
problem for one
aspect of my Chatroom project.
Thanks experts!
Richard Smith

"Chunick" <[email protected]> wrote in
message
news:evqp6l$nq4$[email protected]..
> I'm also working on a chat, but using mx2004... and it
still occurs in
> mx2004
> as well. Seems to be a bug that has carried over to the
newest version.
> Can I
> ask the context to which you're needing to set the text
member to adjust
> to fit
> with wordwrap?... it seems like you are trying to set up
chat bubbles or
> something.
Yes, you are quite right, very observant! :)
I had a bug with my smiley placement within the bubbles, but
that work
around fixed it. Ain't smiley placement a pain ? ;)
Cheers, and good luck with your chatroom!
Richard

Similar Messages

  • [ANN] Xtrema Unicode RTF Text Member, alpha version

    Xtrema Unicode RTF Text Member, alpha version.
    For Director 8.5 and above, windows NT4, 98 and above.
    http://xtrema.rtr.gr/cDown/
    Features of the final release (progress state)
    Unicode (utf-16) support. (done)
    Rich Text Format support. (done)
    East European + Asian + RTL Language support. (done)
    Embedded Images. (done)
    Common shortcuts / controls :
    http://msdn2.microsoft.com/en-us/library/ms651760.aspx
    (done)
    Mouse Wheel support. (done)
    Drag & Drop functionality. (drag only)
    Copy to / paste from Clipboard. (done)
    Insert rtf data into rtf selection. (not enabled)
    Full character/line position/dimension (rect) info. (done)
    Event driven operation (e.g. on xKeyDown/up - with unicode
    key info, plus
    mouseWheel) (done)
    Support for virtual sprites (one member, many sprites) (not
    tested)
    Support for memberless objects. (not tested)
    Extended (object driven) text formatting support. (-)
    Rich Text, or Plain Text operation. (rich text only)
    Character masking (for password entry) (not enabled)
    Horizontal / Vertical scrolling (not enabled, auto only)
    Zooming (not enabled)
    Hyperlink support (-)
    Auto stretching to fit Director's stage zoom (done)
    Ink support (blend only)
    Generate 32 bit image object (not enabled)
    This member has been created from a personal wish list based
    on years of
    experience with director's text objects.
    If something else comes to mind, or if you wish to join the
    beta testers
    list, please feel free to contact xtrema at rtr gr.
    Regargs,
    - alchemist.

    Xtrema Unicode RTF Text Member, alpha version.
    For Director 8.5 and above, windows NT4, 98 and above.
    http://xtrema.rtr.gr/cDown/
    Features of the final release (progress state)
    Unicode (utf-16) support. (done)
    Rich Text Format support. (done)
    East European + Asian + RTL Language support. (done)
    Embedded Images. (done)
    Common shortcuts / controls :
    http://msdn2.microsoft.com/en-us/library/ms651760.aspx
    (done)
    Mouse Wheel support. (done)
    Drag & Drop functionality. (drag only)
    Copy to / paste from Clipboard. (done)
    Insert rtf data into rtf selection. (not enabled)
    Full character/line position/dimension (rect) info. (done)
    Event driven operation (e.g. on xKeyDown/up - with unicode
    key info, plus
    mouseWheel) (done)
    Support for virtual sprites (one member, many sprites) (not
    tested)
    Support for memberless objects. (not tested)
    Extended (object driven) text formatting support. (-)
    Rich Text, or Plain Text operation. (rich text only)
    Character masking (for password entry) (not enabled)
    Horizontal / Vertical scrolling (not enabled, auto only)
    Zooming (not enabled)
    Hyperlink support (-)
    Auto stretching to fit Director's stage zoom (done)
    Ink support (blend only)
    Generate 32 bit image object (not enabled)
    This member has been created from a personal wish list based
    on years of
    experience with director's text objects.
    If something else comes to mind, or if you wish to join the
    beta testers
    list, please feel free to contact xtrema at rtr gr.
    Regargs,
    - alchemist.

  • Find Line Number in Text Member

    I would like to drop in a line of text after a specific phrase in a text member. To find the right place to drop the text, I must first determine the line number the specific phrase text is located. Now, I can use a REPEAT to walk through each line until it is found, but there must be a more elegant way. The code "Offset" is great for finding the first character number of the specific phrase, but I don't know how to glean the line number from that.
    Currently this is how I do it...
    repeat with xLineCount = 1 to 100
        if textDoc.line[xLineCount] contains "<specific text phrase>" then
          put RETURN & RETURN & "<new text pasted>" after textDoc.line[xLineCount]
          exit repeat
        end if
      end repeat
    Can anyone give me a more elegant approach this?

    A more elegant approach might be to use a regular expression, but I'm not sure I understand your requirements well enough to make a sensible recommendation.
    You could try the following JavaScript handler and invoke it like:
    tMember.text = jsReplace(tMember.text, "<specific text phrase>", "<specific text phrase>" & RETURN & RETURN & "<new text pasted>")
    function jsReplace(inStr, strFind, strReplace){
      // error check input
      if(typeof(inStr)      != "string") { return inStr; }
      if(typeof(strFind)    != "string") { return inStr; }
      if(typeof(strReplace) != "string") { return inStr; }
      // search-and-replace
      re = new RegExp(strFind, "g");
      return inStr.replace(re, strReplace);
    However, this will place the pasted text immediately after the search phrase and not at the end of the line. It is possible to do this with a regular expression, but I'd have to dust off my copy of Friedl's "Mastering Regular Expressions" to craft it for you and I don't have either the time or inclination at present.

  • About converting a text member to a list

    Hi there everyone!
    I'm trying to convert a prepared text member to a property
    list.
    the text cast member:
    [#boxes:[#b0: [#rect: rect(61, 392, 695,
    465)],#b1:[#rect:rect(501,358,688,460)],#b3:[#rect:rect(99,415,199,493)]],#points:[#p0:[# loc:point(677,428)],#p1:[#loc:point(92,397)]]
    the code I tried:
    a = member("walkable").text
    dWalkable = value(a)
    put dWalkable
    but the result is always : <VOID>
    how can I convert the text cast member to a property list?

    The reason you are getting void is because after converting
    it from a
    string, what you have left is not a properly formatted list.
    I think
    you just need to add a closing square bracket at the end and
    then it
    should work.

  • Get Rect of a line of text in text member

    hello everyone
    I need to get the top left right and bottom coordinates in
    pixels around a
    line of text in the text member where the mouse clicks.
    I know how to get the right and left positions. But top and
    botton is
    difficult.
    Any ideas and workarounds will be welcome.
    thanks
    ahmed

    Here are two links to movie which use the rect of a given
    line in a text member:
    http://nonlinear.openspark.com/tips/text/hilitetext/
    http://nonlinear.openspark.com/tips/text/multiselect/

  • Reading a txt file into a text member with BuddyAPI.

    Hi I have this:
    mFile =_movie.path &"TheTEXT.txt"
    theFile = baShell("open", mFile, "", "", "normal")
    which opens a txt file in note pad. I don't have an idea on how to do this with API to be opened into a txt member.
    Thanks
    Brian

    You don't need Buddy API to import text (which is what you appear to be trying to do) - just set the filename of an existing (or new) text member to the file:
    -- tTextMember = _movie.newMember(#text)
    tTextMember.filename = _movie.path & "TheText.txt"
    tText = tTextMember.text

  • Text validation widget bug?

    I have used text validation in a table body like this:
    <table style="width:20%">
    <tbody id="login_val">
    <tr><td>E-Mail</td><td><input
    name="login" id="login" type="text"></td></tr>
    <tr class="textfieldRequiredMsg"><td
    colspan="2">Enter your login E-Mail.</td></tr>
    <tr class="textfieldInvalidFormatMsg"><td
    colspan="2">Enter a valid E-Mail address.</td></tr>
    </tbody>
    <tbody>
    <tr><td></td><td><input
    name="submint" id="submit" type="submit" value="Log
    In"></td></tr>
    </tbody>
    </table>
    Initialised with: var login_val = new
    Spry.Widget.ValidationTextField("login_val", "email",
    {validateOn:["blur"]});
    If there is an input error - the error table-row shows up as
    expected but the first td of the first row (the one showing the
    word 'E-Mail') suddenly has a colspan"2" on it too. (tested only in
    Firefox)
    Do I miss something here? Or is this a bug? Feature???
    Cheers from down under.

    Hello,
    I think the problem in this situation appears because of the
    CSS definition. The default definition right now to display an
    error message is:
    .textfieldRequiredState .textfieldRequiredMsg,
    display: inline;
    color: #CC3333;
    border: 1px solid #CC3333;
    When this class is used with table rows the results are
    unexpected because the table rows have a special status and cannot
    normally be displayed as an inline element. Unfortunately your
    scenario hit a browser limitation in the CSS implementation. The IE
    because it doesn't have yet support for display:table as the CSS2
    specify will render "correctly (?!)" the display:inline or
    display:block on table row elements. FF because it has correct
    support for display:table-row will work incorrectly with the inline
    as the specification mention.
    The only solution I see is to manipulate the CSS height
    property, margin and padding instead of manipulating the display if
    you want to continue to use the table structure above.
    Regards,
    Cristian

  • "copy and paste text within symbol" bug

    I am sure this has been discussed, but have not found it using search.
    Follow these steps to demonstrate a "Symbol Text" bug (CS5 through CC 2014):
    Create Symbol containing editable text.
    Edit symbol by selecting and copying a portion of text at "Character" level in the Symbol
    Paste as point or paragraph text.
    The result is: ALL the text from the Symbol is pasted into the Point or Paragraph text object, NOT just the portion that was copied.
    This bug has been present in AI at LEAST since CS5 and probably before. I'd sure like to see it fixed.

    Ray,
    I'm using C5 also.
    What I get is the copied text plus all the text in the symbol.
    Peter

  • Read number of XML nodes in a document& return result in text member

    Hi all,
    I wonder if you can help me with the following:
    I want to read the number of nodes in an XML document and
    return the result in a text cast member. This is what i am doing so
    far, but it refuses to work

    Hi Sean
    This is the handler i created based on your suggestions.
    Although it is working perfectly for some reson it creates one
    extra end tag at the end of the xml file. Is there any way to fix
    this?
    global whichxml
    on XMLscript2
    GrQuestion = member("Gr_Questions").text
    EnQuestion = member("questions_stage").text
    re3 = "("&EnQuestion&")"
    re4 = "(8859-1)"
    global gFileIO
    gFileIO = new(xtra "FileIO")
    gFileIO =new (xtra "FileIO")
    gFileIO.createFile("xml\"&whichxml&"" & ".xml")
    gFileIO.openFile(the moviePath &
    "xml\"&whichxml&"" & ".xml" , 0)
    tXMLStr = gFileIO.readFile()
    tXMLStr2= RegExp_Replace(tXMLStr, re4, "8859-7", "gi")
    tXMLStr2= RegExp_Replace(tXMLStr2, re3,
    ""&GrQuestion&"", "gi") --replace with greek text
    positiona= offset(re4,tXMLStr) --find the position of the
    first character
    setPosition(gFileIO,positiona)
    writeString(gFileIO,tXMLStr2) --write the new string
    gFileIO.closeFile()
    gFileIO = VOID
    end

  • Text message edit bug and price

    Anyone else going nuts trying to text with this phone? For one thing with the stock keyboard it only types in portrait mode even when it should be in landscape. Then it locks up and you can't backspace! No fix yet! Its been a problem since I paid 330 bucks for this phone in like November! (I metion the price I paid because it immediately went down to 80 bucks after I paid 4 times that! I want a refund of the difference.  )

    Hey man,
    Thanks for the tip. Ya its already on auto-rotate. Its a bug in the text editor app for sms. Judging from the antenna disconnect problem with the BIONIC still not being fixed even though verizon and Moto knew about it since the day of its release.. I am not holding my breath for a fix for that OR the restart clearing all my apps settings, saved words, wifi auto on locations, etc..
    Verizon seems to be the worst when it comes to fixing bugs. Imagine the BIONIC still is a broken phone... Wow! Glad I exchanged it for a phone with less serious forever bugs x(

  • Text height/overlapping bug

    We are having a problem where part of a previous textline is
    overlapping the next line. The tails of letters like "j" and "g"
    and "y" are overlapping the next line when we have different font
    sizes. From our text metrics debugging, the line height seems to be
    off by the descent amount. I am using build 5011. Here is sample
    code to recreate the problem.

    I think this is not a bug, but a byproduct of the fact that
    TLF is doing baseline leading. TLF is placing the first line based
    on the largest ascent on the line. You can alter the placement of
    this line down by changing the value of the firstBaselineOffset
    property. The second line is placed according to its lineHeight
    propery (also sometimes called the leading). In this case, the
    lineHeight is the default value, 120% of the largest fontSize,
    which with the fontSize=12 will be 14.4 pixels. So the second line
    is placed so that its baseline is 14.4 pixels below the baseline of
    the first line. In this case, that's too tight.
    There are a couple of things you could do to space the
    paragraphs out further. You could assign a larger lineHeight to the
    second line, either a larger percentage or absolute pixel value. Or
    you could add space between the two paragraphs by assigning a
    positive value to the first paragraph's marginBottom. Or you could
    set the marginTop of the second paragraph.
    Baseline leading is a different model from that used by most
    word processors, including Microsoft Word. It is used in
    applications such as Adobe InDesign and Illustrator. The advantage
    is that it gives the user more control over how the lines are
    placed. The disadvantage is cases like these where it doesn't do
    the right thing by default.
    I hope that one of these proposals is a viable solution to
    your problem.
    Thanks!

  • Dynamic Flash text in Director MX

    Hi,
    I have a presentation which needs to display user-changable
    messages. I have a flash file that reads from a .txt file. Every
    time the flash file opens, it reads the new text, updates, and
    everything is great. I'm using
    loadVariablesNum("/dynamic.txt", 0);
    to read the text from the file.
    But, when i put that flash file in Director, the text stops
    updating. I made sure the file was linked externally. I'm sure it's
    a simple code fix in director, but can't figure it out.
    Any help is appreciated.

    Hello,
    The AS below works getting fresh data from a server, not sure
    about locally,
    you tag a random bit of text at the end of what you're
    grabbing, and it
    makes Flash think it's a new file everytime. I'm an AS noob,
    but this might
    help.
    randVar=Math.random()*9999;
    loadVariablesNum("/dynamic.txt?" + randVar, 0);
    "Couch" <[email protected]> wrote in message
    news:e61o7c$91$[email protected]..
    > Hi,
    > I have a presentation which needs to display
    user-changable messages. I
    > have a
    > flash file that reads from a .txt file. Every time the
    flash file opens,
    > it
    > reads the new text, updates, and everything is great.
    I'm using
    > loadVariablesNum("/dynamic.txt", 0);
    > to read the text from the file.
    >
    > But, when i put that flash file in Director, the text
    stops updating. I
    > made
    > sure the file was linked externally. I'm sure it's a
    simple code fix in
    > director, but can't figure it out.
    >
    > Any help is appreciated.
    >

  • Regarding a member assignment bug

    Hello All,
    I have a calc script that looks like this:
         Fix("Traffic", "Sales")
              "Total Week"(     
              "Total Week"="All Days";     
         Endfix
    As you can understand, "Total Week" is a calculated member that gets value from a dynamic calc member "All Days" which has individual day input members. The above script is not assigning value to "Total Week" for only "Traffic" account. But above script worked for the other account, "Sales".
    Then, I modified the script as below and it worked for both accounts!! Can anyone tell me why the above script did not work for "Traffic" account but "Sales" Account? I appreciate your help!
         Fix("Traffic", "Sales")
              "Total Week"(     
              "Total Week"=@SUM(@CHILDREN("All Days"));
         Endfix
    Thanks!

    Hi Jayamani,
    Very doubtful this is a bug.
    If I had to guess I bet the Traffic member is also a dynamic calc member. Is that true? If that's true then it's the order Essbase is doing operations. You could solve like you did or perhaps add a two-pass tag on Traffic.
    See page 103 in the Database Admin Guide (DBAG).
    http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_dbag.pdf
    May be best to do as you have done.
    Regards,
    John A. Booth
    http://www.metavero.com

  • Linked list to string coercion doesn't use text item delimiters: bug?

    set AppleScript's text item delimiters to {"; "} -- well-known technique
    {1, -1, "c", "d"} as string -- curly braces specify a vector, delimiters work
    -- result: "1; -1; c; d"
    {1, -1, "c", "d"} as linked list as string -- if coerced to linked list, delimiters ignored
    -- result: "1-1cd"
    [1, -1, "c", "d"] as string -- square brackets specify a linked list, delimiters ignored
    -- result: "1-1cd"
    [1, -1, "c", "d"] as vector as string -- coercing linked list to vector first works
    -- result: "1; -1; c; d"

    Hello
    It appears that linked list to string coercion does not respect the AppleScript's text item delimiters which are set to list of Unicode text. (Unicode TIDs have no effects in coercion as if it were set to {""})
    I can confirm this behaviour in both AppleScript 1.8.3 (OS9) and 1.9.1 (OSX10.2.8) at hand.
    So it has been as such for a long time. Bug I'd call it.
    By the way, although this is not the point, linked list is a historical residue and of little use in real scripting. After all, it is much slower than vector with appropriate coding. So we may always coerce it to vector without losing anything.
    Regards,
    H
    Linked list to string coercion & AppleScript's text item delimiters (TIDs).
    When AppleScript's TIDs are set to list of Unicode text,
    the TIDs have no effect in coercion from linked list to string as if they were set to {""}.
    set aa to [1, 2, "a", "b"]
    --set aa to {1, 2, "a", "b"} as linked list
    set t1 to list2text(aa, ";") -- "1;2;a;b" -- in pre-AppleScript 2.0
    set t2 to list2text(aa, ";" as Unicode text) --"12ab"
    return {t1, t2}
    on list2text(aa, delim)
    list aa : source list
    string delim : a text item delimiter
    return string
    local astid, astid0, t
    set astid to a reference to AppleScript's text item delimiters
    set astid0 to astid's contents
    try
    set astid's contents to {delim}
    --set t to aa as string
    --set t to aa as Unicode text
    set t to "" & aa
    set astid's contents to astid0
    on error errs number errn
    set astid's contents to astid0
    error errs number errn
    end try
    return t
    end list2text

  • Read from Text File - Help Bug?

    Hi - I am currently working on LV8 and I think that there is some misunderstanding potential in the help file. To be more exact in the help to the "Read From Text File" VI.
    The description for "count":
    " ... If count is <0, the function reads the entire file. The
    default is –1, which indicates to read a single line if you placed a checkmark
    next to the Read Lines shortcut menu item and to read the
    entire file if you removed the checkmark next to the item. "
    If count is lower than zero, the function reads the entire file. That sounds clear to me.
    The default is -1, which indicates to read a single line if you placed a checkmark next to the "Read Lines" shortcut menu item. Now what? Does it read a single line or the whole file?
    .. and to read the entire file if you removed the checkmark next to the item. I thought it reads the whole file if I use -1 ?
    the VI itself behaves as I'd expect it to:
    * If I place a checkmark next to Read Lines and put -1, I get an array containing the lines
    * If I remove the checkmark, I get only a single string item.
    Now where is the error? Is the VI not working properly or only the description a little bit ... strange ?

    ?hein??
    ?what?
    Both you guys lost me..
    And I drink coffee without sugar (being sweet enough, already) 
    Here is what I get from Context Help on the Read From Text File:
    Read from Text File
    Reads a specified number of characters or lines from a byte stream file. By default, this function reads all characters from the text file. Wire an integer value to count to specify how many individual characters you want to read starting with the first character. Right-click the function and place a checkmark next to the Read Lines option in the shortcut menu to read individual lines from the text file. When you select the Read Lines option in the shortcut menu, wire an integer value to the count input to specify how many individual lines you want to read from the file starting with the first line. Enter a value of -1 in count to read all characters and lines from the text file.
    Humm.
    New feature (again)..  If you select checkmark the Read Lines option, it will not send the text to a sting indicator, as shown in the attached image.  If selected, then it's expecting to write lines to an array of strings...  WHY???  I don't know..  I'll ask..
    Strange...  LV8 is full of mysteries... 
    RayR
    Attachments:
    bad write file.JPG ‏33 KB
    more bad write file.JPG ‏12 KB

Maybe you are looking for

  • Can't open iPhoto after upgrading to 11

    I have just bought a new Mac Mini and have loaded up the iPhoto supplied with all my photos. I have just intsalled iPhoto '11 and now I get a message as follows: "In order to open iPhoto, you need to update to the latest version. Please run Software

  • Xpath result nodes not returned in document order

    An XPath expression over a mixed text element does not return the result nodes in document order (see example below). I am using dbxml 2.3.0. let $x := <a>this <i>is</i> <b>mixed</b> text</a> return $x/node()} dbxml> query {let $x := <a>this <i>is</i

  • Java PDK Bugs and Issues

    Here are some bugs and issues I've run across using the JPDK that I thought other developers should be aware of. The following information comes from using JPDK 1.1 with Oracle Portal Version 3.0.6.3.3 Early Adopter on Windows 2000. 1) Do not use a c

  • No messaging notifications or caller id on Lumia 9...

    As of a couple of days ago, I haven't been receiving messaging notifications. I still recieve the message, they just don't show up on the live tile, the lock screen or make a sound. It's getting very frustrating. Also, whenever I recieve a call, I do

  • Oracle AS 10.1.2.3 - Application/Web Service 'not loaded'

    I've successfully deployed my application against OAS 10.1.3.3 with no problems. Unfortunately, my target platform is 10.1.2.3 and I cannot upgrade. When I deploy my application against OAS 10.1.2.3, it does not start/load. When I look at the applica