Problems with Subclassing

We are using a lot of subclass objects in our forms development. One in particular is a Block called Header which we pick up from a Library.fmb form. Sometimes when I inherit this block, in FormA, from the library I can click on any of the items and see the subclass information. Other times the items have the arrow in formA next to the item, but when you click on the button to view the information it says "Can't view source for the subclassed object".
The library form is open all the time when in development and as I say its only with some of the forms.
Can anyone shed any light on this?
Thanks,
Eileen

Check your library path, ie. check your registry setting for oracle_path and the path for your libraries. if you open the form in the existing library path.. all subclass objects should be visible, to edit them highlight them and drag them into program units.
or start your forms session in the relavent path.
Hope this helps.....

Similar Messages

  • Problem with subclassing of object groups

    Hi All,
    I've a template form which i use to create new forms (for creating our own toolbar, triggers etc).
    When i subclass the object group of template form to my new form, it creates form level triggers, toolbar data block etc in my new form.
    One of the trigger being subclassed is ON-ERROR form level trigger.
    The code inside this trigger is std_blk_on_error; // this procedure is a program unit written by us.
    But, when i try to compile this new form, it gives me internal error (deplu 3) on this trigger.
    Error 0 at line 1, column 1
    statement ignored.
    Can any one please help me with this?
    Regards,
    Navnit

    std_blk_on_error; // this procedure is a program unit written by us.or is the code
    std_blk_on_error;and this fails on all Forms ?
    and it works if you remove this trigger from the object group ?

  • Problem with subclass and super class

    here is the things i wanted to do
    /*Write a method that takes the time as three integer arguments (hours, minutes and seconds),
    and returns the number of seconds since the last time it was twelve o'clock.
    Write a program that uses this method to calculate the amount of time in seconds between two times,
    assuming both are within one twelve hour cycle of a clock.
    here is a class to find the last time closes to 120'clock in sec.
    import java.io.*;
    public class Timer {
         int converter = 60;
         int secinTwelveHour = 43200;
         int converter2 = 12;
    public int timerTime (int hour, int min, int sec){
              int totalSec = 0;
              //Finding the time
              if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour <= 11){
                   //find last 12 o'Clock
                   hour = converter2 + hour;
                   //change to sec time
                   totalSec = (hour * converter * converter) + (min * converter) + sec;
              }else{     
         if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour >= 12){
                   //find last 12 o'Clock in sec
                   totalSec = ((hour * converter * converter) + (min * converter) + sec) - secinTwelveHour;
         }else{
              return -1;
    }//End of return -1      
              }//End of first else statment
         return totalSec;     
         }//End of timerTimer
    }//End of Program     
    and here is the super class which uses the class aboved
    import java.io.*;
    public class FindTime {
    public int find2Time (int totalSec1, int totalSec2){
              int timeSec = 0;
              if(Timer.totalSec1 > Timer.totalSec2)
              timeSec = Timer.totalSec1 - Timer.totalSec2;
              else
              timeSec = Timer.totalSec2 - Timer.totalSec1;
         return timeSec;     
         }//End of find2Time
    public static void main( String [] arg){
         // Construct an instance of the Timer class
              Timer timerClass = new Timer();
              // Make a couple of calls of the method
              int totalSec1 = timerClass.timerTime(12, 3, 45);
              int totalSec2 = timerClass.timerTime(14, 23, 60);
              timeSec1 = find2Time (totalSec1, totalSec2)
              // Now print the values we got back
              System.out.println("Last closes Sec to 12 o'clock" + totalSec1);
              System.out.println("Last closes sec to 12 o'clock" + totalSec2);
              System.out.println("Last closes sec to 12 o'clock" + timeSec);
         }//End of main method
    }//End of Program     
    Now i'm having program with the compliing can anyone help me out like tell me what i'm doing wrong and give me a bit of a code so that i can have a push start
    thanks you

    Does this do what you want? It is in two seperate classes.
    import java.io.*;
    public class FindTime {
    public static void main( String [] arg){
    int timeSec = 0;
    // Construct an instance of the Timer class
         Timer timerClass = new Timer();
         // Make a couple of calls of the method
         int totalSec1 = timerClass.timerTime(12, 3, 45);
         int totalSec2 = timerClass.timerTime(14, 23, 60);
         timeSec = java.lang.Math.abs(totalSec1-totalSec2);
         // Now print the values we got back
         System.out.println("Last closes Sec to 12 o'clock " + totalSec1);
         System.out.println("Last closes sec to 12 o'clock " + totalSec2);
         System.out.println("Last closes sec to 12 o'clock " + timeSec);
         }//End of main method
    }//End of Program
    import java.io.*;
    public class Timer {
    int converter = 60;
    int secinTwelveHour = 43200;
    int converter2 = 12;
    public int timerTime (int hour, int min, int sec){
         int totalSec = 0;
         //Finding the time
         if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour <= 11){
         //find last 12 o'Clock
         hour = converter2 + hour;
         //change to sec time
         totalSec = (hour * converter * converter) + (min * converter) + sec;
         } else {
         if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour >= 12){
         //find last 12 o'Clock in sec
         totalSec = ((hour * converter * converter) + (min * converter) + sec) - secinTwelveHour;
         } else {
              return -1;
         }//End of return -1
    }//End of first else statment
    return totalSec;
    }//End of timerTimer
    }//End of Program

  • Problems with subclassing in Forms 6i

    When I subclass text fields and canvases in Forms I am not able to see them when they are compiled. The layout does not include any of the text fields for entering in data. When I un-subclass all the elements from an Oracle form I am able to see everything and it compiles fine; but the look and feel is completely different and some functionality such as searching does not work. When it is subclassed; it compiles and runs fine but the layout and functionality of the form is lost completely. In one case where I have tried using tabs, it looses all formatting leaving only the text identifiers for the fields and no tabs.
    Oracle Application Object Library
    Forms Version: 6i
    Platform : HP-UX PA-RISC (64-bit)

    EBS General Discussion General EBS Discussion is more appropriate forum for this issue. Close this thread and post there.
    --Shiv                                                                                                                                                                                                                                                                                                                                       

  • Problem with Subclassing

    I made a toolbar and subclassed it in another form but when i close the subclassed form and open it again it gives me error that it cannot find the source object.
    What is the proper way of subclassing and changing source module?
    Thanks

    unless there is at least one public or protected
    constructor in the Layer class definition you will not
    be able to subclass it. Since it is abstract and, I
    presume, is actually usable, then it is possible that
    all the constructors are package scoped so only other
    javax.microedition.lcdui.game classes may subclass
    it.
    i recommend scouring the class javadoc to make sure
    how it is to be used.
    dlgrassedlgrasse,
    Sun's javadoc documentation for the class (sadly not available online) says:
    -----8X----
    javax.microedition.lcdui.game
    Class Layer
    java.lang.Object
    |
    +-javax.microedition.lcdui.game.Layer
    Direct Known Subclasses:
    Sprite, TiledLayer
    public abstract class Layer
    extends Object
    A Layer is an abstract class representing a visual element of a game. Each Layer has position (in terms of the upper-left corner of its visual bounds), width, height, and can be made visible or invisible.
    Layer subclasses must implement a paint(Graphics) method so that they can be rendered.
    -----8X----
    Then follow a bunch of method descriptions etc.
    It might be possible that it is in fact not meant to be subclassed, but then why would they go into detail about how to subclass it?
    Also, the ready-made subclasses (Sprite, TiledLayer) are very specialized and thus not always useful, so it is more or less necessary to subclass from Layer.
    strange huh?

  • Problem with inheritance and outputting values in toString.

    Hey guys, i'm having a major problem with inheritances.
    What i'm trying to do with my program is to create objects in my demo class. Values are passed to several other objects that each do their own calculations of grades and results and then outputs the result in my toString. I followed step by step the instructions in my book on how to setup the inheritance and such. I can only output everything that was created in my superclass, any other thing that was created in an object that belongs to a subclass does not display in the output at all.
    Even if I change or create new instance variables, I can't figure out for the life of myself how to output the other values.
    Because there's so much code to be splitting on the forums, I zipped my whole project in a RAR. I'll link it here
    http://www.4shared.com/file/ZleBitzP/Assign7.html
    The file to run the program is CourseGradesDemo class, everything else is either a subclass or superclass to some part of the program. After you run CourseGradesDemo, you will see the output, and understand what displays and what stays at 0.0 value. If anyone can help me out with this it would be greatly appreciated
    Thanks in advance.

    Basshunter36 wrote:
    Hey guys, i'm having a major problem with inheritances.
    What i'm trying to do with my program is to create objects in my demo class. Values are passed to several other objects that each do their own calculations of grades and results and then outputs the result in my toString. I followed step by step the instructions in my book on how to setup the inheritance and such. I can only output everything that was created in my superclass, any other thing that was created in an object that belongs to a subclass does not display in the output at all.
    Even if I change or create new instance variables, I can't figure out for the life of myself how to output the other values.No idea what you're talking about. Provide an [url http://sscce.org]SSCCE.
    Because there's so much code to be splitting on the forums, I zipped my whole project in a RAR. I'll link it here
    http://www.4shared.com/file/ZleBitzP/Assign7.html
    Not gonna happen. Provide an [url http://sscce.org]SSCCE. And don't say you can't. You definitely can. You may have to spend an hour building a new program from scratch and getting it to reproduce the problem, but if you can't or won't do that, you'll find few people here willing to bother with it.

  • Problem with Drag and Drop (TransferHandler)

    I have a stern problem with the java.swing.TransferHandler. It shows a design weakness, and because of a tiny glitch I am currently not able to finish my task.
    The design weakness is that method importData(JComponent comp, Transferable t) does not pass the dropAction information in the parameter list. The application case in question is a transfer from a JTree to a JTree (might likewise be to/from a JList). The transfer semantics imply that partial success is possible (there are item identity and uniqueness considerations to handle). - I can deal with all detail demands except that I cannot discriminate between COPY and MOVE taking place in the transfer. Also I don't find any possibility to retrieve this information by subclassing TranferHandler or from any other element there.
    Is there any expert who knows a solution?

    I came up with two solutions. One is I modified my application requirements for the time being so the problem disappears. :)
    Second, I had the idea to create a subclass of javax.swing.TransferHandler and copy/override as many methods as necessary to allow for an extra method public boolean importData(JComponent comp, Transferable t, int action) and derive the extra value from a modified method DropHandler.drop(DropTargetDropEvent e) in a copy of the DropHandler.
    Whether this really works, I have not tested.
    As for your answer, Andre_Uhres, I don't find it elaborate enough that it leads to a solution, hence no stars rewarded. You leave it open how to get hold of the DropTarget events which are dealt with privately in javax.swing.TransferHandler.
    I consider the subject closed for my purposes. Thanks very much for your reply!

  • Problem with addRow and MultiLine Cell renderer

    Hi ,
    Ive a problem with no solution to me .......
    Ive seen in the forum and Ivent found an answer.......
    The problem is this:
    Ive a JTable with a custom model and I use a custom multiline cell renderer.
    (becuse in the real application "way" hasnt static lenght)
    When I add the first row all seem to be ok.....
    when I try to add more row I obtain :
    java.lang.ArrayIndexOutOfBoundsException: 1
    at javax.swing.SizeSequence.insertEntries(SizeSequence.java:332)
    at javax.swing.JTable.tableRowsInserted(JTable.java:2926)
    at javax.swing.JTable.tableChanged(JTable.java:2858)
    at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableMo
    del.java:280)
    at javax.swing.table.AbstractTableModel.fireTableRowsInserted(AbstractTa
    bleModel.java:215)
    at TableDemo$MyTableModel.addRow(TableDemo.java:103)
    at TableDemo$2.actionPerformed(TableDemo.java:256)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    64)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1817)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:419)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
    at java.awt.Component.processMouseEvent(Component.java:5134)
    at java.awt.Component.processEvent(Component.java:4931)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3639)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3480)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java:1590)
    at java.awt.Component.dispatchEvent(Component.java:3480)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    This seems to be caused by
    table.setRowHeight(row,(getPreferredSize().height+2)); (line 164 of my example code)
    About the model I think its ok.....but who knows :-(......
    Please HELP me in anyway!!!
    Example code :
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class TableDemo extends JFrame {
    private boolean DEBUG = true;
    MyTableModel myModel = new MyTableModel();
    MyTable table = new MyTable(myModel);
    int i=0;
    public TableDemo() {
    super("TableDemo");
    JButton bottone = new JButton("Aggiungi 1 elemento");
    table.setPreferredScrollableViewportSize(new Dimension(500, 70));
    //table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
    //Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(table);
    //Add the scroll pane to this window.
    getContentPane().add(bottone,BorderLayout.NORTH);
    getContentPane().add(scrollPane, BorderLayout.CENTER);
    bottone.addActionListener(Add_Action);
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    class MyTable extends JTable {
    MultiLineCellRenderer multiRenderer=new MultiLineCellRenderer();
    MyTable(TableModel tm)
    super(tm);
    public TableCellRenderer getCellRenderer(int row,int col) {
              if (col==1) return multiRenderer;
              else return super.getCellRenderer(row,col);
    class MyTableModel extends AbstractTableModel {
    Vector data=new Vector();
    final String[] columnNames = {"Name",
    "Way",
    "DeadLine (ms)"
    public int getColumnCount() { return 3; }
    public int getRowCount() { return data.size(); }
    public Object getValueAt(int row, int col) {
    Vector rowdata=(Vector)data.get(row);
                                                                return rowdata.get(col); }
    public String getColumnName(int col) {
    return columnNames[col];
    public void setValueAt (Object value, int row,int col)
         //setto i dati della modifica
    Vector actrow=(Vector)data.get(row);
    actrow.set(col,value);
         this.fireTableCellUpdated(row,col);
         public Class getColumnClass(int c)
              return this.getValueAt(0,c).getClass();
         public boolean isCellEditable(int row, int col) {
    //Note that the data/cell address is constant,
    //no matter where the cell appears onscreen.
    if (col == 1)
    return false;
    else
    return true;
    public void addRow (String name,ArrayList path,Double dead) {
         Vector row =new Vector();
         row.add(name);
         row.add(path);
         row.add(dead);
         row.add(name); //!!!Mi tengo questo dato da utilizzare come key per andare a
         //prendere il path nella lista dei paths di Project
         //(needed as key to retrive data if name in col. 1 is changed)
         data.add(row);
         //Inspector.inspect(this);
         System.out.println ("Before firing Adding row...."+this.getRowCount());
         this.fireTableRowsInserted(this.getRowCount(),this.getRowCount());
    public void delRow (String namekey)
    for (int i=0;i<this.getRowCount();i++)
    if (namekey.equals(this.getValueAt(i,3)))
    data.remove(i);
    this.fireTableRowsDeleted(i,i);
    //per uscire dal ciclo
    i=this.getRowCount();
    public void delAllRows()
    int i;
    int bound =this.getRowCount();     
    for (i=0;i<bound;i++)     
         {data.remove(0);
         System.out.println ("Deleting .."+data);
    this.fireTableRowsDeleted(0,i);          
    class MultiLineCellRenderer extends JTextArea implements TableCellRenderer {
    private Hashtable rowHeights=new Hashtable();
    public MultiLineCellRenderer() {
    setEditable(false);
    setLineWrap(true);
    setWrapStyleWord(true);
    //this.setBorder(new Border(
    public Component getTableCellRendererComponent(JTable table,Object value,                              boolean isSelected, boolean hasFocus, int row, int column) {
    //System.out.println ("Renderer called"+value.getClass());
    if (value instanceof ArrayList) {
    String way=new String     (value.toString());
    setText(way);
    TableColumn thiscol=table.getColumn("Way");
    //System.out.println ("thiscol :"+thiscol.getPreferredWidth());
    //setto il size della JTextarea sulle dimensioni della colonna
    //per quanto riguarda il widht e su quelle ottenute da screen per l'height
    this.setSize(thiscol.getPreferredWidth(),this.getPreferredSize().height);
    // set the table's row height, if necessary
    //System.out.println ("Valore getPreferred.height"+getPreferredSize().height);
         if (table.getRowHeight(row)!=(this.getPreferredSize().height+2))
         {System.out.println ("Setting Row :"+row);
             System.out.println ("Dimension"+(getPreferredSize().height+2));
             System.out.println ("There are "+table.getRowCount()+"rows in the table ");
             if (row<table.getRowCount())
             table.setRowHeight(row,(getPreferredSize().height+2));
    else
    setText("");
    return this;
    /**Custom JTextField Subclass che permette all'utente di immettere solo numeri
    class WholeNumberField extends JTextField {
    private Toolkit toolkit;
    private NumberFormat integerFormatter;
    public WholeNumberField(int value, int columns) {
    super(columns);
    toolkit = Toolkit.getDefaultToolkit();
    integerFormatter = NumberFormat.getNumberInstance(Locale.US);
    integerFormatter.setParseIntegerOnly(true);
    setValue(value);
    public int getValue() {
    int retVal = 0;
    try {
    retVal = integerFormatter.parse(getText()).intValue();
    } catch (ParseException e) {
    // This should never happen because insertString allows
    // only properly formatted data to get in the field.
    toolkit.beep();
    return retVal;
    public void setValue(int value) {
    setText(integerFormatter.format(value));
    protected Document createDefaultModel() {
    return new WholeNumberDocument();
    protected class WholeNumberDocument extends PlainDocument {
    public void insertString(int offs,
    String str,
    AttributeSet a)
    throws BadLocationException {
    char[] source = str.toCharArray();
    char[] result = new char[source.length];
    int j = 0;
    for (int i = 0; i < result.length; i++) {
    if (Character.isDigit(source))
    result[j++] = source[i];
    else {
    toolkit.beep();
    System.err.println("insertString: " + source[i]);
    super.insertString(offs, new String(result, 0, j), a);
    ActionListener Add_Action = new ActionListener() {
              public void actionPerformed (ActionEvent e)
              System.out.println ("Adding");
              ArrayList way =new ArrayList();
              way.add(new String("Uno"));
              way.add(new String("Due"));
              way.add(new String("Tre"));
              way.add(new String("Quattro"));
              myModel.addRow(new String("Nome"+i++),way,new Double(0));     
    public static void main(String[] args) {
    TableDemo frame = new TableDemo();
    frame.pack();
    frame.setVisible(true);

    In the addRow method, change the line
    this.fireTableRowsInserted(this.getRowCount(),this.getRowCount()); to
    this.fireTableRowsInserted(data.size() - 1, data.size() - 1);Sai Pullabhotla

  • Problem with Request for Permissions (mobile app)

    In my application I want to publish the results of the games on facebook. I used this tutorial: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html
    Here is a fragment of my source code:
    <fx:Script>
            <![CDATA[
                import com.facebook.graph.FacebookMobile;
                import mx.events.Request;
                import valueObjects.GlobalVariables;
                protected var extendedPermissions:Array = ["publish_stream","user_website","user_status","user_about_me"];
               protected function initApp():void
                    FacebookMobile.init("app ID",loginHandler);
                protected function loginHandler(success:Object,fail:Object):void
                    if(success){   
                        currentState="loggedin";
                        nameLbl.text=success.user.name;
                        userImg.source=FacebookMobile.getImageUrl(success.uid,"small");
                        birthdayLbl.text=success.user.birthday;
                        FacebookMobile.api("/me/statuses",getStatusHandler);
                    else{   
                        this.login();
                protected function login():void
                    FacebookMobile.login(loginHandler, stage, []);
                protected function logout():void
                    FacebookMobile.logout();
                    currentState="loggedout";
                protected function getStatusHandler(result:Object, fail:Object):void
                    statusLbl.text=result[0].message;
                protected function submitPost():void
                    FacebookMobile.api("/me/feed",submitPostHandler,{message:GlobalVariables.d.toString()}, "POST");
                protected function submitPostHandler(result:Object,fail:Object):void
                    FacebookMobile.api("/me/statuses",getStatusHandler);
            ]]>
        </fx:Script>
    I have problem with permissions. After login I see a white screen instead of request for permission.  The desktop application does not have a problem with it. When I log for the first time to the desktop application and I will give the permissions applications, then in the mobile application everything works fine. But this is not a good solution. And so please help.

    The labelField of IconItemRenderer only supports single line text.  Try using the messageField instead:
    <s:List width="200" height="200">
        <s:dataProvider>
            <s:ArrayList>
                <s:DataItem desc="1 Hello World Hello World Hello World" />
                <s:DataItem desc="2 Hello World Hello World Hello World" />
                <s:DataItem desc="3 Hello World Hello World Hello World" />
            </s:ArrayList>
        </s:dataProvider>
        <s:itemRenderer>
            <fx:Component>
                <s:IconItemRenderer labelField="" messageField="desc">
                </s:IconItemRenderer>
            </fx:Component>
        </s:itemRenderer>
    </s:List>
    If you need more control you might need to subclass, this post might help: http://flexponential.com/2011/08/21/adding-multiline-text-support-to-labelitemrenderer/

  • Alpha channel problem with Pixel Bender blendShaders

    I'm using Pixel Blender to try and create a blend shader for a Flex 4.0 app.
    It looks like this:
    <languageVersion : 1.0;>
    kernel PixelReverse
    <   namespace : "com.abc.def.filters";
        vendor : "EdAlive";
        version : 1;
    >
        input image4 foreground;
        input image4 background;
        output pixel4 dst;
        void
        evaluatePixel()
            pixel4 fgPixel = sampleNearest(foreground, outCoord());
            pixel4 bgPixel = sampleNearest(background, outCoord());
            if((bgPixel.r == 0.0) && (bgPixel.g == 0.0) && (bgPixel.b == 0.0) && (bgPixel.a == 0.0)){
                bgPixel.r = bgPixel.g = bgPixel.b = 1.0;
            dst.r = 1.0 - abs(fgPixel.r - bgPixel.r);
            dst.g = 1.0 - abs(fgPixel.g - bgPixel.g);
            dst.b = 1.0 - abs(fgPixel.b - bgPixel.b);
            dst.a = fgPixel.a;
    It looks correct in the Pixel Bender preview window.
    When I use it in a Flex project with proper 32 bit png images, the filter seems to work correctly, except it sets any partial alpha value on the images to fully opaque (like a 1 bit alpha channel).
    Because the image preview looks correct in Pixel Bender, I'm assuming it's a problem with the bitmap data that Flex is passing to the blend shader filter.
    I tried changing the filter to simply output a copy of the foreground firstly, and the background second, to test.
    When returning a copy of the foreground, the imags weren't visible on stage, either because the pixels were transparent or because it was really returning the background pixels, camouflaging the images.
    When returning a copy of the background, the images were just black rectangles.
    The images are being place on stage programmatically inside an mx Module, and having their depth property set.
    They also have draggable behaviour, where the current drag object is layered above all else during the drag.
    I'm actually using a subclass of mx.controls.Image, but am simply setting the source property with preloaded bitmap data, so I'm am fairly sure the subclass is not a factor.
    I hope this is enough information for someone to be able to provide some help.
    Thanks

    Please make sure you have installed the latest graphics drivers, from http://www.nvidia.com/Download/index.aspx?lang=en-us, for your graphics card.

  • Design flaw in overloading? Problem with visitor pattern

    I have been trying some implementations of the Visitor pattern in Java and have encountered a problem with overloaded methods in Java. It seems that the caller (client) of a overloaded method decides what implementation of that method is chosen. I find that strange from an OO / encapsulation point of view and it gets me into problems when using Visitor. This code shows my problem:
    // a class with overloaded methods
    public class OverLoadingTest {
         public void print(String s) {
              System.out.println("This looks like a String to me:");
              System.out.println("\"" + s + "\"");
         public void print(Object o) {
              System.out.println("This looks like an Object to me:");
              System.out.println("\"" + o + "\"");
    //a client for that class
    public class OverLoadingTestClient {
         public void test() {
              OverLoadingTest test = new OverLoadingTest();
              Object o1 = "String in an Object reference";
              String s1 = "String in a String reference";
              test.print(o1);
              test.print(s1);
         public static void main(String[] args) {
              new OverLoadingTestClient().test();
    //And the output is:
    This looks like an Object to me:
    "String in an Object reference"
    This looks like a String to me:
    "String in a String reference"
    //The output I would have expeced (wanted):
    This looks like a String to me: //it is a String!
    "String in an Object reference"
    This looks like a String to me:
    "String in a String reference"
    Why is this? Is there a work around?

    The specific method is decided on in compile time and by the client of that method, not the provider. I'd expect the client to just invoke the method and let the privider figure out what implementation to choose. Whatever the client thinks that he is providing as argument types.
    I am implementing a slightly different version compared to http://ootips.org/visitor-pattern.html. I find implementing "v.visit(this);" for every subclass of the Visisted superclass strange. Why an abstract method "accept(Visitor v);" when all subclasses will iplement it in the same way ("v.visit(this);")?
    Daan

  • Problem with JFormattedTextField

    Hi,
    I Want to set Max length of text in JFormattedTextField..
    I've tried to extend PlainDocument and override insertString and updateString, but it doesn't work.
    How can do it.
    Thanks.

    I've solved the problem with a subclass of DocumentFilter.
    Overriding the following methods : insertString,remove and update

  • CurrentUISkin  problem with LOVs

    Hello JheadStart Team
    I'm using user selected skin by using menuAdminService and setting adf-faces-config to
    <skin-family>#{jhsDynamicMenu.currentUISkin}</skin-family>
    but i have problem with LOV's:
    Error getting property 'currentUISkin' from bean of type oracle.jheadstart.controller.jsf.bean.DynamicMenuBean: java.lang.RuntimeException: Cannot find JhsModelService, Binding container UsersPageDef data control data provider is null
    Kind regrads

    I was able to reproduce the problem. We will provide a fix in the next patch release.
    For now, you can apply the fix yourself as follows:
    - create a subclass of oracle.jheadstart.controller.jsf.bean.DynamicMenuBean
    - Add member variable to this class:
    private String myCurrentUISkin;
    - Override method setCurrentUISkin as follows:
    public void setCurrentUISkin(String currentUISkin)
    this.myCurrentUISkin = currentUISkin;
    - Override method getCurrentUISkin() as follows:
    public String getCurrentUISkin()
    try
    if (JhsModelServiceProvider.getInstance().getJhsModelService() !=null)
    setCurrentUISkin((String) getCurrentModule().getAttribute(SKIN_ATTRIBUTE_NAME));
    catch (Exception e)
    // do nothing, return "previous" currentUISkin;
    return this.myCurrentUISkin;
    - Make a custom template for JhsCommonBeans.vm. In this template replace oracle.jheadstart.controller.jsf.bean.DynamicMenuBean with your own fully qualified class name
    - Set the JHS_COMMON_BEANS template key at service level to your custom template
    - Generate again.
    Steven Davelaar,
    JHeadstart Team.

  • Problems with Factory pattern

    Sorry... I know this topic has been done to death but I still have some questions.
    In my development, I keep encountering a recurring problem that I believe should be solved by the 'factory pattern'. (Note: I'm not a patterns nut so I am only guessing about the correct pattern).
    Here is the problem:
    I develop an abstract base class. I extend the base class with several subclasses. Exterior objects use the instances via a base class reference and I don't want to them to have to know which is the correct subclass or how to create the instance.
    My solution is to make a create(param, param,...) method in the base class and using the param(s) construct the instance something like:static Foo create(int type)
    Foo instance = null;
    String className = "com.myco.foos.DefaultFoo";
    if(CONST_A == type)
      className = "com.myco.foos.FooA";
    else if(CONST_B == type)
      className = "com.myco.foos.FooB";
    {on and on...}
    {using reflection create a new instance from the className String}
    return instance;
    }The obvious problem with the create() method is that it becomes a maintenence point and I don't like the idea of a base class knowing about subclasses.
    Anyone know better a solution? Comments?
    Thanks in advance.

    Yes, that is the Factory pattern you describe. The client programs are going to call your createFoo() method and get back an instance of a subclass of Foo. Typically this pattern is used where there is some external entity that determines what subclass will be returned -- for example a system property -- and the client programs call createFoo() with no arguments. In this case reflection is used to create the instance, and your base class does not need to know anything about any subclasses.
    However, if your client programs can influence the choice of subclass, then they will have to pass some kind of parameter into createFoo(). At this point, createFoo() requires some decision logic that says "create this, or that, depending on the input parameter". And if that parameter is simply a code that enables the client programs to say "Give me a ChocolateFoo instance", then returning "new ChocolateFoo()" is the most straightforward design. But in this case, why can't the client program do that?
    If you don't like the base class having to know about subclasses (and you shouldn't be happy if it does), then you could have a helper class -- FooFactory -- that contains only the static method createFoo(). This class would know about Foo, and about any of its subclasses that it can produce instances of. It's still a maintenance point, no avoiding that, but at least it is off by itself somewhere.

  • Problems with Generics

    Ok, I have a problem with the <? extends NamedType> generic parameterized type, here are three example classes:
    public abstract class Base
         public abstract <? extends Base> getMe();
    public abstract class Spec
    extends Base
         public abstract <? extends Spec> getMe();
    public class Impl
    extends Spec
         public Impl()
              super();
         public Impl getMe()
              return this;
         public String toString()
              return "I live!";
    }And a main method in another class:
    public static void main(String[] args)
         Impl im = new Impl();
         Impl i = im.getMe();
         Spec s = Spec.getMe();
         Base b = Base.getMe();
         System.out.println("im = "+im);
         System.out.println("i = "+i);
         System.out.println("s = "+s);
         System.out.println("b = "+b);
    }And the compiler returns this:
    Base.java:3: <identifier> expected
            public abstract <? extends Base> getMe();
                             ^
    Base.java:3: > expected
            public abstract <? extends Base> getMe();
                                                    ^
    Spec.java:4: <identifier> expected
            public abstract <? extends Spec> getMe();
                             ^
    Spec.java:4: > expected
            public abstract <? extends Spec> getMe();
                                                    ^
    4 errorsPlease assist.

    It worked!
    I don't know why that didn't work in Eclipse, so:
    "Return types are compatible if the overriden method's return type is a subclass of the original method's return type."
    I also mistyped the main method, but this new one didn't change the original error:
    public static void main(String[] args)
         Impl im = new Impl();
         Impl i = im.getMe();
         Spec s = Spec.getMe();
         Base b = Base.getMe();
         System.out.println("im = "+im);
         System.out.println("i = "+i);
         System.out.println("s = "+s);
         System.out.println("b = "+b);
    }should be:
    public static void main(String[] args)
         Impl im = new Impl();
         Impl i = im.getMe();
         Spec s = i.getMe();
         Base b = s.getMe();
         System.out.println("im = "+im);
         System.out.println("i = "+i);
         System.out.println("s = "+s);
         System.out.println("b = "+b);
    }

Maybe you are looking for

  • VPN clients cannot access inside network

    I have a ASA 5505 that I am using as a VPN appliance. The outside interface is connected to the DMZ (172.16.2.10) and the inside to our internal network (10.27.1.12). VPN clients are assigned an address in the range 10.27.2.2-10.27.2.20. A 1841 is th

  • Sender and receiver agreement not cerated

    Hi . I am creating configuration scenario in ID by importing the integration scenario which i created in the IR. I crated communication channel template also and i added it to the integration scenario in connections. Query 1? do i have to create Comm

  • Does iMovie sync from laptop to iPad?

    Can I sync iMovie from my MacBook Air to the new iPad I just purchased. I can buy an iMovie App for the iPad but I only want to do this if it will sync with my existing movies.  Thanks.

  • Mass upload of commodity code VEU4

    Hi, While doing Mass uploading of commodity codes using VEU4 for Non European Clountry, for the Additional Info field NIHON , system by default generates =2 but our requirement it has to have a default value=0 which is to be used for both Import and

  • IMac won't video iChat...but my 12" powerbook will...

    I bought a new iMac 1.83 GHz Intel Core Duo with the built in iSight..however every time I try to connect with a buddy to do a video iChat, it never connects. I get an error message that says something like, "there was a problem with participants..."