Casting or Conversion?

Hello,
Suppose I have the following scenario:
class A { ... }
class B extends A { ... }
class C
     public C(A a) { ... }
     public C (B b)
           this((A)b); //Casting or conversion???
}My question is what exactly happens in the line with the comment: Casting or conversion? When does Java do each of them?
Thanks.

Thanks for all your replies. Now suppose I want to
alter an object of type B to an object of type A and
not cast it. How can I do that?Java has reference semantics for objects only. This means that when an object gets assigned to a variable it's not the object value that's assigned. The object values is "on the heap" and stays there. What's get assigned is always a reference to the object.
In C++ on the other hand you have both reference and value semantics available for objects. Now if you assigned a B object to an A variable BY VALUE then the B portion of the object will be "sliced off". The B object will get altered and become an A object. The B'ishness gets lost in the process.
This kind of "slicing" assignments can never happen in Java because it has reference semantics for objects only. Only references get assigned.

Similar Messages

  • How do I cast an heir in an argument mapping?

    I'd like to be able to use a generalization of an instance variable in my main process flow but inside of a subprocess or screenflow to use a specialization(heir) of the variable. I've tried every combination of cast or conversion syntax in the argument mapping but it will not allow me to save. I've also tried the inverse with a specialization cast into the generalization with no luck.
    Is this possible? Is there another mechanism to accomplish this?
    -Matt
    Edited by: Matt Pichette on Apr 30, 2009 2:06 PM

    Hi Matt,
    Even with inheritance, I don't think you'll be able to cast an incoming argument variable BPM Object to an instance variable that is a BPM Object of another type.
    Know you know this, but if you have defined a "Person" BPM Object; you might also have a "Client" BPM Object. You can make the Client object inherit the attributes and methods from the Person object if you double click the Client object in the catalog -> click the "Properties" tab in the upper right corner -> change the "Type Inheritance" to "Type" and change the "Inherits Type" to "Person". If you're creating the inheritance by right mouse clicking the Person object and clicking "Create Heir" you're doing almost the same thing except you're creating the Client object with "Behavior" inheritance.
    When you write the logic that sets the Client object to the Person object everything looks like it's okie dokie:
    <pre class="jive-pre"><p />p as Person
    c as ClientType
    p.id = "1234"
    if c is Person then
    display "Hey I'm a person"
    if c is ClientType then
    display "Hey I'm also a client!"
    // try casting the pup right here (this is going to cause an error at runtime)
    c = ClientType(p)
    end
    end
    display c.id</pre>
    If you defined the Client object with Behavior inheritance you'll have syntax error in the statement that casts the person object into the Client (the "c = ClientType(p)" statement). If you used Type inheritance, you won't have a syntax error, but when you try running this the logic you will instead get a runtime error.
    Sure you've probably already thought of these, but here are a couple ideas.
    (1) Consider creating the Client object without inheritance and instead add the Person object as an attribute of the Client. This would have the advantage of easily setting all the parent's attributes inside the Client with just one line of logic:
    <pre class="jive-pre"><p />p as Person
    c as Client
    c.person = p</pre>
    (be sure to set the "person" attribute to the Person object's constructor inside the Client object's constructor).
    The obvious drawback to this approach is that it's not using inheritance, but the advantages are that
    a) you're still able to use the attributes and methods of the Person object
    b) you're able to set (not cast) the Person attribute in a single line of logic ("c.person = p") and
    c) as additional attributes get added to the Person object you will not have to edit this logic to set the additional attributes.
    (2) (you're going to hate this idea) Consider biting the bullet and forget casting. Keep the inheritance, but set each of the individual attribute in the Client object to the corresponding attribute in the Person object.
    The drawback to this is significant. You're going to have a line of code to set each individual attribute. If you add more attributes to the Person object, you'd have to remember to add more lines of code to set these new individual attributes as well in the Client.
    Sorry - wish I had a better answer for you,
    Dan

  • How to create dynamic strcture and accepting runtime value in work area

    Hi,
    I am using RFC_READ_TABLE for  joining more than table  and written select query but  into clause work area value is passed but it is short dump is displaying with too few many fields  in into clause .work area WA need some casting type conversion which accepts the some run time value  and should have some structure  for it.how to create dynamic structure?

    hi
    good
    go through this and use in your report accordingly.
    If you are trying to read some information from SAP and you can't find the right BAPI then RFC_READ_TABLE can do the job for you.
    RFC_READ_TABLE is powerful RFC it gives you the access to all tables and views in SAP. I basically used RFC_READ_TABLE for Material Master Search application on the Intranet.
    Now you may say there are lots of BAPI for this functionality. You are right but I had to work around the BAPI to get Prices (Moving Average Price) and it just did not work very well. Because of the nature of the application I had to use RFC_READ_TABLE because then I can use powerful SQL expression for searching. RFC_READ_TABLE give you the ability to code the where clause which is quite enough.
    I have included part of the code use in asp page to read ENT1027 for Mgroup and M description & number but without object creation. The other part of the code reads MBEW for price & quantity.
    Code
    lt;%
    '#######################Diming the Structures
    Call BAPIRFC.DimAs("Rfc_Read_Table", "FIELDS", MaterialSelection_RS)
    Call BAPIRFC.DimAs("Rfc_Read_Table", "OPTIONS", Selection_RS)
    '########################Search Type########################
    ' C contanis
    ' S Start with
    ' E Ends with
    if searchtype = "C" then
    FormatedSearch_Keyword = "%" & Search_Keyword & "%"
    elseif searchtype = "S" then
    FormatedSearch_Keyword = Search_Keyword & "%"
    else searchtype = "E" then
    FormatedSearch_Keyword = "%" & Search_Keyword
    end if
    '################# Flaged for deletion Materials #####################
    if showdeleted = "No"  then
    Selection_RS.AddNew Array("TEXT"),Array("LVORM <> 'X' AND")
    end if
    '############## users can search three material group ################
    '############## GROUPS: OFFICESUP TECOMHARD TECOMSOFT ###############
    '##USER STILL CAN NAROW THEIR SEARCH BY SELECTING ON OF THREE#########
    if MGroup = "ALL"  then
    Selection_RS.AddNew Array("TEXT"),Array("MATKL IN ('OFFICESUP','TECOMHARD','TECOMSOFT')")
    else
    Selection_RS.AddNew Array("TEXT"),Array("MATKL = '"& MGroup &"' and ")
    end if
    '#######################ADDING SEARCH KEYWORD TO STRUCTURE##############
    if not  Search_Keyword = "" then
    Selection_RS.AddNew Array("TEXT"),Array(" MAKTG LIKE '" & FormatedSearch_Keyword &  "'")
    end if
    Selection_RS.Update
    '#######################ADD RETURNED FIELDS#########################
    MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MATNR","000000","000000" ,"","")
    MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MATKL","000000","000000" ,"","")
    MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MAKTG","000000","000000" ,"","")
    MaterialSelection_RS.Update
    call BAPIRFC.Rfc_Read_Table("ENT1027", Material_RS, MaterialSelection_RS, Selection_RS, "~", "", "0", "0")
    If Err.Number > 0 then
                   Response.Write "Error:" & "<BR>"
                   Response.Write "   Err.number...... " & Err.Number & "<BR>"
                   Response.Write "   Err.Description. " & Err.Description & "<BR>"
    end if
    '###########LOOP THROUGH RECORDSET
    if not Material_RS is nothing then
    do while not Material_RS.eof
    loop
    end if
    %>
    thanks
    mrutyun^

  • Constructor Method parameter problem

    I write my class whit this constructor method.
    public Immobile(int id, String complesso, String tipoed,double prezzo) {
    this.id = id;
    this.complesso = complesso;
    this.tipoed =tipoed;
    this.prezzo = prezzo;
    in my app i want to create an object of Immobile class:
    Immobile imm = new Immobile(1,"nuovo",null,2);
    Always is ok
    if I don't want to pass the String parameter I set it whit null.
    But if I don't want to pass an integer like first parameter, or double like prezzo parameter, How can I do this?
    I don't want to use Overloading of method because if the Immobile class have for example 30 parameter, i don't want to write 30 constructor method.
    There is any possibility?

    I think that my design is ok.Two competent developers and me disagree with you.Sign me in here. Every time I get code with methods with more than 4 parameters I shudder.
    A class with 30 constructor parameters is probably a class with 30 fields and more often than not those class fields can be refactored in smaller classes, like ...
    I think that made a class User whit parameter Name,
    Surname, address, telefon, fax is ok
    and i think that a user probably haven't a fax.
    I think that one way can be to use all the parameter
    like String, that accept null, next, casting orsome
    conversion before insert in a database
    What do you think about this?Surname, address, telephone and fax give you 30
    variables? What are you doing, show a small piece of
    relevant code....
    class ContactInfo class for tel, fax, mail, pager.
    class Adress for City, street, country, etc.
    and so on.
    I don't know if BiggDaddy 's sugestion comes in hand in any problem solution but I know that it can very easily come out of hand, I worked on a system where everything was passed down through 2 parameters, that where in fact 2 arrays of parameters.
    The system was a mess, very hard to understand and to test, and bugs popped around in production time.
    May the code be with you.

  • Can't get color right when scanning & printing

    Hi all. I'm having an interesting (and frustrating!) problem with colour and scanning...
    I have a new Brother mfc-9840cdw, and am scanning across the network using it. I find that on some Macs black text and gray shading has a distinct green cast both on the screen and when printed back to the mfc. My main iMac screen has been profiled using a Spyder2 Express, and has this green problem. However, on a Macbook Pro (MBP) scans are the correct colour and print properly. Interestingly, if I take a jpg file produced via a scan on the MBP, open it in Preview on my iMac then print it in colour, it takes on the green cast. Conversely, if I take a file produced by the iMac and print it on the MBP, it prints properly. Same file, same drivers, same settings, everything. This has me really confused! I can't see how the same file can print differently to the same printer using the same driver. I've tried Brother colour and Colorsync colour in the driver settings, all to no avail.
    I notice that in the "Adjust image" settings for the TWAIN driver, there are options to use a colorsync profile "Brother sRGB profile". This doesn't help either. A profile never gets embedded in a resultant jpg file, according to Preview.
    Any ideas why I'm seeing this weird behaviour?

    Have you made sure you are scanning in B&W? This sounds like you are scanning it in color -- black takes on a green cast sometimes when scanned in color.
    Good luck

  • About TO_SIGNED function

    Hello, everyone:
    I'm study with xapp794,and there is a signal means SerdesCntr in the file of iserdes_control.vhd , the assignment of the signal is like "  SerdesCntr     <= std_logic_vector(TO_SIGNED(3,(SerdesCntr'high+1)));   ", so, what does TO_SIGNED function means,and where can I find the funtion
    Thanks a lot 
    Best wishes
     

    VHDL Type Conversion
    Any given VHDL FPGA design may have multiple VHDL types being used. The most common VHDL types used in synthesizable VHDL code are std_logic, std_logic_vector, signed, unsigned, and integer. Because VHDL is a strongly-typed language, most often differing types cannot be used in the same expression. In cases where you can directly combine two types into one expression, you are really leaving it up to the compiler or synthesis tool to determine how the expression should behave, which is a dangerous thing to do.
    This article will discuss the following concepts:
    1. Type casting and conversion functions.
    2. The importance of using the appropriate type.
    3. Common uses and examples.
    VHDL Type Cast and Conversion Functions
    The picture below illustrates how to convert between the most common VHDL types.
    Type casting is used to move between the std_logic_vector type and the signed and unsigned types.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    --signal definitions
    signal slv : std_logic_vector(7 downto 0);
    signal s : signed(7 downto 0);
    signal us : unsigned(7 downto 0);
    --FROM std_logic_vector TO signed/unsigned
    sgn <= signed(slv);
    usgn <= unsigned(slv);
    -- FROM signed/unsigned TO std_logic_vector
    svl <= std_logic_vector(sgn);
    svl <= std_logic_vector(usgn);
    Functions are used to move between signed and unsigned types and the integer type.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    --signal definitions
    signal i : integer;
    signal sgn : signed(7 downto 0);
    signal usgn : unsigned(7 downto 0);
    --FROM integer TO signed/unsigned
    sgn <= to_signed(i,8);
    usgn <= to_unsigned(i,8);
    -- FROM signed/unsigned TO integer
    i <= to_integer(sgn);
    i <= to_integer(usgn);
    An easy way to remember when to use function or type cast is to remember that both the std_logic_vector and signed/unsigned types both are defined with a specific bit width, while integers do not define a bit width.
    A type cast between std_logic_vector and signed/unsigned can be used as long as the origin and destination signals have the same bit width. Integers do not have a set bit width, which is why the conversion function from integer to signed/unsigned includes a specification of the intended bit width.
    As a side note on integers:
    Notice that there is no direct conversion path between the std_logic_vector type and the integer type. Integer types do not have a set width, unlike signed, unsigned, and std_logic_vector types. To convert between integer and std_logic_vector types, you must first convert to signed or unsigned.
    If you do not restrict the range when defining an integer, the compiler will assume a 32-bit width. Depending on your synthesis tool and its settings, the default bit width of 32 may or may not be optimized out to the appropriate bit width.
    Using the Correct VHDL Type
    Although it’s possible to perform many math functions using the std_logic_vector type, doing that is unnecessarily difficult in digital signal processing (DSP) designs. Use the signed and unsigned types to keep track of your precision and sign type. After all, why use VHDL if you’re not going to harness the power of the strong typing?
    Don’t leave it up to the compiler or synthesis tool to figure out what operation you want to perform or what an expression result should be!
    Common Uses and Examples
    Some common examples of situations needing to use type casting or conversion are in mathematical expressions. Another very common use is when you want to use a counter value as in index into an array. There are many more uses, but we’ll just take a look at these two.
    Take a look at what happens when we subtract two unsigned numbers:
    1
    2
    3
    4
    5
    6
    signal sum_u : unsigned(11 downto 0);
    signal sum_s : signed(11 downto 0);
    constant a : unsigned(3 downto 0) := X"A";
    sum_u <= counter_fr + (X"00" & a);
    sum_s <= signed(counter_fr) + signed(X"00" & a);
    Depending on whether the result is defined as signed or unsigned, the results are drastically different.  When counter_fr holds the value 1000 (binary), sum_u=18 and sum_s=2.  That’s because the binary value 1000 is 8 unsigned and -8 two’s complement signed.
    Another common use is converting a std_logic_vector or unsigned type to an integer so that it can be used as an array index. Arrays can only be indexed with integers.
    1
    2
    3
    4
    5
    constant vec : std_logic_vector(15 downto 0);
    signal count : std_logic_vector(3 downto 0);
    signal element : std_logic_vector(0 downto 0);
    element <= vec(to_integer(unsigned(count),4));
     

  • Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'Microsoft.ReportingServices.DataProcessing.IDataReader'. An explicit conversion exists (are you missing a cast?)

    Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'Microsoft.ReportingServices.DataProcessing.IDataReader'. An explicit conversion exists (are you missing a cast?)
    I am getting the above error in c#. Please help me. Thanks in advance
    public IDataReader ExecuteReader(CommandBehavior behavior)
    string query = "select * from Sales.Store";
    SqlConnection readerconn = new SqlConnection("Data Source=localhost;Initial Catalog=AdventureWorks2000;Integrated Security=SSPI");
    SqlCommand readercmd = new SqlCommand(query);
    try
    readerconn.Open();
    readercmd = readerconn.CreateCommand();
    readercmd.CommandText = query;
    readercmd.CommandType = System.Data.CommandType.Text;
    SqlDataReader TestReader = readercmd.ExecuteReader();
    return TestReader; //Getting error at this line
    readerconn.Close();
    catch (Exception e)
    throw new Exception(e.Message);

    Hi,
    Please firstly take a look at the documentation:
    IDbCommand.ExecuteReader
    Method
    Users do not create an   instance of a
    DataReader   class directly. Instead, they obtain the
    DataReader   through the
    ExecuteReader   method of the Command   object. Therefore, you should mark
    DataReader   constructors as internal.
    You need to use this method to get the IDataReader object, all the IDbCommand and IDataReader are in the Microsoft.ReportingServices.DataProcessing namespace. There's another IDataReader object which is in System.Data namespace, but they're actually two different
    objects, that's why you got the exception.
    For how to properly implement this Microsoft.ReportingServices.DataProcessing.IDataReader, please check this documentation:
    Implementing a DataReader Class for a Data Processing Extension
    It also provides code samples there.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Casting conversion in JLS3 draft

    Seems to be missing a post-boxing widening reference conversion:class C {
      Object o1 = (Comparable<Float>)1.0f; // ok
      Object o2 = (java.io.Serializable)false; // ok
    }Please ignore the Objects on the left-hand-sides - they are there only to give the casts somewhere to exist.
    Anyway, "5.5 Casting Conversion" says: "Casting contexts allow the use of ...a boxing conversion (�5.1.7)." but it there is no optional post-boxing widening reference conversion as there is under assignment conversion and method invocation conversion. Given that fact, it seems that those two statements shouldn't compile, or the jls should change.

    Actually, if you notice, I specifically mention boxing.
    You're right that Float->Object ends up as a nop in the bytecode, and it is allowed by the draft jls3.
    But float->Float->Object does not work out to a nop in the bytecode - a Float is actually allocated.
    In any case, what happens in the bytecode or internally in the compiler is sort of irrelevant, because according to the draft jls3, the two statements in the example should never make it past the compiler.
    You can't have a cast of the form (Type)arg if arg's compile-time type is not convertible to Type via "casting conversion"... and "float" is not casting-convertible to "Object" according to the rules of the draft jls3.
    Of course, it's probably just an omission in the spec itself and not cause for alarm.

  • Conversion or Casting................

    Hi
    I think i got a superb question.:)Let me explain u first.
    Widening Conversion:::
    A conversion that accommodate wider range of values than the original type.e.g.,
    int in=25;
    double d=in; //is legal
    because int in is 32 bit and double d is 64 bit.
    int ---> double
    My Question:::
    According to defination of Conversion , how it is possible to assign long value to float with out casting???
    long lng=10;
    float fl=lng;//it is legal. why????
    because long is 64 bit and float is 32 bit.
    Is there any Duke $ for a superb question. lmao :)
    Thank you
    Jafery

    I think it's not really only a memory problem.
    In "int"-like types the information is stored usign directly binary coding:
    00000000 = 0, 00000001 = 1, 00000010 = 2, 00000011 = 3, ...
    whereas in "float"-like types it's much more complex:
    what you keep in your memory are, in fact, two numbers.
    One of them is an exponent (x), the other a multiplication constant (c). Your number is constructed as follows:
    c. exp(x), where exp(x) returns e^x (e = 2.718... I'm sure you've seen this number before)
    Of course, ideally c (but not necessarily x) should be also a real number (otherwise you loose a possibility of unlimited precission), but it is not possible (computers are discrete machines). For x and c binary coding ("int"-like) is used (I used to know the exact algorithm. I think 0<=c<1, ... something like 0.00111011110011 - quite funny, isn't it?
    and x is 8bit signed int - at least for float)
    If you start to think deeply about it, the conversion to floats can never be 100%ly precise. It is the reason why comparing some calculated floats to a constant/variable may fail:
    Ex. square equation: (x-x0)^2 + (y-y0)^2 = r^2 will never work, what you have to do is
    (x-x0)^2 + (y-y0)^2 - r^2 < delta)

  • Question about compile-time legality rules for cast conversion

    Hi, In the rules which explain compile-time legality for cast conversion, it is often mentioned the following scenario in the cast conversion of a compile-time type S to a compile-time type T:
    if S is a class type then:
    if T is a class type then either |S| <: |T| or |T| <: |S| or a compile time error occurs. Furthermore, if there exist a supertype X of T and a supertype Y of S such that X and Y are provably distinct parameterized types and that the erasures of X and Y are the same, a compile-time error occurs.
    As regards the quote in bold, I imagine the following scenario:
    1) S <: T and extends Y
    2) Y<T1...Tn>
    3) X<T1..Tn>
    4) T extends X
    Does the above represents a supertype X of T and a supertype Y of S such that X and Y are provenly distinct parameterized types? If that holds, what does it mean that the erasure of X and Y is the same?

    Declarative programing has all but gone the way of
    the doe doe because...
    1: It is not flexible (It is extremely difficult to
    change a complex system in a predetermined way)isn't this the "expert system" model?
    2: It lengthens the development cycle (see item 1)
    3: It normally forces the developer to add many
    things to there code to get things to work, that have
    nothing to do with the intent of the code.more things? the declarations or the declaration processing?
    In its defense (I like a declarative model but, do
    not like being forced into one)...not advocating a forced change in Java
    1: It increases code safety.
    2: It can shorten the development cycle, in certain
    circumstances (especially if it is not overused),
    because it can greatly increase the readability of
    code.
    3: It follows many best practices (although this is
    also possible in a Non-Declarative model).as for best practices what I'd like to see are declarative design patterns, Adapter, Singleton, Factory, Delegate, Strategy, Interpreter, Proxy, Visitor
    too often the design intent is lost in an implementation or design details can only be deduced by class/field/method names, comments, and accompanying docs
    So, if everyone had unlimited time, and an unlimited
    budget, yes declaritive is the way to go. Since that
    is not the case, we filtered out 99% of what it gave
    us, made sure the stuff that was getting in the way
    was removed, and what do you have???
    You guessed it OOA&D.
    Now having said that should we be more declarative? I
    think so, but I will tell you now, REQUIRING
    declarative elements in code is a sure fire way to
    get the majority of development groups to drop the
    language (and I think Java as it stands currently CAN
    be declarative, so if you have one of those unlimited
    budgets, go for it!).no need to require it
    I believe given good (reusable) declarative options, on top of OOP, will become the chosen approach
    reusable design declarations would lessen overall cost and increase readability

  • Rounding Differences between TSQL Cast and Data Conversion component

    This is using SSIS 2012.  We are using an Ole Db Connection manager using the Microsoft.ACE.OLEDB.12.0 provider.
    I have an Access database (accdb). It has several columns that are coming into SSIS as real data types.  One column has a value of 68.8335558900872.
    In the past we used the Data Conversion to convert from real to numeric 18, 6.  The result was 68.833555.  Rather than rounding on the last decimal place, it is returning the floor at six decimal places.
    We have converted the process to load the data into a real data type column and then use a view to cast the value to a Decimal 18,6 (CAST (Col1 as Decimal(18,6))).  We then load the data into a decimal 18,6 column.  The result is 68.833556, which
    is the rounded version of the real value.
    Personally I prefer the rounded version rather than the truncated version.
    I am trying to explain to explain to the QA people why the revised process is producing different results and thus I want to know if these are known behaviors for TSQL Cast and the Data Conversion component.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

    I think such a post is more suitable for an MS Connect bugs section as I see it a defect. And it seems no floor, but simply cutting off. Try in .Net when you convert, does it work the same? Data Conversion is a wrapper around the .net
    Arthur My Blog

  • Casting and radio select : conversion error

    I'd like to display radio options differently, regarding of their type.
    For example I have an OpenOption class which extends Option. So when I display it I'd like to add an input text box if the user select an open option :
                             <h:selectOneRadio value="#{q.answer}">
                                 <s:selectItems value="#{q.target.options}" var="opt" label="#{opt.text}" />                       
                                 <a:support event="onchange" reRender="pnlOpenText"/>
                             </h:selectOneRadio>                         
                             <a:outputPanel id="pnlOpenText">
                                     <h:panelGroup id="innerPnlOpenText" rendered="#{q.answer.class.simpleName eq 'OpenOption'}">
                                       <h:outputText value="#{q.answer.freeTextLabel}"/>&#160;
                                       <h:inputText value="#{q.freeText}" size="50"/>                                   </h:panelGroup>
                             </a:outputPanel>I use the following EL expression to test the type of the selected option :
    #{q.answer.class.simpleName eq 'OpenOption'}It works well BUT if I select the open option and refresh the page, the RadioRenderer fail when trying to convert ALL the options into OpenOption :
    Cannot convert Option[ id=null, text=Q1, rank=0 ] of type class Option to class OpenOptionFor the time being I see only one solution : put a type attribute in my Option class ... I believe this is not the best design.
    Is there any other workaround ?
    Would it be possible to have a renderer which doesnt infer the options type from the selected option but individually for each option ? I don't know anything about the spec ...
    Thanks,
    Bruno

    Java is case sensitive language after all , plus beans getters and setters naming rules :)
    SetConfirmClaim
    must be
    setConfirmClaim
    It raises a question though whether more exact error reporting is achievable , not just "Conversion error has occured".

  • Blue Cast on CR2 conversion to DNG

    I'm wondering if anyone can explain why CR2 files from a Canon 1D Mark II exhibit a strong blue cast when converted to DNG using the standalone Adobe DNG converter version 5.5.0.97 or Lightroom 2.5. (see examples below).
    Here's the test I conducted:  I first shot a JPEG image of an X-Rite grey card using Auto White Balance then used it to set a custom white balance in my 1D Mark II.  I then repeated the same test using a RAW file and in both instances the camera functions as expected.  However, when I converted the CR2 files to DNG they took on a strong blueish cast.
    For comparison purposes I then did the same test using a Canon 5D and those CR2 files do not show the blueish cast when converted to DNG.
    Here's a shot of the thumbnails as they appear in BreezeBrowser Pro (thumbnail color management enabled).  They look the same in Adobe Bridge too.  The first six thumbnails are from the Canon 1D Mark II and the second six are from the Canon 5D.
    Thanks for any help.

    The only thing wrong with your DNG is that the embedded preview was created with the WB set to something like Tungsten while the DNG metadata parameters say As Shot for the WB.  How it got that way you're going to have to figure that out.  I say this because both LR and Br show a brief blue flash when the image is initially imported, then it corrects to the As Shot WB.  This means the preview is bad but the parameters are ok.
    I'm going to guess you had the DNG open in LR and clicked or synced it to something like Tungsten from some other image, and then created the DNG with the preview, then corrected the WB in LR and then updated the DNG metadata without updating the preview--perhaps by having the Auto XMP writing turned on.
    I'd suggest removing the CR2 (and any associated DNGs) from the library, deleting any XMP, and starting over by importing the CR2 with As Shot parameters and convert directoy to DNG from W/in LR and see if you can make it happen, again.  If you figure it out, then tell us.  If you can't figure it out, then don't worry.  The CR2 and the DNG are ok and you can use them for creating your color profile with the passport software which ignores any edits you make to the DNG anyway.  Trying it with my Passport software shows a non-blue DNG with the green rectangles over the various squares, so the DNG, itself, is fine, just the preview is wrong.

  • Conversion/Type Cast of sys.XMLType to NUMBER and VARCHAR2

    How do we typecast or convert a variable of the type sys.XMLType to NUMBER and VARCHAR2?
    For e.g. I have a variable :-
    v_STATE sys.XMLType
    I want to convert it to either of the type NUMBER or VARCHAR2.

    How do we typecast or convert a variable of the type sys.XMLType to NUMBER and VARCHAR2?
    Your question is too vague to give a relevant answer.
    Typecasting doesn't make sense in this situation, XMLType is an opaque datatype, it's not like converting VARCHAR2 to NUMBER (or vice versa).
    Do you mean serializing the XML document, or extracting atomic node values, or something else ?
    Depending on your requirement, you may want to look for XMLSerialize() or XMLCast() functions.
    And on a side note, don't always expect people to search for your previous threads to find some useful information, such as a db version...

  • Conversion Casting Problem here....

    Hi,
    I can't find this on google.
    I need to go from a Double to an int.
    Notice its capitol D, cause its a "Double".
    Just need a quick response. Thanks.
    And yes I searched on google :(

    [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html#intValue()]Double.intValue

Maybe you are looking for

  • NASS Auto Loan Questions

    So I recently got approved for NASA membership and CC. I am also toying with the idea of getting a new car or truck. Currently drive a 07 Accord that has been paid of for a few years now. While I love having 0 car payments I kinda want something more

  • Apple Mail - HTML Signature Help

    I created a html signature that I assumed would work in Apple Mail, but when I send an email I get the images and links not showing up with blue ? appearing.  The signature looks fine in the signatures menu of my preferences. <Edited by Host>

  • OBIEE 11g  Pie Chart Settings /Axis titles

    Hi, In OBIEE 11g, it is not possible to change the Axis titles in a pie chart. Does anyone know how to change it in the xml file? Any feedback is highly appreciated. //Katherine Edited by: 1002173 on 2013-apr-24 03:56

  • Need to reinstall acrobat after computer crash

    Need to reinstall acrobat after computer crash

  • Won't sleep after HD installation

    I just installed a Seagate 300 GB drive on the ATA 66 bus. Now the energy saver settings don't seem to work. If I manually sleep the computer from the Apple menu, it wakes up by itself. Any thoughts on how to resolve this? Thanks! FYI, I have two oth