VERSION "2.00.WC1" BEGIN ixWindow dateTestWN windowStyle *= ixWindow::mainTop containingWindow *= NULL derivedFrom *= "ixWindow" rulersOn *= TRUE fontItalic *= FALSE title = "Date Test" fontUnderline *= FALSE enabled *= TRUE backgroundColor *= NULL foregroundColor *= NULL fontName *= "System" fontSize *= 10 fontBold *= TRUE database = "STORES6" snapToGrid *= FALSE height = 6225 width = 8160 left = 0 top = 0 helpFile *= NULL classname = "dateTestWCL" name = "dateTestWN" helpNum *= 0 source *= TRUE shown *= TRUE rofID *= 0 @rofFileName *= NULL topicName *= NULL icon *= NULL theStartup = TRUE characterMode *= FALSE gridOn *= FALSE BEGIN ixSuperTable SuperTable2 updateTable *= "datetest" numDisplayedRows *= 1 maxRows *= NULL SVName *= NULL selectUnique *= FALSE numDisplayedCols *= 3 data_source *= tables fontItalic *= NULL fontUnderline *= NULL enabled *= TRUE backgroundColor *= NULL foregroundColor *= NULL fontName *= NULL fontSize *= NULL fontBold *= NULL height = 3720 width = 6780 left = 150 SVLevel *= NULL top = 420 selectFromPart *= "datetest" selectJoinPart *= NULL selectOrderbyPart *= NULL borderWidth *= 20 classname *= "ixSuperTable" name = "SuperTable2" helpNum *= 0 shown *= TRUE rofID *= 0 @rofFileName *= NULL layout *= ixSuperTable::freeForm displayMode *= ixSuperTable::displayData selectFilterPart *= NULL dbConnection *= NULL lockMode *= ixSuperTable::noLock BEGIN ixSuperField SuperField34 format *= NULL blobEditor *= NULL encLength *= 4 maxDataChars *= 10 title_BackgroundColor *= NULL includeTable *= NULL useIncludes *= FALSE title_ForegroundColor *= NULL title_FontName *= NULL title_FontSize *= NULL fontItalic *= NULL title *= "dte" fontUnderline *= NULL tabIndex *= NULL tabEnabled *= TRUE backgroundColor *= NULL foregroundColor *= NULL fontName *= NULL fontSize *= NULL fontBold *= NULL height = 440 width = 1645 left = 1373 top = 910 classname *= "ixSuperField" columnAlias *= NULL name = "SuperField34" helpNum *= 0 title_Width = 548 title_Left = 490 shiftPolicy *= ixSuperField::noShift shown *= TRUE title_FontUnderline *= NULL title_FontItalic *= NULL rofID *= 0 title_FontBold *= NULL initialQueryValue *= NULL initialDataValue *= NULL type *= 7 dataState *= ixSuperField::enabledState dataJustify *= ixSuperField::leftJustify title_Top = 910 @rofFileName *= NULL titleJustify *= ixSuperField::rightJustify autoNextOn *= FALSE title_Height = 440 required *= FALSE primaryKey *= TRUE verify *= FALSE SQLRole *= ixSuperField::updateRole nullable *= FALSE queryState *= ixSuperField::enabledState multiLine *= FALSE colNum = 1 columnName = "dte" tableName = "datetest" pictureString *= NULL handler rightMouseClick(vertical INTEGER, horizontal INTEGER) # call the pickDate popup via a common function CALL mPickDateWN.pickDateForSF(self, getVisualContainer()) end handler END BEGIN ixButton Button67 fontItalic *= NULL title = "OK" fontUnderline *= NULL enabled *= TRUE tabIndex *= NULL tabEnabled *= TRUE backgroundColor *= NULL foregroundColor *= NULL fontName *= NULL fontSize *= NULL fontBold *= NULL height = 480 width = 1445 left = 2575 top = 3065 theDefault *= FALSE classname *= "ixButton" name = "Button67" helpNum *= 0 shown *= TRUE rofID *= 0 @rofFileName *= NULL handler activate() VARIABLE ok BOOLEAN VARIABLE superTable ixSuperTable VARIABLE myWN ixWindow LET superTable = (getVisualContainer() CAST ixSuperTable) LET ok = superTable.revert() LET myWN = getWindow() IF myWN.close() THEN END IF end handler END BEGIN ixTextBox TextBox80 fontItalic *= NULL fontUnderline *= NULL enabled *= TRUE tabIndex *= NULL tabEnabled *= TRUE backgroundColor *= NULL foregroundColor *= NULL fontName *= NULL fontSize *= NULL fontBold *= NULL height = 420 width = 1350 left = 4470 top = 945 maxChars = 10 classname *= "ixTextBox" name = "TextBox80" helpNum *= 0 shown *= TRUE rofID *= 0 text = NULL @rofFileName *= NULL multiLine = FALSE handler rightMouseClick(vertical INTEGER, horizontal INTEGER) # this is how to use the pickdate() stuff on a non-SuperField VARIABLE myDate ixDate VARIABLE lDate DATE VARIABLE cDate CHAR(*) # focus back in CALL focus() LET cDate = getText() # since we might be in displayQuery mode, # make sure the contents can be a date LET myDate = NEW ixDate(value: NULL) CALL myDate.setValueStr(cDate) IF myDate.isNull() THEN # could not convert the string to a date LET lDate = NULL ELSE LET lDate = myDate.getValueStr() END IF IF lDate IS NOT NULL THEN CALL mPickDateWN.setDate(lDate) END IF CALL mPickDateWN.setLocation(getWindow(),self.getTop(),self.getLeft()) CALL mPickDateWN.show() LET lDate = mPickDateWN.getDate() LET cDate = lDate USING "mm/dd/yyyy" CALL setText(cDate) CALL focus() end handler END BEGIN ixLabel Label81 fontItalic *= NULL fontUnderline *= NULL backgroundColor *= NULL foregroundColor *= NULL fontName *= NULL fontSize *= NULL fontBold *= NULL height = 375 width = 675 left = 3660 top = 1005 classname *= "ixLabel" name = "Label81" shown *= TRUE rofID *= 0 labelJustify *= ixLabel::leftJustify text = "Text" @rofFileName *= NULL END BEGIN ixSuperField SuperField1213 format *= NULL blobEditor *= NULL encLength *= 2566 maxDataChars *= 25 title_BackgroundColor *= NULL includeTable *= NULL useIncludes *= FALSE title_ForegroundColor *= NULL title_FontName *= NULL title_FontSize *= NULL fontItalic *= NULL title *= "dtmyth" fontUnderline *= NULL tabIndex *= NULL tabEnabled *= TRUE backgroundColor *= NULL foregroundColor *= NULL fontName *= NULL fontSize *= NULL fontBold *= NULL height = 440 width = 4660 left = 1388 top = 1510 classname *= "ixSuperField" columnAlias *= NULL name = "SuperField1213" helpNum *= 0 title_Width = 908 title_Left = 160 shiftPolicy *= ixSuperField::noShift shown *= TRUE title_FontUnderline *= NULL title_FontItalic *= NULL rofID *= 0 title_FontBold *= NULL initialQueryValue *= NULL initialDataValue *= NULL type *= 10 dataState *= ixSuperField::enabledState dataJustify *= ixSuperField::leftJustify title_Top = 1510 @rofFileName *= NULL titleJustify *= ixSuperField::rightJustify autoNextOn *= FALSE title_Height = 440 required *= FALSE primaryKey *= FALSE verify *= FALSE SQLRole *= ixSuperField::updateRole nullable *= TRUE queryState *= ixSuperField::enabledState multiLine *= FALSE colNum = 2 columnName = "dtmyth" tableName = "datetest" pictureString *= NULL handler rightMouseClick(vertical INTEGER, horizontal INTEGER) # call the pickDate popup via a common function CALL mPickDateWN.pickDateForSF(self, getVisualContainer()) end handler END BEGIN ixSuperField SuperField1516 format *= NULL blobEditor *= NULL encLength *= 3594 maxDataChars *= 25 title_BackgroundColor *= NULL includeTable *= NULL useIncludes *= FALSE title_ForegroundColor *= NULL title_FontName *= NULL title_FontSize *= NULL fontItalic *= NULL title *= "dtmyts" fontUnderline *= NULL tabIndex *= NULL tabEnabled *= TRUE backgroundColor *= NULL foregroundColor *= NULL fontName *= NULL fontSize *= NULL fontBold *= NULL height = 440 width = 4660 left = 1388 top = 2110 classname *= "ixSuperField" columnAlias *= NULL name = "SuperField1516" helpNum *= 0 title_Width = 908 title_Left = 160 shiftPolicy *= ixSuperField::noShift shown *= TRUE title_FontUnderline *= NULL title_FontItalic *= NULL rofID *= 0 title_FontBold *= NULL initialQueryValue *= NULL initialDataValue *= NULL type *= 10 dataState *= ixSuperField::enabledState dataJustify *= ixSuperField::leftJustify title_Top = 2110 @rofFileName *= NULL titleJustify *= ixSuperField::rightJustify autoNextOn *= FALSE title_Height = 440 required *= FALSE primaryKey *= FALSE verify *= FALSE SQLRole *= ixSuperField::updateRole nullable *= TRUE queryState *= ixSuperField::enabledState multiLine *= FALSE colNum = 3 columnName = "dtmyts" tableName = "datetest" pictureString *= NULL handler rightMouseClick(vertical INTEGER, horizontal INTEGER) # call the pickDate popup via a common function CALL mPickDateWN.pickDateForSF(self, getVisualContainer()) end handler END END handler pre_header() INCLUDE SYSTEM "ixdate.4gh" INCLUDE "pickdate.4gh" end handler handler start() VARIABLE myST ixSuperTable VARIABLE rowNum INTEGER # initialize the date picker. LET mPickDateWN = NEW pickDateWCL(containingWindow: getWindow(), shown: FALSE, windowStyle: ixWindow::modalPopup) CALL mpickDateWN.open() LET myST = getContainedObjByName("SuperTable2") LET rownum = myST.insert() end handler handler pre_body() VARIABLE mPickDateWN pickDateWCL end handler END