CharacterFormat fails to take values

I find that CharacterFormat (from ITextLayoutFormat) fails to take a 'regular' fontStyle value. Copy the following code shows the case (attached)

In the first inning, that traces are as expected, setting the text italic:

"existing fontWeight: normal.
"existing fontStyle: regular.
"new fontStyle: italic."
' should be: italics.

But when I click on my italics button again it fails to restore the regular text because the CharacterFormat "italics" will not take a FontStyle.REGULAR value when you use a conditional assignment (ternary or if-else), the final trace shows the result of this conditional allocation, it's just never really affected (it is null). If the traces for when the text is already italic are:

"existing fontWeight: normal.
"existing fontStyle: italic."
"new fontStyle: null".
' should be: ordinary.

I do not use "BOLD" here so there is nothing that crosses the BOLD_ITALIC stuff.

I guess that this is where I should:

(a) read the docs in detail
(b) do not rely on the naming conventions when it comes to string assignments

The problem was fontStyle does not have a string found in FontStyle, it takes a string in FontPosture, so 'luckily' FontStyle.ITALIC married upward with the chain for FontPosture.ITALIC, but of course FontStyle.REGULAR did not suit instead of the string of FontPosture.NORMAL.

It's a shame that we do not have enums real because this naming convention really threw me where other properties as fontWeight use a class that matches name-wise (FontWeight). I imagine that this will not be a problem when the ASDoc advice types of classes instead just to string.

Tags: Adobe Open Source

