MUST HAVE Table Processin/List Processing/Write Text Synchronised

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
Hi

It is REAL PAIN IN THE ASS that when you for example use "write to txt" action, and add empty line at the end...and later you try to use that file with table processing or list processing, you still get error saying that file is empty, but it is not!!!

Could you please already make this thing to remove empty lines on auto when file is loaded to table???
 
  • Спасибо
Реакции: Kepperbes
Регистрация
01.02.2011
Сообщения
99
Благодарностей
15
Баллы
0
for example use "write to txt" action, and add empty line at the end
Before the "write to txt" action, add "if" action with: '{-Variable.write_to_file_data-}'!=''

Then no empty lines can write to file.

A empty line remover would be good, but it can't be auto magic, just a boolean option. There are a few examples where deliberate empty lines are used in munging data for formatting, posting, etc.
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
First of all that is not what im talking about, and we all know that there is always some workaround (which im already doing)... but what else could we expec from you?
 
Регистрация
01.02.2011
Сообщения
99
Благодарностей
15
Баллы
0

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
He's talking about the checkbox at the bottom of save to file where you append a blank line to the file so that you don't end up with...

username:passusername:passusername:passusername:pass

when saving your text. He's not talking about trying to save an empty string to file. Who would do that? Of course you have to have logic to check for that.
 
  • Спасибо
Реакции: CaptainObvious

Kepperbes

Client
Регистрация
19.12.2011
Сообщения
243
Благодарностей
81
Баллы
28
Please add this in Zennolab.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
  • Спасибо
Реакции: lokiys

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
rostonix that is not the point of this discussion!!!
We all know about that option, but try using it in real life and see what you get in file then when you are adding line by line...
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Well, again: if you send a command to add empty line it will be added. That's how this action works.

To add data line by line you should use lists. If you want to add data to already existed file, you bind it to list and add data via list processing.
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
Are you serious???

When you have a project where you are generating files based on url/title/name...or whatever... it is easier to use Files action, but to successfuly add data line by line, you need to add line break at the end.

Files get all formated nice as they should be, and line break is there like it should be.

BUT, if we use that same file later in other project with list or table we are getting error "index outide blah blah blah" just because of that line break at the end of file!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

So my point here from start was never about anything else but the simple fact that table processing and list processing should be able to ignore that line break at the end without making work around with extra steps.

Everything can not be solved with lists like you think!!!
 
Последнее редактирование модератором:
  • Спасибо
Реакции: lukas76 и Kepperbes

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
STOP AND lets start from the begging

It is REAL PAIN IN THE ASS that when you for example use "write to txt" action, and add empty line at the end...and later you try to use that file with table processing or list processing, you still get error saying that file is empty, but it is not!!!
It will not be reloaded immediately, it checks every second all files +/- time to load them and process the operations. If they were refreshed from the 3rd party site it will be reloaded.

"index outide blah blah blah" just because of that line break at the end of file!!
Now you have the problem with the line break. That is wrong with it?


I understand that it is easier to use File Action in some case. But Files != Lists or Tables. It will never be the same. These are the different things you can write to the files of any databases direct nor MySQL neither PostgreSQL or any other. This approach will not work correctly. Here is the same situation.

In your case it will be better to use C# macro in both project to work with temp files.
http://help.zennolab.com/en/v4/zennoposter/macros/4.3.5/webframe.html
ZennoLab.Macros Assembly -> Namespaces -> ZennoLab.Macros Namespace -> Classes -> FileSystem -> Methods

Look at the functions FileAppendString & FileGetBlock
 
  • Спасибо
Реакции: Kepperbes

Kepperbes

Client
Регистрация
19.12.2011
Сообщения
243
Благодарностей
81
Баллы
28
STOP AND lets start from the begging



It will not be reloaded immediately, it checks every second all files +/- time to load them and process the operations. If they were refreshed from the 3rd party site it will be reloaded.


Now you have the problem with the line break. That is wrong with it?


I understand that it is easier to use File Action in some case. But Files != Lists or Tables. It will never be the same. These are the different things you can write to the files of any databases direct nor MySQL neither PostgreSQL or any other. This approach will not work correctly. Here is the same situation.

In your case it will be better to use C# macro in both project to work with temp files.
http://help.zennolab.com/en/v4/zennoposter/macros/4.3.5/webframe.html
ZennoLab.Macros Assembly -> Namespaces -> ZennoLab.Macros Namespace -> Classes -> FileSystem -> Methods

