All,
I’ve searched the form and the documentation and could not find answers to following questions. Help with any of these is appreciated.
-
I use scrolled() to get notification that my ListGrid has been scrolled. However, scrolled() is called before I finish scrolling. The mouse button is still down and the scrollbar thumb is not released when scrolled() is called. Is there a way to get notified of scrolling at the end of the scrolling action, or a way to determine that the user has not released the scrollbar thumb yet?
-
Is the first argument in fireOnPause() used to ignore subsequent calls to it if the first event with the same label has not been fired?
-
Is the first argument to invokeSuper() the superclass to use? If its null, does that mean use the immediate parent in the hierarchy?
-
How does one block gui events, ie do the same thing that isc.RPCManager.showPrompt does when an RPC call is made?
Thanks.
-
We don’t have any “done scrolling” notification to indicate that the user has released the scrollbar. You could use EventHandler.leftButtonDown to see if the user is currently holding the mouse button down but you could still be confused by cases where scrolling is not triggered by dragging the scrollbar (cursor keys, mousewheel, etc)
-
fireOnPause is currently unexposed so use with caution. As with all unexposed APIs, we can’t guarantee that it won’t change without notice in future releases.
Having said that - yes the first parameter is an arbitrary ID for the “action” to fire. If this method is called again with the same ID before the specified “pause” duration has expired it will simply reset the timer, and not fire the action. Currently this method has the following signature:
//>@classMethod Class.fireOnPause()
// Given some repeatedly performed event (EG keypress, scroll, etc), set up an action
// to fire when the events have stopped occurring for some set period.
// @param id (string) arbitrary identifier for the action
// @param callback (callback) action to fire on quiescence
// @param [delay] (number) delay in ms - defaults to 200ms
// @param [target] (object) if passed, the callback will be fired in this target's scope
//<
-
invokeSuper is another unexposed method. We’d recommend using the documented Super() method instead.
-
RPCManager.showPrompt makes use of isc.showPrompt() to show a modal, blocking prompt. If you want to block user interactions without using this method, you can also make use of the clickMask.
- Right.
- Thanks for clarifying fireOnPause(). it uses delayCall() which has this in the documentation:
time (optional) - type: Number
Number of ms to delay the call by - defaults to zero (so just pulls execution of the method out of the current execution thread.
I’m new to JavaScript and would appreciate a quick explanation of threading with smartclient. I was under the impression that there is only one thread in which all the JavaScript for the page is executed in. Are callbacks scheduled with fireOnPause() executed in a different thread than code that handles user interaction? How about callbacks from DMI, and callbacks from Messaging? If they are executing in a different thread, is there a way to schedule a callback for execution in the “main” thread.
-
switched to Super().
-
clickMask is what I was looking for (no prompt, just cursor change).
Thank you.