Update for 10.6 · KcsDev1982/sunbelt-plb-samples@f862c0c · GitHub
Skip to content

Commit f862c0c

Browse files
committed
Update for 10.6
Add class samples and update for version 10.6
1 parent 33fdaf9 commit f862c0c

13 files changed

Lines changed: 1340 additions & 5 deletions

README.md

Lines changed: 1 addition & 0 deletions

class_sample/class_sample.pls

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
*---------------------------------------------------------------
2+
.
3+
. Program Name: class_sample
4+
. Description: Sample program to demonstrate PLBOBJECTs
5+
.
6+
. Revision History:
7+
.
8+
. 17 Jul 23 W Keech
9+
. Original code
10+
.
11+
INCLUDE plbequ.inc
12+
INCLUDE plbmeth.inc
13+
INCLUDE plbstdlib.inc
14+
15+
*---------------------------------------------------------------
16+
// <program wide variables>
17+
18+
OpenDlg PLBOBJECT CLASS="srvsel_class"
19+
Calculator PLBOBJECT CLASS="webcalc_class"
20+
21+
CalcWin PLFORM "webcalc"
22+
23+
24+
*................................................................
25+
.
26+
. Code start
27+
.
28+
CALL Main
29+
LOOP
30+
EVENTWAIT
31+
REPEAT
32+
STOP
33+
*................................................................
34+
.
35+
. Select a file name using the OpenDlg PLBOBJECT
36+
.
37+
LoadSelect LFUNCTION
38+
ENTRY
39+
FileName DIM 256
40+
Result FORM 1
41+
42+
OpenDlg.GetFileName Giving FileName
43+
44+
ALERT NOTE,FileName,Result,"File Name"
45+
46+
FUNCTIONEND
47+
48+
*................................................................
49+
.
50+
. Handle the $CHANGE event from the Calculator PLBOBJECT
51+
.
52+
CalcChange LFUNCTION
53+
ENTRY
54+
Result FORM 10
55+
Message DIM 20
56+
57+
EVENTINFO 0,RESULT=Result
58+
59+
PACK Message From "Value is ",Result
60+
ALERT NOTE,Message,Result,"Calc Result"
61+
FUNCTIONEND
62+
63+
*................................................................
64+
.
65+
. Get the current result from the Calculator PLBOBJECT
66+
.
67+
CalcResult LFUNCTION
68+
ENTRY
69+
BigNum FORM 10
70+
Message DIM 20
71+
Result FORM 1
72+
73+
GETPROP Calculator,*Value=BigNum
74+
PACK Message From "Value is ",BigNum
75+
76+
ALERT NOTE,Message,Result,"Calc Result"
77+
FUNCTIONEND
78+
79+
*................................................................
80+
.
81+
. Terminaste the program
82+
.
83+
Terminate LFUNCTION
84+
ENTRY
85+
DESTROY OpenDlg
86+
DESTROY Calculator
87+
STOP
88+
FUNCTIONEND
89+
*................................................................
90+
.
91+
. Main - Main program entry point
92+
.
93+
Main LFUNCTION
94+
ENTRY
95+
.
96+
. Hide the main window and create the main form
97+
.
98+
WINHIDE
99+
FORMLOAD CalcWin
100+
.
101+
. Create the Calculator PLBOBJECT from the webcalc_class.plc module
102+
.
103+
CREATE Calculator
104+
.
105+
. Setup the Calculator PLBOBJECT $CHANGE event
106+
.
107+
EVENTREG Calculator,$CHANGE,CalcChange
108+
.
109+
. Invoke the Calculator PLBOBJECT CalcBind method
110+
.
111+
Calculator.CalcBind Using pnlCalc
112+
.
113+
. Create the OpenDlg PLBOBJECT from the srvsel_class.plc module
114+
.
115+
CREATE OpenDlg
116+
117+
FUNCTIONEND

