Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug on CanvasItem with HLayout

    Hello,

    I'm trying to make my own ListGrid form item on CanvasItem but I'm getting strange error on Console:
    Code:
    18:16:39.781:KUP0:WARN:Log:Call to Super for method: handleKeyUp failed on: [HLayout ID:isc_HLayout_6]: couldn't find a superclass implementation of : HLayout.handleKeyUp
        Class.getStackTrace(args=>undef,  ignoreLevels=>undef,  maxLevels=>undef,  skipFBugTrace=>undef)
        Class.invokeSuper(clazz=>null,  methodName=>"handleKeyUp",  a=>undef,  b=>undef,  c=>undef,  d=>undef,  e=>undef,  f=>undef,  g=>undef,  h=>undef)
        Class.Super(methodName=>"handleKeyUp",  args=>Obj{length:2},  nativeArguments=>undef)
        [o]HLayout.handleKeyUp(event=>Obj,  eventInfo=>Array[3])
        [c]EventHandler.bubbleEvent(target=>[HLayout ID:isc_HLayout_6],  eventType=>"keyUp",  eventInfo=>Array[3],  targetIsMasked=>undef)
        [c]EventHandler.handleKeyUp(nativeEvent=>[object KeyboardEvent],  scEventProperties=>undef)
        [c]EventHandler._handleNativeKeyUp(DOMevent=>[object KeyboardEvent])
        [c]EventHandler.dispatch(handler=>[c]EventHandler._handleNativeKeyUp(),  event=>[object KeyboardEvent])
        anonymous(event=>[object KeyboardEvent])
    Here is the standalone test case:
    Code:
    public class AdditionalUsersItem extends CanvasItem {
    	private HLayout hLayout;
    	private ListGrid listGrid;
    	private DSAdditionalUsers dsAddUsers;
    	private RecordList recordList;
    	
    	public AdditionalUsersItem(String name) {
    		super(name);
    
    		setWidth("*");
    		setHeight("*");
    		setColSpan("*");
    		setEndRow(true);
    		setStartRow(true);
    		this.setShouldSaveValue(true);
    		
    		this.setTitle("");
    		
    		setInitHandler(new FormItemInitHandler() {
    	        @Override
    	        public void onInit(FormItem item) {
    	            listGrid = new ListGrid();
    	            listGrid.setShowHeader(false);
    	            listGrid.setLeaveScrollbarGap(false);
    	            listGrid.setAutoFetchData(false);
    	            listGrid.setHeight(26);
    	            listGrid.setAutoFitMaxRecords(3);
    	            listGrid.setShowEmptyMessage(false);
    	            listGrid.setAutoFitData(Autofit.VERTICAL);
    	            listGrid.setOverflow(Overflow.VISIBLE);
    	            
    	            listGrid.setFields(
    	            		new ListGridField("display")
    	            );
    
    	            addShowValueHandler(new ShowValueHandler() {
    	                public void onShowValue(ShowValueEvent event) {
    	                	recordList = new RecordList();
    	                	Record r = new Record();
    	                	r.setAttribute("display", "test");
    	                	recordList.add(r);
    	    				listGrid.setData(recordList);
    	                }
    	            });
    	            
    	            hLayout = new HLayout();
    	            hLayout.setAutoHeight();
    	            hLayout.addMember(listGrid);
    	    		
    	    		setCanvas(hLayout);
    	        }
    	    });
    	}
    The error appears when I click on a displayed grid and than press any key. For example arrow to select other record.
    It also sometimes show up when mouse is moving around the listgrid and clicking in records.
    What's wrong with it?
    Or maybe there is other way to get couple components in one CanvasItem?

    Best regards
    Last edited by pH4Lk0n; 28 May 2012, 08:58.

    #2
    I've found another debug message concerning this problem:
    Code:
    15:15:29.505:MUP0:WARN:CanvasItem:isc_CanvasItem_1:Observer: [CanvasItem ID:isc_CanvasItem_1 name:users] is already observing method '_focusChanged' on object '[Canvas ID:isc_Canvas_2]', ignoring
    Maybe this will help finding solution.

    Comment


      #3
      I had similar error messages with
      a) some ...Item in a DynamicForm in a CanvasItem in a DynamicForm.
      b) a ListGrid in a CanvasItem in a DynamicForm.

      I solved both cases by using VLayout and HLayout in place of the outer DynamicForm.
      My guess is, that DynamicForms and ListGrids better not be nested within another DynamicForm.

      AAO

      Comment


        #4
        Those nesting cases are fine. These were spurious warnings that have been corrected in recent builds for some time.

        Comment


          #5
          How recent is recent? I saw the "couldn't find a superclass implementation of ... handleKeyUp" warning using
          SmartClient Version: v8.2p_2012-05-31/LGPL Development Only (built 2012-05-31)

          (I never saw "is already observing method ...".)
          Last edited by AloneAgainOr; 6 Jun 2012, 04:07.

          Comment


            #6
            The handleKeyUp message fix is very recent (it only existed for about a week). Try the most recent build - if you're still seeing some way of causing those messages, please show runnable code that can reproduce the problem.

            Comment

            Working...
            X