SRL Archive - Development

newinternets.pas


Nava2

2010-01-12 23:50:32

Slowly, I'm working on getting all the new/old internet functions in place.

The file is in the SvN but is not being used.

Please let me know what functions I can add in!

Currently:
function ConnectionOpen(URL: String): Integer;
function ConnectionClose(ConnInd: Integer): Boolean;
destructor Destroy; override;
//POST variable functions for PHP transmission
procedure PostVariableAdd(connInd: Integer; theVar, theValue: String);
procedure PostVariableDel(connInd: Integer; theVar: String);
procedure PostVariableReplace(connInd: Integer; searchVar, replaceVar, value: String);
function PostHTTP(connInd: Integer): Boolean;

function getPage(URL: String): String;

Wizzup, I need helpz, I'm learning a lot as I go though :p, will you be my rafiki? :)

Method

2010-01-13 00:28:46

What's up with the weird names? I can understand wanting to be able to view things together in the code hints, but it doesn't make sense to have weird names like PostVariableAdd instead of something more meaningful and sensical like AddPostVariable.

Nava2

2010-01-13 00:37:10

I'm going to go with the new standard.. :s

Method

2010-01-13 00:42:09

I vote the new standard could be improved, then.

Perhaps someone should code a decent code hints system where a word typed in can match any part of a function name.

Simtoon

2010-01-13 01:14:47

From: Method

Perhaps someone should code a decent code hints system where a word typed in can match any part of a function name.


i like that :)

Gu3st...

2010-01-13 03:25:09

Hmm.. Imo the new standards make a lot more sense than SCAR ones

Anyways.. Good job nava :)

Wizzup?

2010-01-13 03:54:33

Instead of an array, you can use TList. It is probably much easier for managing post variables etc. The PostHTTP function should result the stream, not whether it worked or not. You use arrays for everything, while in some cases it would be better to use records. (for the PostVars for example)

I'll see what I can do later…

From: Method
I vote the new standard could be improved, then.


There's a thread about it somewhere - post your views?

And nava, you don't have to use that naming internally… You can just rename it when exporting to PS. Declare it with a diff name in the string, but pass the right pointer.

Nava2

2010-01-13 08:00:52

From: Wizzup?
Instead of an array, you can use TList. It is probably much easier for managing post variables etc. The PostHTTP function should result the stream, not whether it worked or not. You use arrays for everything, while in some cases it would be better to use records. (for the PostVars for example)

I'll see what I can do later…



There's a thread about it somewhere - post your views?

And nava, you don't have to use that naming internally… You can just rename it when exporting to PS. Declare it with a diff name in the string, but pass the right pointer.


Oh, awesome. I never realised that.

Do the variables just have to line up, per say?

mastaraymond

2010-01-13 13:17:51

In a object you can perfectly use "AddPostVariable" -> It's just that PS doesn't really support 'objects'. Therefore Kaitnieks/Freddy made a kind of OOP-system by using those Integers for BMPs/DTMs/HTTPs etc.. So for these functions I think it might be wise to do BitmapLoad, instead of LoadBitmap…

Nava2

2010-01-17 01:37:26

Okay, well I'm at a standstill because I'm silly and can't seem to grasp the opening and closing of connections.