class_sample/class_sample.prj

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<SunIDE_Project_File Version="10.0">
3+
<ActiveProfile>class_sample</ActiveProfile>
4+
<ProjectTitle>class_sample</ProjectTitle>
5+
<SelectedProgram>class_sample.pls</SelectedProgram>
6+
<Profiles>
7+
<Name>class_sample</Name>
8+
<Properties>
9+
<SourceFolder>C:\Sunbelt\sunbelt-plb-samples\class_sample\</SourceFolder>
10+
<Compiler/>
11+
<CompilerIni/>
12+
<CompilerOptions>-S,WS#1</CompilerOptions>
13+
<MinimizeCompiler>1</MinimizeCompiler>
14+
<BookmarkErrors>0</BookmarkErrors>
15+
<ShowCompilerCmd>1</ShowCompilerCmd>
16+
<MaxErrors>99</MaxErrors>
17+
<SymbolFile>1</SymbolFile>
18+
<OpenEnded>1</OpenEnded>
19+
<CrossReference>0</CrossReference>
20+
<MetadataMode>2</MetadataMode>
21+
<MetadataFolder/>
22+
<Graphics>0</Graphics>
23+
<NoDuplicate>0</NoDuplicate>
24+
<EncryptSymbols>0</EncryptSymbols>
25+
<FlagConflicts>0</FlagConflicts>
26+
<AbortError>0</AbortError>
27+
<PauseError>0</PauseError>
28+
<PauseSeconds>2</PauseSeconds>
29+
<MultipleTraps>0</MultipleTraps>
30+
<ReadMode>0</ReadMode>
31+
<Restricted>0</Restricted>
32+
<OutputExt/>
33+
<OutputFolder/>
34+
<OutputMode>1</OutputMode>
35+
<WorkFolder/>
36+
<CaseSensitive>0</CaseSensitive>
37+
<CommentDelims/>
38+
<SourceExt/>
39+
<CompatMode>1</CompatMode>
40+
<ListMode>1</ListMode>
41+
<ListFolder/>
42+
<DisableWarnings>0</DisableWarnings>
43+
<GeneratedCode>0</GeneratedCode>
44+
<NoTimestamp>0</NoTimestamp>
45+
<ListErrorDelete>0</ListErrorDelete>
46+
<NoOutput>1</NoOutput>
47+
<ErrorsOnly>0</ErrorsOnly>
48+
<AllSource>0</AllSource>
49+
<ExpandedMacros>0</ExpandedMacros>
50+
<ListOff>0</ListOff>
51+
<FalseIf>0</FalseIf>
52+
<SpoolFile>0</SpoolFile>
53+
<SpoolAppend>0</SpoolAppend>
54+
<IniFile/>
55+
<WorkingDirectory/>
56+
<HideMain>0</HideMain>
57+
<GlobalData>0</GlobalData>
58+
<VirtualMemory>20</VirtualMemory>
59+
<Arguments/>
60+
<DebugLog>1</DebugLog>
61+
<Debugger>1</Debugger>
62+
<DebugProcess>0</DebugProcess>
63+
<DebugBreakFirst>1</DebugBreakFirst>
64+
<DebugHost/>
65+
<DebugPort/>
66+
<PreBuildEnabled>0</PreBuildEnabled>
67+
<PreBuildCommands/>
68+
<PostBuildEnabled>0</PostBuildEnabled>
69+
<PostBuildCommands/>
70+
<FTPUpload>0</FTPUpload>
71+
<FTPDebug>0</FTPDebug>
72+
<FTPAccount/>
73+
<FTPFolder/>
74+
<EnableBackups>1</EnableBackups>
75+
<MaxBackups>10</MaxBackups>
76+
<BackupDir>.\Backups\</BackupDir>
77+
<GitEnabled>0</GitEnabled>
78+
<GitFolder/>
79+
<GitBranch/>
80+
<GitUserName/>
81+
<GitEmail/>
82+
<GitRemote/>
83+
</Properties>
84+
</Profiles>
85+
<Source Name="srvsel_class.pls"/>
86+
<Source Name="webcalc_class.pls"/>
87+
<Source Name="class_sample.pls"/>
88+
<Source Name="jsonmsg_class.pls"/>
89+
</SunIDE_Project_File>

class_sample/jsonmsg_class.pls

Lines changed: 139 additions & 0 deletions

0 commit comments

Comments
 (0)