RBScript

From REALbasicWiki

Jump to: navigation, search
Overall article skill Skill ranges from beginner (green) to expert (red)
RBScript class
Available on Mac OS X Linux Windows
General
Superclass Object
Interfaces none
Constants
Methods
  • PartialRun  Deprecated since REALbasic version ?
  • Precompile
  • Reset
  • Run
Properties
Events
  • CompilerError
  • Input
  • Print
  • RuntimeError

NOTE: You can get descriptions of the items above from the REALbasic documentation.


For running REALbasic code within a compiled application.

Contents

[edit] Methods

[edit] Sub PartialRun(Millisec as Integer)

Runs the code Source until it is done or millisec has elapsed.  Deprecated since REALbasic version ?

[edit] Sub Precompile()

Compiles the script immediately instead of waiting until the next call to Run.

[edit] Sub Reset()

Resets the RBScript.

[edit] Sub Run()

Runs the code, compiles it first if it isn't precompiled.

[edit] Properties

[edit] Context as Object

Object that is made available to the RBScript. The script has access to the methods and properties of this object.

[edit] Source as String

The source code the RBScript will use when you Run or Precompile it.

[edit] Events

[edit] Sub CompilerError(Line as Integer , errorNumber as Integer , errorMsg as String)

Gets called when a compiler error has occurred. See the Notes below.

[edit] Discussion

[edit] Notes

Compiler Error Numbers:

Error Number Description

1 Syntax does not make sense.

2 Type mismatch.

3 Select Case does not support that type of expression.

5 The parser’s internal stack has overflowed.

6 Too many parameters for this function.

7 Not enough parameters for this function call.

8 Wrong number of parameters for this function call.

9 Parameters are incompatible with this function.

10 Assignment of an incompatible data type.

11 Undefined identifier.

12 Undefined operator.

13 Logic operations require Boolean operands.

14 Array bounds must be integers.

15 Can’t call a non-function.

16 Can’t get an element from something that isn’t an array.

17 Not enough subscripts for this array’s dimensions.

18 Too many subscripts for this array’s dimensions.

19 Can’t assign an entire array.

20 Can’t use an entire array in an expression.

21 Can’t pass an expression as a ByRef parameter.

22 Duplicate identifier.

23 The backend code generator failed.

24 Ambiguous call to overloaded method.

25 Multiple inheritance is not allowed.

26 Cannot create an instance of an interface.

27 Cannot implement a class as though it were an interface.

28 Cannot inherit from something that is not a class.

29 This class does not fully implement the specified interface.

30 Event handlers cannot live outside of a class.

31 It is not legal to ignore the result of a function call.

32 Can’t use “Self” keyword outside of a class.

33 Can’t use “Me” keyword outside of a class.

34 Can’t return a value from a Sub.

35 An exception object required here.

40 Destructors can’t have parameters.

41 Can’t use “Super” keyword outside of a class.

42 Can’t use “Super” keyword in a class that has no parent.

43 #else without matching #if.

44 #endif without matching #if.

45 #if condition must be a boolean.

46 #if condition must be a constant.

47 This Next statement refers to a different loop variable than its matching For statement.

48 Array bounds must be constant.

52 This kind of array can not be sorted.

53 This property is protected. It can only be used from within its class.

54 This method is protected. It can only be called from within its class.

55 This local variable or constant has the same name as a Declare in this method.

56 This global variable has the same name as a global function.

57 This property has the same name as a method.

58 This property has the same name as an event.

59 This global variable has the same name as a class.

60 This global variable has the same name as a module.

61 This local variable or parameter has the same name as a constant.

62 You can’t use this variable or property name because it is a reserved word.

63 There is no class with this name.

66 You can’t use the New operator with this class.

67 You cannot return a value from a Sub.

68 End quote missing.

69 A class cannot be its own superclass.

70 Cannot assign a value to this property.

71 Cannot get this property’s value.

72 The if statement is missing its condition.

73 You are attempting to return from a function without specifying a return type.

74 Parameter options and are incompatible.

75 Parameter option was already specified.

76 A parameter passed by reference cannot have a default value.

77 A ParamArray cannot have a default value.

78 An Assigns parameter cannot have a default value.

79 An Extends parameter cannot have a default value.

80 Only the first parameter may use the Extends option.

81 Only the last parameter may use the Assigns option.

82 An ordinary parameter cannot follow a ParamArray.

83 Only one parameter may use the Assigns option.

84 Only one parameter may use the ParamArray option.

85 A ParamArray’s element type may not be another array.

86 The keyword ‘Then’ is expected after this if statement’s condition.

88 You cannot assign a non-constant value to a constant.

89 Illegal use of the Call keyword.

90 No cases may follow the Else block.

91 This is an invalid property accessor type.

92 The property accessor’s End statement does not match its declaration.

93 Duplicate method definition.

Note: This is not a complete list.

[edit] Sample Code

Personal tools
related