Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

WD21 Mobile Strange issue with classes (no replies)

$
0
0
Hello All,

I have a class to fill a calendar in Windev 21, I have imported it into Windev 21 Mobile and have some strange things happening.

1) when window opens a call a procedure from the class that sets the values of 3 Variables.
In test mode on the PC everything works great but as soon as load it on the iPad it crashes no error code. After wasting 6 hours I figured out for some reason just one of the Variables from the class has to be set to Global.

2)The next issue is the date variable. I have a procedure that runs that changes the column titles of 7 columns in 7 different tables using a variable called m_dStartDate this variable gets corrupted when the code is run.
After 4 more hours wasted it took the same code made it a local procedure to the window and it worked fine.

The code:
WHEN EXCEPTION
	ExceptionEnable()
	Error("Build Calendar Error  : "+ExceptionInfo(errMessage))
END
//Clear the arrays
//ArrayDeleteAll(:m_arrCalData)

IF NOT DateValid(EDT_StartDate) THEN
	Info("The Date has gotten corrupted","The date = "+gdStartDate,"Today is : "+Today())
END

//The AddToDate is used in the loop for the header date
dAddToDate is Date = gdStartDate

Info("1) Assign to Var = "+gdStartDate,"Today is : "+Today())

//Set the end date to the start date and then will will add 27 days
gdEndDate = dAddToDate <<<This is where it gets messed up in the class

Info("2) Assign to end Date = "+gdStartDate,"Today is : "+Today())

//Add the 21 days to the end date
gdEndDate..Day +=6  <<<This changes it again. the gdStartDate

Info("3) Add 6 days = "+gdStartDate,"Today is : "+Today())

//These edit controls are on the form and are for display
//The user can change the date in the start date and run this code again
//WIN_Form_Calendar.EDT_StartDate = :m_dFMStart

//This is the loop that sets the dates on the column headers
FOR i = 1 TO 7
	//Before I start I must delete any old jobs from the table
	
	//sControl is string = ::m_sWindowName+"."+::TableName+i
	sControl is string = "WIN_Form_Calendar.TABLE_Day"+i

	TableDeleteAll({sControl,indControl})
	
	//I am checking to see if one of the headers is today date if so change the color of the table to Light Blue
	IF dAddToDate = Today() THEN
		{"COL_Day"+i,indControl}..BrushColor = RGB(208, 217, 238) //This is light blue I figured it out with paints custom color picker
	ELSE
		{"COL_Day"+i,indControl}..BrushColor = DefaultColor // If not current date default color
	END
	{"COL_Day"+i,indControl}..Title = DateToString(dAddToDate,"DDD DD MMM YYYY")
	
	dAddToDate..Day++
END

Info("The date = "+gdStartDate,"Today is : "+Today())


Is any one having issue with classes in IOS. The other thing I tried is creating a new class from scratch and rewriting this code but still had the same issue.

DW

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>