Package net.rim.device.api.script

Examples of net.rim.device.api.script.ScriptableFunction


    /**
     * @see blackberry.core.ScriptableFunctionBase#execute(Object, Object[])
     */
    public Object execute( Object thiz, Object[] args ) throws Exception {

        ScriptableFunction callback = (ScriptableFunction) args[ 0 ];
        ScriptableFunction onCloseCallback = null;
        ScriptableFunction onErrorCallback = null;

        if( args.length >= 2 ) {
            onCloseCallback = (ScriptableFunction) args[ 1 ];
        }

View Full Code Here


                    Object[] result = new Object[ 1 ];
                    result[ 0 ] = data;

                    // Pass the event back to the JavaScript callback
                    ScriptableFunction onScroll = _onScroll;
                    onScroll.invoke( onScroll, result );
                } catch( Exception e ) {
                    throw new RuntimeException( e.getMessage() );
                }
            }
        }.start();
View Full Code Here

            public void run() {
                try {
                    Object[] result = new Object[ 0 ];

                    // Pass the event back to the JavaScript callback
                    ScriptableFunction onMouseDown = _onTrackpadDown;
                    onMouseDown.invoke( onMouseDown, result );
                } catch( Exception e ) {
                    throw new RuntimeException( e.getMessage() );
                }
            }
        }.start();
View Full Code Here

            public void run() {
                try {
                    Object[] result = new Object[ 0 ];

                    // Pass the event back to the JavaScript callback
                    ScriptableFunction onMouseUp = _onTrackpadUp;
                    onMouseUp.invoke( onMouseUp, result );
                } catch( Exception e ) {
                    throw new RuntimeException( e.getMessage() );
                }
            }
        }.start();
View Full Code Here

            public void run() {
                try {
                    Object[] result = new Object[ 0 ];

                    // Pass the event back to the JavaScript callback
                    ScriptableFunction focusOut = _focusOut;
                    focusOut.invoke( focusOut, result );
                } catch( Exception e ) {
                    throw new RuntimeException( e.getMessage() );
                }
            }
        }.start();
View Full Code Here

     * @param browserField
     *            The BrowserField displayed by this applications's screen
     */
    public void extendJavaScript(final BrowserField browserField)
            throws Exception {
        final ScriptableFunction toggleSearch = new ScriptableFunction() {
            public Object invoke(final Object thiz, final Object[] args)
                    throws Exception {
                return Boolean.FALSE;
            }
        };
        browserField.extendScriptEngine("bb.toggleSearch", toggleSearch);

        final ScriptableFunction submitSearch = new ScriptableFunction() {
            public Object invoke(final Object thiz, final Object[] args)
                    throws Exception {
                executeSearch(Integer.parseInt(args[0].toString()), args[1]
                        .toString());
                return Boolean.FALSE;
View Full Code Here

TOP

Related Classes of net.rim.device.api.script.ScriptableFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.