Hi all,
Great forum you have here, I hope it starts coming to life soon. In the meantime... I have been looking across various Amiga sites and there are plenty of libraries X, Y and Z, but for beginners little documentation of how to quickly get started and up and running.
I am hoping to start work on a medium-sized project this year when AVD and the X1000 arrives and I need to know a few fundamental principles and common routines.
(edited post, see next)
The user interface will be built entirely with AVD and the coding will be written in C++.
It will need to carry out the following operations:
Image loading
1) Detect File Type
2) How to open a requester, listing filtered by support image types above
3) Load PNGs, GIFs or JPG... WebP would be nice also.
4) Load image into an object
5) Scale image/object
XML Handling
1) Read a plain text file/xml file
2) Parse the XML file into an array or structure so I can...
a) Address tag data
b) Manipulate and add new tag data into the structure
3) Write the plain text file/xml file back to disk.
Nb: Projects will be created in PROGDIR: So a nice example of how to open/close files would be useful as well.
GUI
I guess AVD will format the code so I can act on user interaction. Eg. Able to read a slider to get the value, set minimum and maximum of a slider in C++ - just one example.
Upload
Does AmigaOS4 come with a Curl command as standard?
Curl method:
1) How to call an external command using C++?
2) Act on its result
If not implement this myself, which will require routines for:
1) Check an internet connection is available
2) Reach an FTP Site
3) Upload a file
4) Provide a progress bar
5) Check file has finished uploading
6) Error handling
AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide
I can't give you exact code, but here are a few pointers:
Image Loading: Use the AmigaOS datatypes system; specifically the picture datatype. It can both identify image files, and load them in, so long as there is a datatype for that particular image format.
XML Handling: IIRC, the application.library has basic XML handling, primarily designed for handling XML based prefs files. Otherwise, there's the expat library on os4depot, along with a few others (just search for XML on os4depot).
GUI: AVD will eventually have a GUI designer. In the meantime, there is an ReAction guide on os4depot, plus some examples (search for ReAction on os4depot).
Upload: You will find libcurl on os4depot. If you want to roll your own, there should be some example network code available. Like most OSes, AmigaOS uses BSD style sockets for networking, so lots of networking code can be recompiled on AmigaOS with little changes, if any.
Hans
Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work