Recent

Author Topic: A few questions from a newbie  (Read 13240 times)

Trenatos

  • Hero Member
  • *****
  • Posts: 537
    • MarcusFernstrom.com
A few questions from a newbie
« on: July 08, 2010, 03:42:29 am »
Hey everyone,

My name is Marcus and I'm new to Lazarus and FPC.
I know the basics of C and am not completly new to programming in general.

Now, I have a project in mind that will require a few things and I was hoping some kind soul here could point me in the general direction of where to find information, I'm not asking for someone to code my project for me, I want to learn FPC, Lazarus, FCL and so on.

Ok, so here are some of the parts my project will need: FTP connectivity, sending and receiving files through said FTP connection, the ability to pick a folder through a popup window (Classic choose-a-folder thing common in windows), the ability to scan through that folder for picture files and be able to copy the filenames to a separate file to keep track of things, the ability to write a text-file with settings and such.

Here's what the project is for:
I'm building a website for a business and they're intent on wanting some simple ways of updading certain parts so I want to build a program where they can choose a folder, which is a folder with images that goes into a list for a slideshow on the site, and I might want to make a textfield where they can update some text on the site, all of which goes into a html file or somesuch that would then be uploaded to the website through the FTP functions.

If some kind sould would point me in the general direction of help would be awesome.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: A few questions from a newbie
« Reply #1 on: July 08, 2010, 09:55:07 am »
For me It's not exactly clear "where you are".

I know the basics of C and am not completly new to programming in general.

Would you like to learn the basics of Pascal first?
http://www.marcocantu.com/epascal/English/default.htm
http://www.taoyue.com/tutorials/pascal/index.html
http://www.freepascal.org/docs.var

Probably the best short introduction in OOP (Delphi) is here (german language):
http://www.delphi-treff.de/tutorials/objectpascal/delphi-crashkurs/objektorientierte-programmierung/
« Last Edit: July 08, 2010, 11:38:04 am by theo »

Trenatos

  • Hero Member
  • *****
  • Posts: 537
    • MarcusFernstrom.com
Re: A few questions from a newbie
« Reply #2 on: July 08, 2010, 06:14:34 pm »
Hi theo,

Like I said, I know the basics of C, and I know some: html, php, css, basic

Thank you for the links, I will be reading through them.
But do you have any advice on for example where to find information about an FTP FCL?
Or how to bring up a window to choose a folder (Not a normal file-browser window) etc. just to give me a push in the right direction of where to find this information?

Laksen

  • Hero Member
  • *****
  • Posts: 802
    • J-Software
Re: A few questions from a newbie
« Reply #3 on: July 08, 2010, 08:24:54 pm »
FTP you could do through either Synapse or lNet.

The folder list can be done with TSelectDirectoryDialog, if you need to find a folder on some local drive. If you need to pick a folder on the ftp host, then it's probably much harder

Trenatos

  • Hero Member
  • *****
  • Posts: 537
    • MarcusFernstrom.com
Re: A few questions from a newbie
« Reply #4 on: July 08, 2010, 08:42:31 pm »
Thank you, Laksen  :)

I was thinking about Synapse for the FTP functionality.
No I need a local folder, which should then be sent to the ftp along with a separate file that goes in a different folder.

I need to figure out how to manipulate files in FPC/Lazarus too.

This is an interesting project with, for me, lots of parts that needs to function for a end user that is a client.   :)

Laksen

  • Hero Member
  • *****
  • Posts: 802
    • J-Software
Re: A few questions from a newbie
« Reply #5 on: July 08, 2010, 08:45:40 pm »
The FTP client in synapse seems a bit weird, but it should apparently do what you need

There are the routines to just send files from filename, which would probably be easiest(and most reliable), but might be a bit slower than keeping a connection open

Searching files in the selected folder should be a piece of cake, using standard methods such as FindFirst/*Next/*Close

Trenatos

  • Hero Member
  • *****
  • Posts: 537
    • MarcusFernstrom.com
Re: A few questions from a newbie
« Reply #6 on: July 08, 2010, 08:56:41 pm »
I don't have access to the compiler right now, I'm at my daytime job at the moment.

Transfer speed is not crucial and bandwidth is plenty.
I need reliability, the client is as not tech-savvy and needs something simple that just works.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: A few questions from a newbie
« Reply #7 on: July 09, 2010, 09:23:11 am »
Quote
Searching files in the selected folder should be a piece of cake, using standard methods such as FindFirst/*Next/*Close
And even easier with these units (locate EnumDirs and ExtMasks on the page).

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: A few questions from a newbie
« Reply #8 on: July 09, 2010, 10:14:50 am »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: A few questions from a newbie
« Reply #9 on: July 09, 2010, 01:21:46 pm »
It's already there? :o
Since when?

Laksen

  • Hero Member
  • *****
  • Posts: 802
    • J-Software
Re: A few questions from a newbie
« Reply #10 on: July 09, 2010, 01:30:57 pm »
It's already there? :o
Since when?
According to SVN logs: 8th december 2007 :)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: A few questions from a newbie
« Reply #11 on: July 09, 2010, 01:55:09 pm »
Damn! I must have missed it.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: A few questions from a newbie
« Reply #12 on: July 09, 2010, 03:33:07 pm »
Damn! I must have missed it.

You will have to bear the consequences.  :D

Trenatos

  • Hero Member
  • *****
  • Posts: 537
    • MarcusFernstrom.com
Re: A few questions from a newbie
« Reply #13 on: July 10, 2010, 05:13:56 am »
Hehe thanks for all the replies guys!   :)

I have a lot of material to cover by now, deep end here I come!
So, another question (Though I've found some old advice on this before):
Suggestions for learning FPC/Lazarus in general?
It is compatible with Delphi, right? Which versions? (As in; Could I pick up a Delphi book and dive in or are the differences too big if I don't have prior knowledge in Pascal?)

Laksen

  • Hero Member
  • *****
  • Posts: 802
    • J-Software
Re: A few questions from a newbie
« Reply #14 on: July 10, 2010, 10:08:31 am »
It's officially compatible with Delphi 7, in delphi mode

But any Delphi book will give you the idea of how everything works. The only real differences are in the syntax between mode objfpc, and Delphi itself. And those are very small(typically they are about pointers and pointers to methods)

There's also the new FPC/Lazarus book, if you understand german ;)

 

TinyPortal © 2005-2018