Skip to content

Instantly share code, notes, and snippets.

Mark Goldberg MarkGoldberg

Block or report user

Report or block MarkGoldberg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MarkGoldberg
MarkGoldberg / PartOf_ABFile.clw
Last active Jan 31, 2019
A refactored FileManager.EqualBuffer
View PartOf_ABFile.clw
FileManager.EqualBuffer PROCEDURE(*USHORT Id)
! Why *USHORT, Id is never altered, so why not pass by value ?
RetAreEqual BYTE(TRUE)
CODE
IF SELF.UseFile()<>Level:Benign ! Is this needed? Should a buffer compare require an open file?
OR SELF.BlobChanged ! A blob has changed so the buffers are unequal
THEN
RetAreEqual = FALSE
ELSIF SELF.FindBuffer( Id ) <> NoError
@MarkGoldberg
MarkGoldberg / FindFEQFromLabel.clw
Created Sep 6, 2018
Clarion - Find FEQ from LABEL using DBG.GetFEQDescr
View FindFEQFromLabel.clw
WindowManagerEst.FindFEQFromLabel PROCEDURE(STRING Label, SIGNED xLowFEQ=-MAX:FEQ, SIGNED xHiFEQ=MAX:FEQ)
SearchFor &STRING
CurrFEQ FEQ
CREATE:_ComboButton EQUATE(CREATE:combo + 0100H) !see NG: Softvelocity.clarion.documentation Thread:"What is {prop:type}=271" Sept-18-2006
CODE
DO SetSearchFor
! ASSERT(0,eqDBG&'FindFEQFromLabel SearchFor['& SearchFor &']')
LOOP
CurrFEQ=SELF.MyWindow{PROP:NextField, CurrFEQ}
@MarkGoldberg
MarkGoldberg / gist:6a9fb3e50600b103c7ed5c51ce7004ba
Last active Oct 5, 2017
Enumerate Controls and Find Overlapping Controls
View gist:6a9fb3e50600b103c7ed5c51ce7004ba
!! Note: I have not tried to compile this code... so it might have bugs
qtFEQs QUEUE,TYPE
FEQ SIGNED
END
gtXYWH_Signed GROUP,TYPE
X SIGNED
Y SIGNED
@MarkGoldberg
MarkGoldberg / ListOverEntries.clw
Last active Oct 2, 2017
Disable Obscured Field under a list, to solve focus grabbing bug.
View ListOverEntries.clw
! There is an apparent problem where click on a row on a list, is interpretted as a click on an obsucred field under the row.
! This proof of concept shows that DISABLING the control under the list, solves that problem
! Some extra complexity was added to correct tabbing around
! for some reason the EVENT:Selecting and EVENT:Selected are showing FIELD()=0 when MyListFEQ exists.
PROGRAM
MAP
END
@MarkGoldberg
MarkGoldberg / ThreadMonitor.clw
Created Sep 6, 2017
Clarion ThreadMonitor class - used to Notify a thread as each thread starts and ends
View ThreadMonitor.clw
MEMBER
MAP
END
INCLUDE('ThreadMonitor.inc'),ONCE
eqDBG EQUATE('<4,2,7>')
MOD:ConstructEvent SIGNED
MOD:DestructEvent SIGNED
MOD:ThreadToInform SIGNED
View FileAccessModes.equ
! File Access Modes
OMIT('__FileAccessModes__',FileAccessMode:WriteOnly)
!FILE:ReadOnly EQUATE ( 0H)
!FILE:WriteOnly EQUATE ( 1H)
!FILE:ReadWrite EQUATE ( 2H)
!!-------------
!FILE:AnyAccess EQUATE ( 0H)
!FILE:DenyAll EQUATE (10H)
!FILE:DenyWrite EQUATE (20H)
@MarkGoldberg
MarkGoldberg / ShowQ.clw
Created Aug 16, 2017
Show ctQueue on ClarionLive Open Webinar 2017-Aug-16
View ShowQ.clw
PROGRAM
MAP
END
include('ctQueue.inc'),ONCE
!gtPoint GROUP,TYPE
!X REAL
@MarkGoldberg
MarkGoldberg / CenterAppModalWindow.CLW
Created Jun 7, 2017
Centering Application Modal Window
View CenterAppModalWindow.CLW
PROGRAM
MAP
MAIN()
BrahnModal()
NonMDIChild()
END
glo:Frame &Window
@MarkGoldberg
MarkGoldberg / WeekendDaysInRange.clw
Last active Apr 22, 2017
Function to return number of weekend days in a date range, written in Clarion for Windows
View WeekendDaysInRange.clw
PROGRAM
Day ITEMIZE,PRE(Day)
Sunday EQUATE(0)
Monday EQUATE
Tuesday EQUATE
Wednesday EQUATE
Thursday EQUATE
Friday EQUATE
Saturday EQUATE
@MarkGoldberg
MarkGoldberg / Dispose from a base class
Last active Mar 6, 2017
Clarion - test of using an interface to call into a derived class from a reference to it's parent
View Dispose from a base class
PROGRAM
MAP
END
include('debuger.inc'),ONCE
DBG debuger
iGoAway INTERFACE
GoAway PROCEDURE
END
You can’t perform that action at this time.