Browse Source

object instance

master
daniel 8 years ago
parent
commit
e5cd4f7471
  1. 2
      designer/src/com/fr/design/actions/cell/NewPresentAction.java
  2. 2
      designer_form/src/com/fr/design/designer/creator/XCreator.java

2
designer/src/com/fr/design/actions/cell/NewPresentAction.java

@ -73,7 +73,7 @@ public class NewPresentAction extends PresentCheckBoxAction {
try {
Class clazz = GeneralUtils.classForName(itemName);
if (itemName.equals(currentPresent.getClass().getName())) {
return StableUtils.classInstanceOf(currentPresent.getClass(), clazz);
return StableUtils.objectInstanceOf(currentPresent, clazz);
}
} catch (Exception e) {
return "NOPRESENT".equals(itemName) && currentPresent == null;

2
designer_form/src/com/fr/design/designer/creator/XCreator.java

@ -426,7 +426,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
*/
public boolean acceptType(Class<?>... acceptTypes) {
for (Class<?> type : acceptTypes) {
if (StableUtils.classInstanceOf(this.getClass(), type)) {
if (StableUtils.objectInstanceOf(this, type)) {
return true;
}
}

Loading…
Cancel
Save