xsharp.eu • Case sensitivity & 0 based question
Page 1 of 1

Case sensitivity & 0 based question

Posted: Tue Dec 05, 2023 1:16 pm
by ic2
I was debugging an issue with deleting items from a Winforms DataGrid and noticed 2 things:

1 In the ImmediateWIndow I got an error (does not exist..) when entering

SELF:dataGridNewEmails:Rowcount

It worked when I used SELF:dataGridNewEmails:RowCount (so with a capital C). I thought that case sensitivity was solved quite a while ago?

Also I noticed that in this line:

Code: Select all

IF !SELF:dataGridNewEmails:Rows[iIndex]:Visible
iIndex needed to be 0 based. I thought that X# wasn't 0 based (which is one of the big advantages of X# above C#), or isn't that the case when using direct .Net elements like the DataGrid?

Dick

Re: Case sensitivity & 0 based question

Posted: Tue Dec 05, 2023 1:53 pm
by wriedmann
Hi Dick,
X# has only arrays that can be 1-based. All collections are 0-based (since they are standard .NET objects).
Wolfgang

Re: Case sensitivity & 0 based question

Posted: Wed Dec 06, 2023 11:38 am
by ic2
Thanks Wolfgang, that makes sense (the explanation, not the zero based elements in .Net on it's own :? )

Remains the question why Rowcount didn't work in the Immediate Window. I really had the impression that the case sensitivity issue was solved earlier already?

Dick

Re: Case sensitivity & 0 based question

Posted: Wed Dec 06, 2023 12:57 pm
by robert
Dick,
ic2 wrote: Wed Dec 06, 2023 11:38 am Remains the question why Rowcount didn't work in the Immediate Window. I really had the impression that the case sensitivity issue was solved earlier already?
Which version of X# are you using ?

Robert

Re: Case sensitivity & 0 based question

Posted: Wed Dec 06, 2023 1:33 pm
by ic2
Hello Robert,
The latest 2.18.
Dick

Re: Case sensitivity & 0 based question

Posted: Tue Dec 12, 2023 10:23 am
by ic2
Note to this: I was further investigating this issue to see what worked and what didn't - and now (on a different line) the ImmediateWindow returned the result without problems regardless the case. I am sure that it failed earlier until I capitalized it but until I can reproduce it (and see the difference with what tried today) you should not spend time on this.

Another -unrelated- remark is that I often don't see a Post reply button or Quick reply box when I just started after a login with reading new messages, until I've refreshed the page once ore twice. If others have the same problem it may be something to check with the supplier of the template.

Dick

Re: Case sensitivity & 0 based question

Posted: Tue Dec 12, 2023 4:57 pm
by Chris
Hi Dick,

Yeah, I'm seeing the same problem in the website, since a few days now. Also getting some messages about not being autorized to read, until I do a refresh. Robert, was there an update to the site software in the last few days?

Re: Case sensitivity & 0 based question

Posted: Tue Dec 12, 2023 6:04 pm
by robert
Chris,
Yes there was an update, a caching component was causing problems. I have disabled that, which means that the site now uses the default Joomla caching.

Robert

Re: Case sensitivity & 0 based question

Posted: Wed Dec 13, 2023 7:19 am
by Chris
Robert,

Thanks, it's working well again!