List bug

  • Автор темы Автор темы lokiys
  • Дата начала Дата начала
csv is table, not a list.
try to use proper methods for tables.
 
Oh that's kinda offensive :db:

Код:
Развернуть Свернуть Копировать
var masterList = project.Lists["Master"];
string data = masterList.ElementAt(0);
return siteNr = Macros.TextProcessing.Split(data, ",", "2").First();
 
Oh that's kinda offensive :db:

Код:
Развернуть Свернуть Копировать
var masterList = project.Lists["Master"];
string data = masterList.ElementAt(0);
return siteNr = Macros.TextProcessing.Split(data, ",", "2").First();


No no no. I'm not there to offend somebody. :) Just there is bug and I know it, but again this is some weird bug. Let me show you what I'm getting.

zE4dJRA.png


This is piece of code: and this is what I can see in logs:
3UP0Nf8.png


In some reason it does not return string, but all data is returner like in list and without comas. I'm more than sure that there is some mistake because there was changed something in table settings, for csv files...

About this:

string data = masterList.ElementAt(0);
string data = masterList[0];

This is that same :)
 
Код:
Развернуть Свернуть Копировать
// Save all data by sites
var masterList = project.Lists["Master"];
if(masterList.Count == 0)
{
    project.SendInfoToLog("Links prepared", true);
    return true;
}
string data = masterList[0];
project.SendInfoToLog(data, true);
return Macros.TextProcessing.Split(data, ",", "2").First();

this works in unreleased build
http://i.gyazo.com/2a68a0119abb267dd8ff664dd1b5cd00.png
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)