Similar Questions

  • failed to create value for the message Analyzer "at line 54.

    I get the following error, can someone please?

    failed to create value for the message Analyzer "at line 54.

    Hi ejpeppjep,

    Check if this article helps you fix the problem: http://support.microsoft.com/kb/823768

    If the problem persists, we recommend that you try the following steps and check the result.
    Step 1: a. Click Start, click Run, type cmd and click ok.
    b. at the command prompt, type sfc/scannow and press ENTER.
    c. once the analysis is complete, restart the computer and check if the problem persists.

    Note: You will be asked to insert the Windows XP disk, if a file is missing.

    For more information, see Description of Windows XP System File Checker (Sfc.exe)

    Step 2: If the problem persists, restore the computer to an earlier time
    see How to restore Windows XP to a previous state .

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Error when you open Add or remove programs: "failed to create value" At Line 451 how this can be corrected?

    Once all updates completed, I now can't add remove programs to work.

    I get the following in a box error message: "failed to create value"at line 451.

    Someone knows how to fix this?

    Hi ZebWebb,

    1. What service pack is installed on the computer?
    2. You have security software installed on the computer?

    If you have recently installed Windows XP SP1 on the computer, then see the article and check if that helps.

    Error when you open Add or remove programs: ' failed 'at line 410' of value creation.

    http://support.Microsoft.com/?kbid=823768

    If you have not installed Service Pack 1 of Windows XP on the computer recently then check if the problem persists in the safe mode and after return details.

    A description of the options to start in Windows XP Mode

    http://support.Microsoft.com/kb/315222

  • Lost the ability to create tokens of debugging: error: Code signing request has failed because the value debug token of Type Package is not allowed.

    I have been a token of debugging and apps on my device Z10 hundreds of times from the command line and Momentics but this time I am confused.

    I am trying to create a token of debugging (in command line and Momentics) and deploy it in my Z10 camera, but it does not work.   In both cases, I get the following error.

    "Error: Code signing request has failed because the value debug token of Type Package is not allowed."

    2 things have happened recently that make this potentially different situation.

    a.) now my device is currently running OS 10.2

    (b) there was something new regarding signing apps with your blackberry ID?

    I was a little out of the loop for 1-2 months so please forgive me if this problem is very obvious... I am looking for a clue to what I'm doing wrong.

    This has been fixed on both of your accounts.  It was a problem of account setup.  We're looking at what caused it to prevent it from happening in the future.

  • failed to create value for the message Analyzer online 451

    When I try to add or remove programs in Control Panel

    Hello

    You can check this link:

    Error when you open Add or remove programs: ' failed 'at line 410' of value creation.

    http://support.Microsoft.com/?kbid=823768

  • I try to access Add or remove a program and get an error message "failed to create value on line 451".it does this for several different things

    I bought this computer from a person and some features seem to be locked.please help

    Hi Brighteyes714,

    You can follow the procedure in the article and mark mentioned below.

    Error when you open Add or remove programs: ' failed 'at line 410' of value creation.

    http://support.Microsoft.com/kb/823768

    Let us know if that helps.

  • My installation of windows 8 has failed and takes memory.

    Whenever I try to install windows 8, it fails roughly 90%. Now, I gave up on it, but it takes up to 30 GB on my SSD. Is it anway way I delete these files and recover them without breaking my windows 7?

    Hi AlexScott,

    Number of description, it seems that, while installing Windows 8 it takes about 30 GB on the SSD and you want to delete Windows 8 does not have spaces in files on the computer.

    The installed files of Windows 8 will be in the following locations. You can remove files from the following locations installed and free up memory on the computer.

    %LocalAppData%\Microsoft\WebSetup\

      

    \AppData\Local\Microsoft\Websetup C:\Users\

    C:\ ESD\

    Just reply to the State of the question. For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.

    Kind regards.

  • REGEXP take value NLS_SORT

    Hi, received this solution in order to take the value of NLS_SORT =. SQL >

     select regexp_substr(regexp_substr('NLS_TEST=TEST , NLS_SORT=''BINARY'' NLS_FOO2=''asdasda''', 'NLS_SORT=''(.*?)''',1,1) ,'[^=]+$') sort from dual ; 
     'BINARY' 
    Is there any more elegant way in Oracle 11.2 . 
    Expected output without single quote so BINARY is our goal . 
    

    Thank you. GG

    Hello

    user621309 wrote:

    Hi, received this solution in order to take the value of NLS_SORT =. SQL >

     select regexp_substr(regexp_substr('NLS_TEST=TEST , NLS_SORT=''BINARY'' NLS_FOO2=''asdasda''', 'NLS_SORT=''(.*?)''',1,1) ,'[^=]+$') sort from dual ;
     'BINARY'
    Is there any more elegant way in Oracle 11.2 .
    Expected output without single quote so BINARY is our goal .
    

    Thank you. GG

    From Oracle 11.1, you can pass an argument (as a backreference) 6th REGEXP_SUBSTR, indicating the function returns only the part of the drawing that it finds:

    SELECT REGEXP_SUBSTR (' NLS_TEST = TEST, NLS_SORT = NLS_FOO2 "BINARY"="Adama"')

    , ' NLS_SORT =''(.*?) '''

    1

    1

    NULL

    1 that is to say the expression inside the 1st on the left '(' et correspondant à sa droite)"

    ) AS nls_sort

    DOUBLE;

    In Oracle 10.1 or more, you can use REGEXP_REPLACE to nothing, except for the part you want to remove.  However, depending on your data, which can be more elegant than what you posted.

  • script to take values of annotations

    Hello

    Need a small script to get the custom attributes values. I need to defer the current date with the date in the custom attribute and calculate the number of days. Then compare it with a limit value already together and trigger an email.

    Get-VM-name of the virtual machine. Get-Annotation - CustomAttribute 'Date' gives a whole integer ofvalues. Just need to take the VALUE field, but I can't do it. Also how it calculates the difference between this variable and the current date.

    I just started my trip withpowershell. Any help will be appreciated.

    Thank you

    A

    The problem seems to be caused by the fact that do you a Get-Content instead of a Get - VM.

    In this case the $VM variable does not have a VirtualMachineImpl object, but a string.

    This means that instead of

    $report += $VM.Name
    

    you need to do

    $report += $VM
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Analysis.Math.Statistics fails when NaN values are included in the entry tables

    Hi all..

    With the help of Measurement Studio to Version 8.9 of .net. We need calculate statistics on a table that contains a double. NaN values. When I do this I get NaN as the result of any of the statistical methods (average, STDS etc.) ... Interestingly, the Math.ArrayOperations methods look like they work. Any ideas?

    Thank you

    gdssoftware

    Hi GDSSoftware,

    You see this behavior because the statistical functions with Measurement Studio ignore not input values NaN - that is why, they will return results NaN.  To work around this problem, you will need to filter these NaN values out of your input array before performing statistical analysis on this subject.

    If you're working with .NET 3.5 and later versions, you can do this by using the following:

    Double [] vals = new double [] {0d, 6 d, 10 d, 4 d, double. NaN};
    Double [] nanless_vals = vals. Where (d =>! double.) IsNaN (d)). ToArray();

    If you use an earlier version of the .NET framework, you will need to perform a loop on the table with the following (or something similar):

    Double [] vals = new double [] {0d, 6 d, 10 d, 4 d, double. NaN};
    List nanless_list As new List();
    for (int i = 0; i)< vals.length;="">
    If (! double.) IsNaN (vals [i]))
    nanless_list. Add (Vals [i]);
    Double [] nanless_vals is nanless_list. ToArray();

    I hope this helps!

    Kind regards

    Stephanie R.

    National Instruments

  • 6901 phones fails to take the ip address

    Hello

    I am configuring 6901 phone with call 8.6 Manager.

    The problem is that these phones do not take the ip address and through the datasheet, I found that these phones do not support of VLAN.

    In our configuration, we use the 2960 switches and there are several VLANs and VLAN voice and data is separated so I removed the vlan data port swithc and just kept the vlan voice and still should not be any ip address.

    When I do come to the port of data switch vlan it take the ip address of the vlan database but I want to get the ip address of the vlan voice.

    If someone is facing this problem before please share.

    Hi Malik.

    I think you can see this bug;

    CSCth34329 - 69xx accepts DHCP Offer tagless after sending Discover on Vlan VoIP

    Description

    Symptom:
    69XX phone receives an IP address on one local VIRTUAL network other than the VLAN voice.
    Conditions:
    This will happen if there are two different DHCP servers for the VLAN voice and data, and the data from the server DHCP VLAN are not aware of VLAN.
    Workaround solution:
    Delete the configuration of VLAN voice on the switchport to server DHCP VLAN data.
    Additional information:
    Same problem exists on other phone models. For an example, see CSCsa85042 .

  • Autodesk DWF Writer 3.1 is not installing from the windows machine 7. Error returned is "failed reading registry value DriverCachePath".

    Product name: Autodesk DWF Writer 3.1

    OS: Windows 7

    Error: failure reading registry value DriverCachePath

    Error is not occurring in all machines of widows 7

    Thanks in advance.

    Please help to install

    Hello

    The computer is on a domain?

    Will correct the problems with programs that cannot be installed or uninstalled method 1)

    http://support.Microsoft.com/mats/Program_Install_and_Uninstall/

    If the problem persists, try to install the clean boot

    Method 2) how to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: When you perform a clean boot, you temporarily lose some functionality. When you start the computer as usual, the function returns. However, you may receive the error message, or you can experience the original behavior. Don't forget to reset the computer in Normal mode.

    It may be useful

  • Failed to get value from time to time

    Hello everyone.

    I want to get the value of "Five" under the effect of "stabilizing Warp VFX.

    All my footages was stabilized and have value "Auto scale".

    http://s020.radikal.ru/i716/1312/75/9b79649fb43f.png

    It's strange, but this code does not work correctly.

    Some alerts come with empty values.

    var comp = app.project.activeItem;
    
     for (i = 1; i <= comp.numLayers; i++) {   
        
        var warp_Stab = comp.layer(i).property("Effects")("Warp Stabilizer VFX");
        var layerName = comp.layer(i).name;
                
                
                if (warp_Stab != null){
               
              var auto_Scale =  comp.layer(i)("Effects")("Warp Stabilizer VFX")("ADBE SubspaceStabilizer-0017").name.toString();
              alert(auto_Scale);
    }
    }
    

    Your code works for me in AE CC, it returns the name of this property. The extent of a fair return from the numeric value only, which is not will happen in native mode. You will need to analyze the results of name to get this number.

    model var = app.project.activeItem;

    for (i = 1; i<= comp.numlayers;="" i++)="">

    var warp_Stab = comp.layer (i) .property ("Effects") ("Warp stabilizing VFX");

    var NomCouche = comp.layer (i) .name;

    If (warp_Stab! = null) {}

    var auto_Scale = comp.layer (i)("Effects") ("Warp stabilizing VFX") ("ADBE SubspaceStabilizer-0017").name.toString ();

    var val = auto_Scale.split ("("); ")     Splits the string at the first "().

    alert (a .slice [1] (0, a [1] .length-2));     Lets hack the last character slice (Start, end)

    }

    }

  • the use in the operator not to take value of list item

    Hi gurus,
    I have four types of employees
    such as 'C' for consultants, the from ' for the staffs, 'W' for workers, ('E', the of ',' W') for all types of employees.
    I write four queries to show four types of employees.
    can it is possible in a single query.

    Please guide me...

    I wrote this in oracle forms
    I took a list item for the workers, I took 'W', for the staffs, I took the of ' consultants, I took 'C' and for all I took 'A '.
    my column name is emp_type in (: block.list_item)
    but it does not have the value of the list item when the value is emp_type, in('C') etc etc...
    same for workers, the staffs.
    When he is 'A' it will be emp_type in ('E', the of ',' W')

    Please answer...

    where did you put that "emp_type in...". "- thing? In the WHERE clause of the blocks? Also, check the value of the SYSTEM. LAST_QUERY after the query has been run.

    Published by: Andreas Weiden on 07.07.2011 19:52

  • Column link has failed on the values

    Hello

    I have a report of sql updeatable, where one of the columns is a link (approved) and the other
    is a list of selection (Approval_DAL) among others.
    The report is
    Select
    "APPROVAL_ID,"
    "APPROVAL_DAL,"
    "APPROVER_GROUP_ID,"
    "IDR_ID,"
    "approve" as "approve."
    "Reject" as "reject".
    of IDR_APPROVAL

    By clicking on the link 'Approve' I want to move the selected item selection list value
    APPROVAL_DAL and other values of column to another page.

    I've implemented "Approve" link to go to the page 511
    and set the parameters as follows this page
    P511_APPROVAL_ID #APPROVAL_ID #.
    P511_IDR_ID #IDR_ID #.
    P511_APPROVAL_DAL #APPROVAL_DAL #.

    The value of the selection APPROVAL_DAL never list is passed. Help, please. Thank you.

    Suni

    Hello:
    It just occurred to me that the solution suggested in my previous post is not a viable solution. You can try the following instead

    Set the attributes "column" for the column of the APPROVAL_DAL report to

    ID = #ROWNUM xxx_ #.

    Change the specification of the link for the approval column has a target type of URL. For the URL, specify

    JavaScript:SetLink('#APPROVAL_ID#','#IDR_ID#','xxx_#rowNum#')

    Add the JS in the header HTML page below

    
    

    CITY

Maybe you are looking for

  • Random text messages

    Hello So I was at a wedding on Saturday night. There was no signal (by phone or text), but there was wifi. I just went to my messages text loads since then and noticed messages, looks like they are sent those. In a language that resembles Chinese. An

  • Satellite R630 DVD drive is power off and cannot turn on again

    For the first time, I tried to use DVD drive to install software. However, I found that his power was turned off. I checked the manual, which suggests that the FN + TAB key to turn on. But nothing happened after that I indexed both keys. I don't know

  • Satellite L50D-B-131 - several problems: touchpad, keyboard, internet

    Hi all! I've had my laptop for a while, but I never really had time to take care of the problems accompanying. Since I'm away, all the way in July, my touchpad doesn't work properly.As simple as that. It would work for a few seconds at the start, the

  • How to watch movies on my TV via Qosmio F20-136?

    How can I the F20-136 by using the windows media Center to watch and listen to movies on my TV?

  • Product key Vista - where can I find it?

    I bought an upgrade to windows 7, but I need my vista product key to go forward. I have a HP with Vista Business installed.  When I bought the PC, I have not received any vista disks.  I had a sticker on the bottom that had the key on, but as it is n