-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/mkromberg/jswc
- Loading branch information
Showing
7 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
( | ||
'GetTextSize' | ||
'GetFocus' | ||
'SetCookie' | ||
'GetCookie' | ||
'SetTitle' | ||
'GetTitle' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CBClearCookie args;e;cookietoset | ||
|
||
Event←⎕NS'' | ||
e←Event.Event←⎕NS'' | ||
e.(ID EventName Info)←(2↑args),⊂2↓args | ||
|
||
cookietoset←'','F1.COOKIETOSET'eWG'Text' | ||
|
||
⍝ Clearing is just setting with a time in the past | ||
2 eNQ 'F1' 'SetCookie' ('democookie=;max-age=-1') | ||
'F1.G.COOKIES'eWS'Text' ('Cookie: CLEARED') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CBRefreshCookie args;e;cookie | ||
|
||
Event←⎕NS'' | ||
e←Event.Event←⎕NS'' | ||
e.(ID EventName Info)←(2↑args),⊂2↓args | ||
|
||
cookie←2 eNQ 'F1' 'GetCookie' 'democookie' | ||
:If 0≠≢cookie | ||
cookie←2⊃⊃cookie | ||
:EndIf | ||
'F1.G.COOKIES'eWS'Text' ('Cookie: ',cookie) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CBSetCookie args;e;cookietoset | ||
|
||
Event←⎕NS'' | ||
e←Event.Event←⎕NS'' | ||
e.(ID EventName Info)←(2↑args),⊂2↓args | ||
|
||
cookietoset←'','F1.COOKIETOSET'eWG'Text' | ||
|
||
2 eNQ 'F1' 'SetCookie' ('democookie=',cookietoset) | ||
'F1.G.COOKIES'eWS'Text' ('Cookie: ',cookietoset) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CBSetTitle args;e;titletoset | ||
|
||
Event←⎕NS'' | ||
e←Event.Event←⎕NS'' | ||
e.(ID EventName Info)←(2↑args),⊂2↓args | ||
|
||
titletoset←'','F1.TITLETOSET'eWG'Text' | ||
|
||
2 eNQ 'F1' 'SetTitle' titletoset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
DemoCookies connected;cookie | ||
EWC.CONNECTED←connected | ||
⎕PW←1000 | ||
|
||
'F1'eWC'Form' 'Cookies'(50 50)(170 200)('Coord' 'Pixel') | ||
|
||
'F1.COOKIETOSET'eWC'Edit'('Posn' 50 10)('Size'(20 150)) | ||
'F1.SETCOOKIE'eWC'Button' 'Set Cookie'('Posn' 75 10)('Size'(20 150))('Event' 'Select' 'CBSetCookie') | ||
'F1.REFRESHCOOKIE'eWC'Button' 'Refresh Cookie'('Posn' 100 10)('Size'(20 150))('Event' 'Select' 'CBRefreshCookie') | ||
'F1.CLEARCOOKIE'eWC'Button' 'Clear Cookie'('Posn' 125 10)('Size'(20 150))('Event' 'Select' 'CBClearCookie') | ||
|
||
cookie←2 eNQ 'F1' 'GetCookie' 'democookie' | ||
:If 0≠≢cookie | ||
cookie←2⊃⊃cookie | ||
:EndIf | ||
|
||
'F1.G'eWC'Group'('Posn'(150 0))('Size'(20 200)) | ||
'F1.G.COOKIES'eWC'Text' ('Cookie: ',cookie)(0 10)(20 400) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
DemoTitle connected;title | ||
EWC.CONNECTED←connected | ||
⎕PW←1000 | ||
|
||
'F1'eWC'Form' 'Title'(50 50)(170 400)('Coord' 'Pixel') | ||
|
||
'F1.TITLETOSET'eWC'Edit'('Posn' 50 10)('Size'(20 150)) | ||
'F1.SETTITLE'eWC'Button' 'Set Title'('Posn' 75 10)('Size'(20 150))('Event' 'Select' 'CBSetTitle') | ||
|
||
title←2 eNQ 'F1' 'GetTitle' | ||
'F1.G'eWC'Group'('Posn'(100 0))('Size'(20 400)) | ||
'F1.G.COOKIES'eWC'Text' ('Original title on demo load: ',title)(0 10)(20 400) |