Case sensitivity & 0 based question

This forum is meant for questions and discussions about the X# language and tools
Post Reply
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Case sensitivity & 0 based question

Post 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
User avatar
wriedmann
Posts: 3754
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Re: Case sensitivity & 0 based question

Post 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
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: Case sensitivity & 0 based question

Post 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
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: Case sensitivity & 0 based question

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: Case sensitivity & 0 based question

Post by ic2 »

Hello Robert,
The latest 2.18.
Dick
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: Case sensitivity & 0 based question

Post 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
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Case sensitivity & 0 based question

Post 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?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: Case sensitivity & 0 based question

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Case sensitivity & 0 based question

Post by Chris »

Robert,

Thanks, it's working well again!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply