On Sun, Feb 24, 2013 at 7:04 AM, Staffan Tylen <staffan.ty...@gmail.com>wrote:

> The .Mouse setCursor method as well as resetCursor both return 0 when I do
> this in a dialog:
>
>   mouse = .Mouse~new(treeview)
>   oldCursor = mouse~setCursor("WAIT")    -- this works and changes the
> cursor
>
>   do something ...
>
>   say mouse~setCursor(oldCursor)   -- returns zero and cursor remains in
> 'wait'
>   say mouse~resetCursor   -- same again
>
> The doc says that an error has occurred but I don't know how to debug it.
> I've tried using .Mouse~new(self) instead with the same result. The active
> class is a MIXINCLASS UserPSPDialog class. The same code runs successfully
> in a sample program that I was trying to put together to show what happens.
> :( So what might cause an rc=0 here? Grateful for any hints.
>
>
The docs say:

Details
  Raises syntax errors when incorrect usage is detected.
  Sets the .systemErrorCode.

So, in this case you can check .systemErrorCode to see if it is set.

  oldCursor = mouse~setCursor("WAIT")    -- this works and changes the
cursor

  do something ...

  ret =  mouse~setCursor(oldCursor)
  if ret == 0 then do
    say 'setCursor() failed.'
    say .DlgUtil~errMsg(.systemErrorCode)
  end

Although looking at the code, I don't see much that would cause it to fail.
 That's the first step to debugging it.  Post the value of
.systemErrorCode() after a return of 0.

--
Mark Miesfeld
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to