sal-tools-analyze 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -0
- data/README +20 -0
- data/lib/sal/class.rb +43 -0
- data/lib/sal/code.rb +236 -0
- data/lib/sal/command.rb +35 -0
- data/lib/sal/external.rb +37 -0
- data/lib/sal/externalfunction.rb +46 -0
- data/lib/sal/format.rb +43 -0
- data/lib/sal/function.rb +26 -0
- data/lib/sal/item.rb +214 -0
- data/lib/sal/library.rb +25 -0
- data/lib/sal/version.rb +161 -0
- data/sal-tools-analyze.gemspec +16 -0
- data/test/data/test.21.text.sql.app +458 -0
- data/test/data/test.40.indented.app +219 -0
- data/test/data/test.40.normal.app +0 -0
- data/test/data/test.40.text.app +218 -0
- data/test/data/test.40.text.classes.app +350 -0
- data/test/data/test.40.text.multiline.app +228 -0
- data/test/data/test.41.indented.app +218 -0
- data/test/data/test.41.normal.app +0 -0
- data/test/data/test.41.text.app +218 -0
- data/test/data/test.41.text.externalfunctions.app +352 -0
- data/test/test.rb +16 -0
- data/test/test_class.rb +34 -0
- data/test/test_code.rb +180 -0
- data/test/test_command.rb +16 -0
- data/test/test_external.rb +37 -0
- data/test/test_externalfunction.rb +76 -0
- data/test/test_format.rb +58 -0
- data/test/test_function.rb +22 -0
- data/test/test_item.rb +123 -0
- data/test/test_library.rb +38 -0
- data/test/test_version.rb +80 -0
- metadata +128 -0
data/lib/sal/function.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative "item.rb"
|
2
|
+
|
3
|
+
module Sal
|
4
|
+
|
5
|
+
# The class represents one function.
|
6
|
+
class Function
|
7
|
+
|
8
|
+
def initialize( item )
|
9
|
+
@item = item
|
10
|
+
item.code =~ /Function:\s(\S+)/
|
11
|
+
@name = get_name(item.code)
|
12
|
+
end
|
13
|
+
|
14
|
+
attr_accessor :name, :item
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def get_name(code)
|
19
|
+
code =~ /Function:\s(\S+)/
|
20
|
+
return $1
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
data/lib/sal/item.rb
ADDED
@@ -0,0 +1,214 @@
|
|
1
|
+
require_relative "format.rb"
|
2
|
+
require_relative "command.rb"
|
3
|
+
|
4
|
+
module Sal
|
5
|
+
|
6
|
+
# The class item represent one source code line of an sal file.
|
7
|
+
# The item has references to its parent and childs to navigate
|
8
|
+
# between the items in the source code.
|
9
|
+
class Item
|
10
|
+
include Format
|
11
|
+
|
12
|
+
# Create item. The format parameter is optional. If the format
|
13
|
+
# parameter is not given, the format will be analyzed with the
|
14
|
+
# source code line.
|
15
|
+
def initialize( line, file_format = nil )
|
16
|
+
@original = line
|
17
|
+
@format = file_format.nil? ? Format.get_from_line(line) : file_format
|
18
|
+
self.line = line
|
19
|
+
@commented = false
|
20
|
+
@parent = nil # Item
|
21
|
+
@childs = Array.new # Items
|
22
|
+
@child_indicator = "-"
|
23
|
+
@analyzed = false
|
24
|
+
@code_line_nr = -1
|
25
|
+
@parts = []
|
26
|
+
|
27
|
+
analyze
|
28
|
+
end
|
29
|
+
|
30
|
+
# Is the item is a comment?
|
31
|
+
def item_commented?
|
32
|
+
return @commented
|
33
|
+
end
|
34
|
+
|
35
|
+
# Is the item or a parent of the item is a comment (so the item is commented too)?
|
36
|
+
def commented?
|
37
|
+
return true if item_commented?
|
38
|
+
if parent.nil?
|
39
|
+
return item_commented?
|
40
|
+
else
|
41
|
+
return parent.commented?
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Change the item to a comment item if the item is not a comment item yet
|
46
|
+
def item_comment
|
47
|
+
self.code = "! #{self.code}" unless item_commented?
|
48
|
+
_analyze_commented
|
49
|
+
end
|
50
|
+
|
51
|
+
# Is the item is ready analyzed?
|
52
|
+
def analyzed?
|
53
|
+
@analyzed
|
54
|
+
end
|
55
|
+
|
56
|
+
# Is the line is a source code line (for example: Set sTest = "Hallo")
|
57
|
+
# Look at command.rb too!
|
58
|
+
def is_code_line?
|
59
|
+
Command.is_code_line? code
|
60
|
+
end
|
61
|
+
|
62
|
+
# Change the code line. This will trigger the analyze.
|
63
|
+
def line=(value)
|
64
|
+
@original = value
|
65
|
+
analyze
|
66
|
+
end
|
67
|
+
|
68
|
+
# Getter of the line.
|
69
|
+
# The line will create dynamicly from the line parts.
|
70
|
+
def line
|
71
|
+
case @format
|
72
|
+
when TEXT
|
73
|
+
@parts.join
|
74
|
+
when INDENTED
|
75
|
+
("\t"*@parts[1])+@parts[5]+@parts[6]
|
76
|
+
else
|
77
|
+
raise "Sal::Item#line: Runs only for TEXT and INDENTED format!"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Set the outline level
|
82
|
+
def level=(value)
|
83
|
+
@parts[1] = value
|
84
|
+
end
|
85
|
+
|
86
|
+
# Get the outline level
|
87
|
+
def level
|
88
|
+
@parts[1].to_i
|
89
|
+
end
|
90
|
+
|
91
|
+
# Set the code of the line
|
92
|
+
def code=(value)
|
93
|
+
@parts[5] = value
|
94
|
+
end
|
95
|
+
|
96
|
+
# Return the code of the line without outline and .data parts
|
97
|
+
def code
|
98
|
+
@parts[5]
|
99
|
+
end
|
100
|
+
|
101
|
+
# Returns a + if the item has childs, otherwise a - is returned
|
102
|
+
def child_indicator
|
103
|
+
@parts[3]
|
104
|
+
end
|
105
|
+
|
106
|
+
# Refreshes the child indicator for the current code in the item
|
107
|
+
def refresh_child_indicator
|
108
|
+
@parts[3] = (@childs != nil and @childs.length > 0 ? "+" : "-")
|
109
|
+
end
|
110
|
+
|
111
|
+
# Set the last carriage return line feed and (if exist) the binary data component
|
112
|
+
def behind_code=(value)
|
113
|
+
@parts[6] = value
|
114
|
+
end
|
115
|
+
|
116
|
+
# Read the last carriage return line feed and (if exist) the binary data component
|
117
|
+
def behind_code
|
118
|
+
@parts[6]
|
119
|
+
end
|
120
|
+
|
121
|
+
attr_accessor :original, :parent, :childs, :format
|
122
|
+
attr_accessor :tag, :code_line_nr, :parts
|
123
|
+
|
124
|
+
# Returns the line of code and not the object
|
125
|
+
def to_s
|
126
|
+
line
|
127
|
+
end
|
128
|
+
|
129
|
+
# Returns a new object (copied object) of the current source code
|
130
|
+
# from the item. No infos of parent and childs included.
|
131
|
+
def copy
|
132
|
+
Item.new(self.line)
|
133
|
+
end
|
134
|
+
|
135
|
+
private
|
136
|
+
|
137
|
+
# Analyze the source code
|
138
|
+
def analyze
|
139
|
+
if(!@analyzed)
|
140
|
+
case @format
|
141
|
+
when TEXT
|
142
|
+
@analyzed = _analyze_textmode
|
143
|
+
# when INDENTED
|
144
|
+
# @analyzed = _analyze_indented
|
145
|
+
else
|
146
|
+
# No analyze of not TEXT formats
|
147
|
+
@analyzed = false
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Analyze the source code (TEXT mode)
|
153
|
+
def _analyze_textmode
|
154
|
+
# re = /(^\.head )(\d+?)( )([+-])( )(.*?)(\n*)$/
|
155
|
+
# re = /(^\.head )(\d+?)( )([+-])( )(.*?)(\r\n.*)/m
|
156
|
+
re = /(^\.head )(\d+?)( )([+-])( )(.*)/m
|
157
|
+
md = re.match(@original)
|
158
|
+
if md.nil?
|
159
|
+
raise "Item::_analyze_textmode could not analyze level and code: #{@original}"
|
160
|
+
else
|
161
|
+
# 1 = Level, 3 = Child Indkator, 5 = Code
|
162
|
+
# [1..-1] => md[0] is the complete string, that is not needed here
|
163
|
+
@parts = md.to_a[1..-1]
|
164
|
+
_analyze_textmode_split_code
|
165
|
+
return _analyze_commented()
|
166
|
+
end
|
167
|
+
return false
|
168
|
+
end
|
169
|
+
|
170
|
+
def _analyze_textmode_split_code
|
171
|
+
temp = self.code
|
172
|
+
new_code = ""
|
173
|
+
new_data = ""
|
174
|
+
temp.each_line do | line |
|
175
|
+
if new_data.length > 0
|
176
|
+
new_data += line
|
177
|
+
else
|
178
|
+
if line.start_with? ".data"
|
179
|
+
new_data = line
|
180
|
+
else
|
181
|
+
new_code += line
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
if new_code.end_with? "\r\n"
|
186
|
+
new_data = "\r\n" + new_data
|
187
|
+
new_code = new_code[0..-3]
|
188
|
+
end
|
189
|
+
self.code = new_code
|
190
|
+
self.behind_code = new_data
|
191
|
+
end
|
192
|
+
|
193
|
+
# Analyze the source code line (INDENTED format)
|
194
|
+
def _analyze_indented
|
195
|
+
if(@original =~ /(^\t*)(.*?)(\r\n.*)/m)
|
196
|
+
@parts = []
|
197
|
+
@parts[1] = $1.length
|
198
|
+
@parts[5] = $2
|
199
|
+
@parts[6] = $3
|
200
|
+
return _analyze_commented()
|
201
|
+
else
|
202
|
+
raise "Item::_analyze_indented could not analyze level and code: #{self.line}"
|
203
|
+
end
|
204
|
+
return false
|
205
|
+
end
|
206
|
+
|
207
|
+
# Check the comment state of the line
|
208
|
+
def _analyze_commented
|
209
|
+
@commented = true if(self.code =~ /^\s*?!/)
|
210
|
+
return true
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
data/lib/sal/library.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative "item.rb"
|
2
|
+
|
3
|
+
module Sal
|
4
|
+
|
5
|
+
# The class represents a single file include
|
6
|
+
class Library
|
7
|
+
|
8
|
+
def initialize( item )
|
9
|
+
@item = item
|
10
|
+
item.code =~ /File Include:\s(\S+)/
|
11
|
+
@name = get_name(item.code)
|
12
|
+
end
|
13
|
+
|
14
|
+
attr_accessor :name, :item
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def get_name(code)
|
19
|
+
code =~ /File Include:\s(\S+)/
|
20
|
+
return $1
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
data/lib/sal/version.rb
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
require_relative "format"
|
2
|
+
|
3
|
+
module Sal
|
4
|
+
|
5
|
+
# The version class includes the infos to the sal version and the correspondenting
|
6
|
+
# file version. The class analyzes with the code the versions.
|
7
|
+
# The file version could be changed.
|
8
|
+
class Version
|
9
|
+
|
10
|
+
# The version could be initialized with the fileversion or the sal version.
|
11
|
+
# The dot in the version is checked to use the right version type.
|
12
|
+
def initialize(version)
|
13
|
+
if(version.to_s.include? ".")
|
14
|
+
@td = version
|
15
|
+
@file = Version.td_to_file @td
|
16
|
+
else
|
17
|
+
@file = version
|
18
|
+
@td = Version.file_to_td @file
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
attr_accessor :td, :file
|
23
|
+
|
24
|
+
# Get the version from the code and returns a version object (fabric-method)
|
25
|
+
def Version.from_code(code)
|
26
|
+
Version.new(self.file_version_from_code(code))
|
27
|
+
end
|
28
|
+
|
29
|
+
# Get the version from a file and returns a version object (fabric-method)
|
30
|
+
def Version.from_file(file)
|
31
|
+
code = IO.binread file
|
32
|
+
Version.from_code code
|
33
|
+
end
|
34
|
+
|
35
|
+
# Set the fileversion of the file
|
36
|
+
#
|
37
|
+
# Nothing else is changed. The source code can then be opend from the
|
38
|
+
# tool with the set version.
|
39
|
+
def to_file(filename)
|
40
|
+
code = IO.binread filename
|
41
|
+
code = to_code(code, @file)
|
42
|
+
f = File.new(filename, "w")
|
43
|
+
f.syswrite code
|
44
|
+
f.close
|
45
|
+
end
|
46
|
+
|
47
|
+
# Set the file version in the code to the file version of this object.
|
48
|
+
def to_code(code)
|
49
|
+
format = Format.get_from_code code
|
50
|
+
if format == Format::NORMAL
|
51
|
+
raise "Version.set_to_code: Code length to small!" if code.length < 5
|
52
|
+
code[4] = case file
|
53
|
+
when 26
|
54
|
+
"\xfa" # Team Developer 1.1
|
55
|
+
when 27
|
56
|
+
"\xfb" # Team Developer 1.5
|
57
|
+
when 28
|
58
|
+
"\xfc" # Team Developer 2.0/2.1
|
59
|
+
when 31
|
60
|
+
"\xff" # Team Developer 3.0
|
61
|
+
when 32
|
62
|
+
"\x00" # Team Developer 3.1
|
63
|
+
when 34
|
64
|
+
"\x02" # Team Developer 4.0
|
65
|
+
when 35
|
66
|
+
"\x03" # Team Developer 4.1/4.2
|
67
|
+
else
|
68
|
+
raise "Version.to_code: Version not settable: #{@file}/#{@td}"
|
69
|
+
end
|
70
|
+
else
|
71
|
+
code.sub!(/(Outline Version - \d\.\d\.)(\d\d)/m, '\1' + file.to_s)
|
72
|
+
end
|
73
|
+
code
|
74
|
+
end
|
75
|
+
|
76
|
+
# Convert the sal version in the correspondenting file version
|
77
|
+
def Version.td_to_file(td_version)
|
78
|
+
case td_version
|
79
|
+
when "1.1"
|
80
|
+
26
|
81
|
+
when "1.5"
|
82
|
+
27
|
83
|
+
when "2.0"
|
84
|
+
28
|
85
|
+
when "2.1"
|
86
|
+
28
|
87
|
+
when "3.0"
|
88
|
+
31
|
89
|
+
when "3.1"
|
90
|
+
32
|
91
|
+
when "4.0"
|
92
|
+
34
|
93
|
+
when "4.1"
|
94
|
+
35
|
95
|
+
when "4.2"
|
96
|
+
35
|
97
|
+
when "5.0"
|
98
|
+
37
|
99
|
+
when "5.1"
|
100
|
+
37
|
101
|
+
else
|
102
|
+
raise "Version:td_to_file(#{td_version}): Version not analyzable."
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Change the file version in the correspondenting sal version
|
107
|
+
def Version.file_to_td(file_version)
|
108
|
+
case file_version
|
109
|
+
when 26
|
110
|
+
"1.1"
|
111
|
+
when 27
|
112
|
+
"1.5"
|
113
|
+
when 28
|
114
|
+
"2.0" # "2.1"
|
115
|
+
when 31
|
116
|
+
"3.0"
|
117
|
+
when 32
|
118
|
+
"3.1"
|
119
|
+
when 34
|
120
|
+
"4.0"
|
121
|
+
when 35
|
122
|
+
"4.1" # "4.2"
|
123
|
+
when 37
|
124
|
+
"5.1"
|
125
|
+
else
|
126
|
+
raise "Version:file_to_td(#{file_version}): Version not analyzable."
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
private
|
131
|
+
|
132
|
+
# Get the file version from the given code
|
133
|
+
def Version.file_version_from_code(code)
|
134
|
+
if(code =~ /Outline Version - \d\.\d\.(\d\d)/m)
|
135
|
+
$1.to_i
|
136
|
+
else
|
137
|
+
zeichen = code[4]
|
138
|
+
case zeichen
|
139
|
+
when "\xfa" # Team Developer 1.1
|
140
|
+
26
|
141
|
+
when "\xfb" # Team Developer 1.5
|
142
|
+
27
|
143
|
+
when "\xfc" # Team Developer 2.0/2.1
|
144
|
+
28
|
145
|
+
when "\xff" # Team Developer 3.0
|
146
|
+
31
|
147
|
+
when "\x00" # Team Developer 3.1
|
148
|
+
32
|
149
|
+
when "\x02" # Team Developer 4.0
|
150
|
+
34
|
151
|
+
when "\x03" # Team Developer 4.1/4.2
|
152
|
+
35
|
153
|
+
else
|
154
|
+
raise "Version.get_from_code: Normal Mode: Version not analyzable"
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
end
|
160
|
+
|
161
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Gem::Specification.new do | s |
|
2
|
+
s.name = "sal-tools-analyze"
|
3
|
+
s.summary = "Analyse SAL-Code"
|
4
|
+
s.description = File.read(File.join(File.dirname(__FILE__), 'README'))
|
5
|
+
s.requirements = [ 'An installed dictionary (most Unix systems have one)']
|
6
|
+
s.version = '0.0.1'
|
7
|
+
s.author = "M. Ehehalt"
|
8
|
+
s.email = "flynn42ryder@rubyforge.org"
|
9
|
+
s.homepage = ""
|
10
|
+
s.platform = Gem::Platform::RUBY
|
11
|
+
s.required_ruby_version = '>=1.9'
|
12
|
+
s.files = Dir['**/**']
|
13
|
+
s.executables = []
|
14
|
+
s.test_files = Dir["test/tes*.rb"]
|
15
|
+
s.has_rdoc = true
|
16
|
+
end
|
@@ -0,0 +1,458 @@
|
|
1
|
+
.head 0 + Application Description: Gupta SQLWindows Standard Application Template
|
2
|
+
.head 1 - Outline Version - 4.0.28
|
3
|
+
.head 1 + Design-time Settings
|
4
|
+
.data VIEWINFO
|
5
|
+
0000: 6F00000001000000 FFFF01000D004347 5458566965775374 6174650400010000
|
6
|
+
0020: 0000000000A50000 002C000000020000 0003000000FFFFFF FFFFFFFFFFF8FFFF
|
7
|
+
0040: FFE2FFFFFFFFFFFF FF000000007C0200 004D010000010000 0001000000010000
|
8
|
+
0060: 000F4170706C6963 6174696F6E497465 6D00000000
|
9
|
+
.enddata
|
10
|
+
.head 2 - Outline Window State: Normal
|
11
|
+
.head 2 + Outline Window Location and Size
|
12
|
+
.data VIEWINFO
|
13
|
+
0000: 6600040003002D00 0000000000000000 0000B71E5D0E0500 1D00FFFF4D61696E
|
14
|
+
0020: 0000000000000000 0000000000000000 0000003B00010000 00000000000000E9
|
15
|
+
0040: 1E800A00008600FF FF496E7465726E61 6C2046756E637469 6F6E730000000000
|
16
|
+
0060: 0000000000000000 0000000000003200 0100000000000000 0000E91E800A0000
|
17
|
+
0080: DF00FFFF56617269 61626C6573000000 0000000000000000 0000000000000000
|
18
|
+
00A0: 3000010000000000 00000000F51E100D 0000F400FFFF436C 6173736573000000
|
19
|
+
00C0: 0000000000000000 0000000000000000
|
20
|
+
.enddata
|
21
|
+
.data VIEWSIZE
|
22
|
+
0000: D000
|
23
|
+
.enddata
|
24
|
+
.head 3 - Left: -0.013"
|
25
|
+
.head 3 - Top: 0.0"
|
26
|
+
.head 3 - Width: 8.013"
|
27
|
+
.head 3 - Height: 4.969"
|
28
|
+
.head 2 + Options Box Location
|
29
|
+
.data VIEWINFO
|
30
|
+
0000: D4180909B80B1A00
|
31
|
+
.enddata
|
32
|
+
.data VIEWSIZE
|
33
|
+
0000: 0800
|
34
|
+
.enddata
|
35
|
+
.head 3 - Visible? Yes
|
36
|
+
.head 3 - Left: 4.15"
|
37
|
+
.head 3 - Top: 1.885"
|
38
|
+
.head 3 - Width: 3.8"
|
39
|
+
.head 3 - Height: 2.073"
|
40
|
+
.head 2 + Class Editor Location
|
41
|
+
.head 3 - Visible? No
|
42
|
+
.head 3 - Left: 0.575"
|
43
|
+
.head 3 - Top: 0.094"
|
44
|
+
.head 3 - Width: 5.063"
|
45
|
+
.head 3 - Height: 2.719"
|
46
|
+
.head 2 + Tool Palette Location
|
47
|
+
.head 3 - Visible? No
|
48
|
+
.head 3 - Left: 6.388"
|
49
|
+
.head 3 - Top: 0.729"
|
50
|
+
.head 2 - Fully Qualified External References? Yes
|
51
|
+
.head 2 - Reject Multiple Window Instances? No
|
52
|
+
.head 2 - Enable Runtime Checks Of External References? Yes
|
53
|
+
.head 2 - Use Release 4.0 Scope Rules? No
|
54
|
+
.head 1 - Libraries
|
55
|
+
.head 1 + Global Declarations
|
56
|
+
.head 2 + Window Defaults
|
57
|
+
.head 3 + Tool Bar
|
58
|
+
.head 4 - Display Style? Etched
|
59
|
+
.head 4 - Font Name: MS Sans Serif
|
60
|
+
.head 4 - Font Size: 8
|
61
|
+
.head 4 - Font Enhancement: System Default
|
62
|
+
.head 4 - Text Color: System Default
|
63
|
+
.head 4 - Background Color: System Default
|
64
|
+
.head 3 + Form Window
|
65
|
+
.head 4 - Display Style? Etched
|
66
|
+
.head 4 - Font Name: MS Sans Serif
|
67
|
+
.head 4 - Font Size: 8
|
68
|
+
.head 4 - Font Enhancement: System Default
|
69
|
+
.head 4 - Text Color: System Default
|
70
|
+
.head 4 - Background Color: System Default
|
71
|
+
.head 3 + Dialog Box
|
72
|
+
.head 4 - Display Style? Etched
|
73
|
+
.head 4 - Font Name: MS Sans Serif
|
74
|
+
.head 4 - Font Size: 8
|
75
|
+
.head 4 - Font Enhancement: System Default
|
76
|
+
.head 4 - Text Color: System Default
|
77
|
+
.head 4 - Background Color: System Default
|
78
|
+
.head 3 + Top Level Table Window
|
79
|
+
.head 4 - Font Name: MS Sans Serif
|
80
|
+
.head 4 - Font Size: 8
|
81
|
+
.head 4 - Font Enhancement: System Default
|
82
|
+
.head 4 - Text Color: System Default
|
83
|
+
.head 4 - Background Color: System Default
|
84
|
+
.head 3 + Data Field
|
85
|
+
.head 4 - Font Name: Use Parent
|
86
|
+
.head 4 - Font Size: Use Parent
|
87
|
+
.head 4 - Font Enhancement: Use Parent
|
88
|
+
.head 4 - Text Color: Use Parent
|
89
|
+
.head 4 - Background Color: Use Parent
|
90
|
+
.head 3 + Multiline Field
|
91
|
+
.head 4 - Font Name: Use Parent
|
92
|
+
.head 4 - Font Size: Use Parent
|
93
|
+
.head 4 - Font Enhancement: Use Parent
|
94
|
+
.head 4 - Text Color: Use Parent
|
95
|
+
.head 4 - Background Color: Use Parent
|
96
|
+
.head 3 + Spin Field
|
97
|
+
.head 4 - Font Name: Use Parent
|
98
|
+
.head 4 - Font Size: Use Parent
|
99
|
+
.head 4 - Font Enhancement: Use Parent
|
100
|
+
.head 4 - Text Color: Use Parent
|
101
|
+
.head 4 - Background Color: Use Parent
|
102
|
+
.head 3 + Background Text
|
103
|
+
.head 4 - Font Name: Use Parent
|
104
|
+
.head 4 - Font Size: Use Parent
|
105
|
+
.head 4 - Font Enhancement: Use Parent
|
106
|
+
.head 4 - Text Color: Use Parent
|
107
|
+
.head 4 - Background Color: Use Parent
|
108
|
+
.head 3 + Pushbutton
|
109
|
+
.head 4 - Font Name: Use Parent
|
110
|
+
.head 4 - Font Size: Use Parent
|
111
|
+
.head 4 - Font Enhancement: Use Parent
|
112
|
+
.head 3 + Radio Button
|
113
|
+
.head 4 - Font Name: Use Parent
|
114
|
+
.head 4 - Font Size: Use Parent
|
115
|
+
.head 4 - Font Enhancement: Use Parent
|
116
|
+
.head 4 - Text Color: Use Parent
|
117
|
+
.head 4 - Background Color: Use Parent
|
118
|
+
.head 3 + Check Box
|
119
|
+
.head 4 - Font Name: Use Parent
|
120
|
+
.head 4 - Font Size: Use Parent
|
121
|
+
.head 4 - Font Enhancement: Use Parent
|
122
|
+
.head 4 - Text Color: Use Parent
|
123
|
+
.head 4 - Background Color: Use Parent
|
124
|
+
.head 3 + Option Button
|
125
|
+
.head 4 - Font Name: Use Parent
|
126
|
+
.head 4 - Font Size: Use Parent
|
127
|
+
.head 4 - Font Enhancement: Use Parent
|
128
|
+
.head 3 + Group Box
|
129
|
+
.head 4 - Font Name: Use Parent
|
130
|
+
.head 4 - Font Size: Use Parent
|
131
|
+
.head 4 - Font Enhancement: Use Parent
|
132
|
+
.head 4 - Text Color: Use Parent
|
133
|
+
.head 4 - Background Color: Use Parent
|
134
|
+
.head 3 + Child Table Window
|
135
|
+
.head 4 - Font Name: Use Parent
|
136
|
+
.head 4 - Font Size: Use Parent
|
137
|
+
.head 4 - Font Enhancement: Use Parent
|
138
|
+
.head 4 - Text Color: Use Parent
|
139
|
+
.head 4 - Background Color: Use Parent
|
140
|
+
.head 3 + List Box
|
141
|
+
.head 4 - Font Name: Use Parent
|
142
|
+
.head 4 - Font Size: Use Parent
|
143
|
+
.head 4 - Font Enhancement: Use Parent
|
144
|
+
.head 4 - Text Color: Use Parent
|
145
|
+
.head 4 - Background Color: Use Parent
|
146
|
+
.head 3 + Combo Box
|
147
|
+
.head 4 - Font Name: Use Parent
|
148
|
+
.head 4 - Font Size: Use Parent
|
149
|
+
.head 4 - Font Enhancement: Use Parent
|
150
|
+
.head 4 - Text Color: Use Parent
|
151
|
+
.head 4 - Background Color: Use Parent
|
152
|
+
.head 3 + Line
|
153
|
+
.head 4 - Line Color: Use Parent
|
154
|
+
.head 3 + Frame
|
155
|
+
.head 4 - Border Color: Use Parent
|
156
|
+
.head 4 - Background Color: 3D Face Color
|
157
|
+
.head 3 + Picture
|
158
|
+
.head 4 - Border Color: Use Parent
|
159
|
+
.head 4 - Background Color: Use Parent
|
160
|
+
.head 2 + Formats
|
161
|
+
.head 3 - Number: 0'%'
|
162
|
+
.head 3 - Number: #0
|
163
|
+
.head 3 - Number: ###000
|
164
|
+
.head 3 - Number: ###000;'($'###000')'
|
165
|
+
.head 3 - Date/Time: hh:mm:ss AMPM
|
166
|
+
.head 3 - Date/Time: M/d/yy
|
167
|
+
.head 3 - Date/Time: MM-dd-yy
|
168
|
+
.head 3 - Date/Time: dd-MMM-yyyy
|
169
|
+
.head 3 - Date/Time: MMM d, yyyy
|
170
|
+
.head 3 - Date/Time: MMM d, yyyy hh:mm AMPM
|
171
|
+
.head 3 - Date/Time: MMMM d, yyyy hh:mm AMPM
|
172
|
+
.head 2 - External Functions
|
173
|
+
.head 2 + Constants
|
174
|
+
.data CCDATA
|
175
|
+
0000: 3000000000000000 0000000000000000 00000000
|
176
|
+
.enddata
|
177
|
+
.data CCSIZE
|
178
|
+
0000: 1400
|
179
|
+
.enddata
|
180
|
+
.head 3 - System
|
181
|
+
.head 3 - User
|
182
|
+
.head 3 - Enumerations
|
183
|
+
.head 2 - Resources
|
184
|
+
.head 2 - Variables
|
185
|
+
.head 2 - Internal Functions
|
186
|
+
.head 2 - Named Menus
|
187
|
+
.head 2 - Class Definitions
|
188
|
+
.head 2 + Default Classes
|
189
|
+
.head 3 - MDI Window: cBaseMDI
|
190
|
+
.head 3 - Form Window:
|
191
|
+
.head 3 - Dialog Box:
|
192
|
+
.head 3 - Table Window:
|
193
|
+
.head 3 - Quest Window:
|
194
|
+
.head 3 - Data Field:
|
195
|
+
.head 3 - Spin Field:
|
196
|
+
.head 3 - Multiline Field:
|
197
|
+
.head 3 - Pushbutton:
|
198
|
+
.head 3 - Radio Button:
|
199
|
+
.head 3 - Option Button:
|
200
|
+
.head 3 - Check Box:
|
201
|
+
.head 3 - Child Table:
|
202
|
+
.head 3 - Quest Child Window: cQuickDatabase
|
203
|
+
.head 3 - List Box:
|
204
|
+
.head 3 - Combo Box:
|
205
|
+
.head 3 - Picture:
|
206
|
+
.head 3 - Vertical Scroll Bar:
|
207
|
+
.head 3 - Horizontal Scroll Bar:
|
208
|
+
.head 3 - Column:
|
209
|
+
.head 3 - Background Text:
|
210
|
+
.head 3 - Group Box:
|
211
|
+
.head 3 - Line:
|
212
|
+
.head 3 - Frame:
|
213
|
+
.head 3 - Custom Control:
|
214
|
+
.head 3 - ActiveX:
|
215
|
+
.head 2 - Application Actions
|
216
|
+
.head 1 + Form Window: frmTest
|
217
|
+
.head 2 - Class:
|
218
|
+
.head 2 - Property Template:
|
219
|
+
.head 2 - Class DLL Name:
|
220
|
+
.head 2 - Title:
|
221
|
+
.head 2 - Icon File:
|
222
|
+
.head 2 - Accessories Enabled? No
|
223
|
+
.head 2 - Visible? Yes
|
224
|
+
.head 2 - Display Settings
|
225
|
+
.head 3 - Display Style? Default
|
226
|
+
.head 3 - Visible at Design time? Yes
|
227
|
+
.head 3 - Automatically Created at Runtime? Yes
|
228
|
+
.head 3 - Initial State: Normal
|
229
|
+
.head 3 - Maximizable? Yes
|
230
|
+
.head 3 - Minimizable? Yes
|
231
|
+
.head 3 - System Menu? Yes
|
232
|
+
.head 3 - Resizable? Yes
|
233
|
+
.head 3 - Window Location and Size
|
234
|
+
.head 4 - Left: Default
|
235
|
+
.head 4 - Top: Default
|
236
|
+
.head 4 - Width: 9.033"
|
237
|
+
.head 4 - Width Editable? Yes
|
238
|
+
.head 4 - Height: 5.179"
|
239
|
+
.head 4 - Height Editable? Yes
|
240
|
+
.head 3 - Form Size
|
241
|
+
.head 4 - Width: Default
|
242
|
+
.head 4 - Height: Default
|
243
|
+
.head 4 - Number of Pages: Dynamic
|
244
|
+
.head 3 - Font Name: Default
|
245
|
+
.head 3 - Font Size: Default
|
246
|
+
.head 3 - Font Enhancement: Default
|
247
|
+
.head 3 - Text Color: Default
|
248
|
+
.head 3 - Background Color: Default
|
249
|
+
.head 2 - Description:
|
250
|
+
.head 2 - Named Menus
|
251
|
+
.head 2 - Menu
|
252
|
+
.head 2 + Tool Bar
|
253
|
+
.head 3 - Display Settings
|
254
|
+
.head 4 - Display Style? Default
|
255
|
+
.head 4 - Location? Top
|
256
|
+
.head 4 - Visible? Yes
|
257
|
+
.head 4 - Size: Default
|
258
|
+
.head 4 - Size Editable? Yes
|
259
|
+
.head 4 - Font Name: Default
|
260
|
+
.head 4 - Font Size: Default
|
261
|
+
.head 4 - Font Enhancement: Default
|
262
|
+
.head 4 - Text Color: Default
|
263
|
+
.head 4 - Background Color: Default
|
264
|
+
.head 3 - Contents
|
265
|
+
.head 2 + Contents
|
266
|
+
.head 3 + Child Table: tblTest
|
267
|
+
.head 4 - Class Child Ref Key: 0
|
268
|
+
.head 4 - Class ChildKey: 0
|
269
|
+
.head 4 - Class:
|
270
|
+
.head 4 - Property Template:
|
271
|
+
.head 4 - Class DLL Name:
|
272
|
+
.head 4 - Display Settings
|
273
|
+
.head 5 - Window Location and Size
|
274
|
+
.head 6 - Left: 0.35"
|
275
|
+
.head 6 - Top: 0.262"
|
276
|
+
.head 6 - Width: 6.433"
|
277
|
+
.head 6 - Width Editable? Yes
|
278
|
+
.head 6 - Height: 4.143"
|
279
|
+
.head 6 - Height Editable? Yes
|
280
|
+
.head 5 - Visible? Yes
|
281
|
+
.head 5 - Font Name: Default
|
282
|
+
.head 5 - Font Size: Default
|
283
|
+
.head 5 - Font Enhancement: Default
|
284
|
+
.head 5 - Text Color: Default
|
285
|
+
.head 5 - Background Color: Default
|
286
|
+
.head 5 - View: Table
|
287
|
+
.head 5 - Allow Row Sizing? No
|
288
|
+
.head 5 - Lines Per Row: Default
|
289
|
+
.head 4 - Memory Settings
|
290
|
+
.head 5 - Maximum Rows in Memory: Default
|
291
|
+
.head 5 - Discardable? Yes
|
292
|
+
.head 4 - Contents
|
293
|
+
.head 4 - Functions
|
294
|
+
.head 4 - Window Variables
|
295
|
+
.head 4 - Message Actions
|
296
|
+
.head 3 + Pushbutton: pbPopulate
|
297
|
+
.head 4 - Class Child Ref Key: 0
|
298
|
+
.head 4 - Class ChildKey: 0
|
299
|
+
.head 4 - Class:
|
300
|
+
.head 4 - Property Template:
|
301
|
+
.head 4 - Class DLL Name:
|
302
|
+
.head 4 - Title: Populate
|
303
|
+
.head 4 - Window Location and Size
|
304
|
+
.head 5 - Left: 7.067"
|
305
|
+
.head 5 - Top: 0.238"
|
306
|
+
.head 5 - Width: 1.2"
|
307
|
+
.head 5 - Width Editable? Yes
|
308
|
+
.head 5 - Height: 0.298"
|
309
|
+
.head 5 - Height Editable? Yes
|
310
|
+
.head 4 - Visible? Yes
|
311
|
+
.head 4 - Keyboard Accelerator: (none)
|
312
|
+
.head 4 - Font Name: Default
|
313
|
+
.head 4 - Font Size: Default
|
314
|
+
.head 4 - Font Enhancement: Default
|
315
|
+
.head 4 - Picture File Name:
|
316
|
+
.head 4 - Picture Transparent Color: None
|
317
|
+
.head 4 - Image Style: Single
|
318
|
+
.head 4 - Text Color: Default
|
319
|
+
.head 4 - Background Color: Default
|
320
|
+
.head 4 + Message Actions
|
321
|
+
.head 5 + On SAM_Click
|
322
|
+
.head 6 - Call SalTblPopulate( tblTest, hSql, "select * from test", TBL_FillAll )
|
323
|
+
.head 3 + Pushbutton: pbWrite
|
324
|
+
.head 4 - Class Child Ref Key: 0
|
325
|
+
.head 4 - Class ChildKey: 0
|
326
|
+
.head 4 - Class:
|
327
|
+
.head 4 - Property Template:
|
328
|
+
.head 4 - Class DLL Name:
|
329
|
+
.head 4 - Title: Write
|
330
|
+
.head 4 - Window Location and Size
|
331
|
+
.head 5 - Left: 7.067"
|
332
|
+
.head 5 - Top: 0.631"
|
333
|
+
.head 5 - Width: 1.2"
|
334
|
+
.head 5 - Width Editable? Yes
|
335
|
+
.head 5 - Height: 0.298"
|
336
|
+
.head 5 - Height Editable? Yes
|
337
|
+
.head 4 - Visible? Yes
|
338
|
+
.head 4 - Keyboard Accelerator: (none)
|
339
|
+
.head 4 - Font Name: Default
|
340
|
+
.head 4 - Font Size: Default
|
341
|
+
.head 4 - Font Enhancement: Default
|
342
|
+
.head 4 - Picture File Name:
|
343
|
+
.head 4 - Picture Transparent Color: None
|
344
|
+
.head 4 - Image Style: Single
|
345
|
+
.head 4 - Text Color: Default
|
346
|
+
.head 4 - Background Color: Default
|
347
|
+
.head 4 + Message Actions
|
348
|
+
.head 5 + On SAM_Click
|
349
|
+
.head 6 - Call InsertNewRow( )
|
350
|
+
.head 3 + Pushbutton: pbStoredProcedure
|
351
|
+
.head 4 - Class Child Ref Key: 0
|
352
|
+
.head 4 - Class ChildKey: 0
|
353
|
+
.head 4 - Class:
|
354
|
+
.head 4 - Property Template:
|
355
|
+
.head 4 - Class DLL Name:
|
356
|
+
.head 4 - Title: PL/SQL
|
357
|
+
.head 4 - Window Location and Size
|
358
|
+
.head 5 - Left: 7.083"
|
359
|
+
.head 5 - Top: 0.988"
|
360
|
+
.head 5 - Width: 1.2"
|
361
|
+
.head 5 - Width Editable? Yes
|
362
|
+
.head 5 - Height: 0.298"
|
363
|
+
.head 5 - Height Editable? Yes
|
364
|
+
.head 4 - Visible? Yes
|
365
|
+
.head 4 - Keyboard Accelerator: (none)
|
366
|
+
.head 4 - Font Name: Default
|
367
|
+
.head 4 - Font Size: Default
|
368
|
+
.head 4 - Font Enhancement: Default
|
369
|
+
.head 4 - Picture File Name:
|
370
|
+
.head 4 - Picture Transparent Color: None
|
371
|
+
.head 4 - Image Style: Single
|
372
|
+
.head 4 - Text Color: Default
|
373
|
+
.head 4 - Background Color: Default
|
374
|
+
.head 4 + Message Actions
|
375
|
+
.head 5 + On SAM_Click
|
376
|
+
.head 6 - Call StoredProcedure()
|
377
|
+
.head 2 + Functions
|
378
|
+
.head 3 + Function: Connect
|
379
|
+
.head 4 - Description:
|
380
|
+
.head 4 - Returns
|
381
|
+
.head 4 - Parameters
|
382
|
+
.head 4 - Static Variables
|
383
|
+
.head 4 - Local variables
|
384
|
+
.head 4 + Actions
|
385
|
+
.head 5 - Set SqlDatabase = "ISLAND"
|
386
|
+
.head 5 - Set SqlUser = "SYSADM"
|
387
|
+
.head 5 - Set SqlPassword = "SYSADM"
|
388
|
+
.head 5 + If SqlConnect( hSql )
|
389
|
+
.head 6 - Call SalSetWindowText( hWndForm, SqlDatabase )
|
390
|
+
.head 3 + Function: StoredProcedure
|
391
|
+
.head 4 - Description:
|
392
|
+
.head 4 - Returns
|
393
|
+
.head 4 - Parameters
|
394
|
+
.head 4 - Static Variables
|
395
|
+
.head 4 + Local variables
|
396
|
+
.head 5 - Window Handle: hWndCol
|
397
|
+
.head 5 - String: sID
|
398
|
+
.head 4 + Actions
|
399
|
+
.head 5 - Set hWndCol = SalTblGetColumnWindow( tblTest, 1, COL_GetPos )
|
400
|
+
.head 5 + If hWndCol = hWndNULL
|
401
|
+
.head 6 - Call SalMessageBox( "hWndNULL", "Test", MB_Ok )
|
402
|
+
.head 5 + Else
|
403
|
+
.head 6 - Call SalGetWindowText( hWndCol, sID, 255 )
|
404
|
+
.head 6 + If SalStrIsValidNumber( sID )
|
405
|
+
.head 7 - !
|
406
|
+
.head 7 - ! Oracle PL/SQL
|
407
|
+
.head 7 - ! Call SqlPLSQLCommand( hSql, "test_update(" || sID || ")" )
|
408
|
+
.head 7 - !
|
409
|
+
.head 7 - ! SQLBase Stored Procedures
|
410
|
+
.head 7 - ! If SqlPrepareSP( hSql, "EXECUTE TEST_UPDATE", ":sID" )
|
411
|
+
.head 7 + If SqlRetrieve( hSql, "TEST_UPDATE", ":sID", "" )
|
412
|
+
.head 8 + If SqlExecute( hSql )
|
413
|
+
.head 9 - Call SalMessageBox( "SqlRetrieve and SqlExecute are successfull!", "Test", MB_Ok )
|
414
|
+
.head 8 + Else
|
415
|
+
.head 9 - Call SalMessageBox( "SqlExecute fails (TEST_UPDATE)", "Test", MB_Ok )
|
416
|
+
.head 7 + Else
|
417
|
+
.head 8 - Call SalMessageBox( "SqlRetrieve fails (TEST_UPDATE)", "Test", MB_Ok )
|
418
|
+
.head 7 - !
|
419
|
+
.head 6 + Else
|
420
|
+
.head 7 - Call SalMessageBox( "Text is not a valid number. Text = '" || sID || "'", "Test", MB_Ok )
|
421
|
+
.head 3 + Function: Disconnect
|
422
|
+
.head 4 - Description:
|
423
|
+
.head 4 - Returns
|
424
|
+
.head 4 - Parameters
|
425
|
+
.head 4 - Static Variables
|
426
|
+
.head 4 - Local variables
|
427
|
+
.head 4 + Actions
|
428
|
+
.head 5 - Call SqlDisconnect(hSql)
|
429
|
+
.head 3 + Function: InsertNewRow
|
430
|
+
.head 4 - Description:
|
431
|
+
.head 4 - Returns
|
432
|
+
.head 4 - Parameters
|
433
|
+
.head 4 - Static Variables
|
434
|
+
.head 4 - Local variables
|
435
|
+
.head 4 + Actions
|
436
|
+
.head 5 - Call SqlPrepareAndExecute( hSql, "INSERT INTO test (id, name) VALUES (9, '����')")
|
437
|
+
.head 5 - Call SqlCommit( hSql )
|
438
|
+
.head 3 + Function: Test1
|
439
|
+
.head 4 - Description: Function for the UnitTests of the Sal::Search Class
|
440
|
+
.head 4 - Returns
|
441
|
+
.head 4 - Parameters
|
442
|
+
.head 4 - Static Variables
|
443
|
+
.head 4 + Local variables
|
444
|
+
.head 5 - Boolean: bExists
|
445
|
+
.head 4 + Actions
|
446
|
+
.head 5 + If SqlExists( "Statement", bExists )
|
447
|
+
.head 6 - Call SalMessageBox( "Exists", "Info", MB_Ok )
|
448
|
+
.head 6 - Call SalMessageBox( "Really", "Info", MB_Ok )
|
449
|
+
.head 5 + Else
|
450
|
+
.head 6 - Call SalMessageBox( "Don't exists", "Info", MB_Ok )
|
451
|
+
.head 2 - Window Parameters
|
452
|
+
.head 2 + Window Variables
|
453
|
+
.head 3 - Sql Handle: hSql
|
454
|
+
.head 2 + Message Actions
|
455
|
+
.head 3 + On SAM_CreateComplete
|
456
|
+
.head 4 - Call Connect()
|
457
|
+
.head 3 + On SAM_Destroy
|
458
|
+
.head 4 - Call Disconnect()
|