Look at the functions FileAppendString & FileGetBlock
Darkdiver,

First of all I'd like to thank you for making more effort to communicate with the users. It means (or at least I hope it means) that you genuinely care, and want to make this situation better.

With that being said, while I love the idea that if needed, the C# Macro Action is there, neither myself or alot of my friends are fluent in the C# programming language. That's something is expect the Code Creator guys to really be excited about, but not normal users who don't know C# without having much desire to learn it.

It's my belief (and I'm sure the majority of the people reading this thread would agree) that what DJ is trying to say is that there is a problem that needs to be addressed WITHOUT needing to resort to using some sort of work around like Anton suggested. I understand that Anton will use a workaround if necessary, but sometimes work arounds are a pain in the a** and things should work without needing them. Things should be simple.

A feature like DJ is requesting is something that should be able to be done without C# because its something even the basic users will have trouble with if left the way it is.
 
Регистрация
01.02.2011
Сообщения
99
Благодарностей
15
Баллы
0
It's my belief (and I'm sure the majority of the people reading this thread would agree) that what DJ is trying to say is that there is a problem that needs to be addressed WITHOUT needing to resort to using some sort of work around like Anton suggested. I understand that Anton will use a workaround if necessary, but sometimes work arounds are a pain in the a** and things should work without needing them. Things should be simple.
Things are simple. It appears again you & DJ don't understand simple programing 101 fundmentals.

Files != data structure. Look, http://en.wikipedia.org/wiki/Data_structure

For code to process collections of data and output a result without going full retard, the data needs to be formated into a data structure that has specfic rules about formating & indexing.

Lists & Tables actions in ZP are tools for data structures, and files are not. Just like water & vodka look similar, files & lists look similar, but i don't need to tell you water isn't vodka. Indexing & formating are the invisible magic like alcohol in vodka.

And the feature request, "Could you please already make this thing to remove empty lines on auto when file is loaded to table???" actually requires the file to be indexed. Indexing is what lists does. Problem reported dosn't exist if you use the correct tool for the job, rostonix, again, is 100% correct. Using a hammer to hit a nail is not a work around. Simple.

Listen to what rostonix says, he does a great job with support, & he really is a ZP expert.
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
My point here was that things would be much easier to deal with if simply lists and tables would recognize empty line at the end, and remove it or something because not only "write text" action can be the one which is causing troubles, sometimes you edit text file manually, and you just click enter at the end of data... and later you run project and get error...than you must stop the project and check the file, and remove that line again.... and all this takes time away.
 
Последнее редактирование модератором:

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
My point here was that things would be much easier to deal with if simply lists and tables would recognize empty line at the end, and remove it or something because not only "write text" action can be the one which is causing troubles, sometimes you edit text file manually, and you just click enter at the end of data... and later you run project and get error...than you must stop the project and check the file, and remove that line again.... and all this takes time away.
It's my belief (and I'm sure the majority of the people reading this thread would agree) that what DJ is trying to say is that there is a problem that needs to be addressed WITHOUT needing to resort to using some sort of work around like Anton suggested. I understand that Anton will use a workaround if necessary, but sometimes work arounds are a pain in the a** and things should work without needing them. Things should be simple.
A feature like DJ is requesting is something that should be able to be done without C# because its something even the basic users will have trouble with if left the way it is.
First of all stop insulting other members (I've edited your posts)
To be more constructive I can suggest to all of you.
We will add a method "add a text" to the list.
It will work in such way. We have a list with {-String.Enter-} as a separator
You can a add a text to it.

line 1
line 2
line 3

After adding this text it will contain 3 lines instead of one.
Also it will have a check box remove empty records.


This should solve the problem that using list is not often convenient with adding huge amount of formatted text.
We will not mix flies and cutlets. Files actions should not affect other data structures.
 
  • Спасибо
Реакции: Kepperbes и bigcajones

Kepperbes

Client
Регистрация
19.12.2011
Сообщения
243
Благодарностей
81
Баллы
28
First of all stop insulting other members (I've edited your posts)
To be more constructive I can suggest to all of you.
We will add a method "add a text" to the list.
It will work in such way. We have a list with {-String.Enter-} as a separator
You can a add a text to it.

line 1
line 2
line 3

After adding this text it will contain 3 lines instead of one.
Also it will have a check box remove empty records.


This should solve the problem that using list is not often convenient with adding huge amount of formatted text.
We will not mix flies and cutlets. Files actions should not affect other data structures.
Thanks DarkDiver!
 

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