Thanks Matt but I just tried commenting out the open() and close() functions.
Without them the mouseup event is not blocked, I get the alert in the
mouseup listener when I click on the root window. 
So I guess setModal(true) doesn't block everything.

I do not get the error when these functions are commented out but I need a
way to stop the mouseup event.

Does anyone know if there is another way to do this?


Matthew Gregory wrote:
> 
> Just tried in the playground and if remove your open and close functions 
> and all should be well. setModel(true) automatically blocks the root
> 
> Not sure why it causes the error though.
> 
> Larry K Blische wrote:
>> I think I replied with this problem to the 'solved' forum and it may have
>> been overlooked so I am trying again.
>> 
>> Below is an example of what my problem is. Here are two classes, an app
>> class and my modal window class. I have several classes which extent the
>> ModalWindow class. This is done to provide other common features which
>> are
>> not necessary to the example so I have removed them. 
>> 
>> The app puts a listener on the root window for the mouseup event which
>> opens
>> the modal window. The open() and close() methods block() and unblock() on
>> the root window to stop future mouseup events. If you comment these out
>> you
>> will see that mouseup's are still generated. Why are mouseups not blocked
>> by
>> the modal window? 
>> 
>> The issue is that when I click on the root window after the modal window
>> is
>> displayed, I get the "widgetTarget is null" error. 
>> 
>> Can anyone explain what needs to be done to avoid this or provide insight
>> into how to proceed to solve this? Am I doing the block()/unblock()
>> correctly? 
>> 
>> Thanks again, 
>> Larry 
>> 
>> qx.Class.define("timeclocktest.Application", 
>>     { 
>>     extend : qx.application.Standalone, 
>> 
>>     members : 
>>         { 
>>         main : function() 
>>             { 
>>             this.base(arguments); 
>> 
>>             if (qx.core.Variant.isSet("qx.debug", "on")) 
>>                 { 
>>                 qx.log.appender.Native; 
>>                 qx.log.appender.Console; 
>>                 } 
>> 
>>             this.popup = new timeclocktest.ModalWindow(); 
>> 
>>             this.getRoot().add(new qx.ui.basic.Label("please click
>> anywhere"), {edge:50}); 
>>             this.getRoot().addListener("mouseup", function()
>> {alert('mouseup'); this.popup.open();}, this); 
>>             this.getRoot().set({blockerColor:"red",
>> blockerOpacity:0.25}); 
>>             } 
>>         } 
>>     }); 
>> 
>> qx.Class.define("timeclocktest.ModalWindow", 
>>     { 
>>     extend : qx.ui.window.Window, 
>>     
>>     construct : function() 
>>         { 
>>         this.base(arguments);   // make the window 
>>         this.setModal(true);  // make it modal 
>>         // other things here in the real code 
>>         }, 
>> 
>>     members : 
>>         { 
>>         open : function()       // block events (mouseup) to the root and
>> open the window 
>>             { 
>>             this.getApplicationRoot().block(); 
>>             this.base(arguments); 
>>             }, 
>> 
>>         close : function()      // close window, unblock and focus back
>> to
>> the root 
>>             { 
>>             this.base(arguments); 
>>             this.getApplicationRoot().unblock(); 
>>             this.getApplicationRoot().focus(); 
>>             } 
>>         } 
>>     }); 
>> 
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day 
> trial. Simplify your report design, integration and deployment - and focus
> on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Still-getting-%22widgetTarget-is-null%22-runtime-error-tp25080319p25087102.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to