Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: motorollin on February 08, 2006, 09:36:25 AM
-
I'm used to developing in Delphi (Pascal IDE) on Windows and XCode (AppleScript IDE) on MacOS X. I have a need to develop an application on the Amiga, and am looking for some kind of RAD environment on the Amiga. Ideally I want to be able to build a simple GUI in a WYSIWIG environment, and then write the code for all of the GUI functions. Does such an application exist on the Amiga?
I looked at Feelin which seems to allow easy GUI development by using XML files, but does it also include a language for building functions in to the application, or is it just for designing the GUI?
Thanks for any advice.
--
moto
-
There isn't anything like Visual Studio but there are some helpful tools such as Gadtoolsbox, MuiBuilder and VisualArts.
Check out dev/gui on Aminet (de.aminet.net) for some programs.
-
Thanks - I'll take a look at those GUI builders later when I'm back at home.
Looks like it's time to learn C :nervous:
--
moto
-
If you are interested in Feelin I might help you by giving you hints or code examples. Currently, there is no GUI builder for Feelin but XML is very simple to use and you don't have to compile anything.
Still, you might have to learn C if the classes available are not enough for you. "line.c" is a good example of how using private classes and private code with XML defined UI.
-
Thanks Gofromiel. I have had some limited experience of C while coding for PalmOS. While the functions were completely different, the syntax was similar.
If I write a GUI in XML, how do I interface that with C code to actually make the application functional?
--
moto
-
It all depends on what you want to do. If you need to create objects from custom classes (embended in you code like the "lines" demo) all you have to do is create an array of entities with the F_ENTITIES_??? macros then use the FA_Document_Entities attribute when you create your XMLApplication object. Then, in your XML sources all you have to do is use entities as class names.
Let's say you have created a custom class and its entity is "mybutton", the XML file could look like this:
<?xml version="1.0" ?>
<feelin:application>
...
<Window id="win" Title="Test" Open="true">
<&mybutton; Text="This is my button" />
</Window>
...
</feelin:application>
Easy hu ? Do you understand (mostly) ?
-
Ummm, sorry I still don't get it :-) I'll have a look at the examples on your web site and see if that makes things clearer.
I really want to stick with Pascal because I like the language. I have found DesignerV1_55.lha on Aminet which is a GUI creator for HSPascal, but I can't find the compiler anywhere. Any ideas?
--
moto
-
Hmm, I also didn't get it so I feel tempted to ask :-)
say for example, I have a c program called square, which takes an int as input and returns the square. And I want to make a GUI for this program with feelin. One text input, one button, and a text area for output. User enters a number into the text input, and presses the button. Feelin reads the input, calls square with the parameter given to it, and writes the answer to the text area. It would be great if there was a tutorial which explains the event handling for this task, also explaining how to interface with the c code (or executable) from feelin.
-
Your "square" example is really easy to do. All you have to do is a GUI with a String object (for input) and a Text object (for output). You can limit String input characters with FA_String_Accept (use the special value FV_String_Decimal to limit characters to "0123456789"). Then set a notification upon the FA_String_Changed attribute (which is triggered when the user press FV_KEY_ENTER within the object). This notification calls a hook which computes the square value, create a string and set the FA_Text attribute of the Text object to display the result.
If you want, you can send me your current code and I'll make a tutorial.
-
Ok I think I understand the bit about calling C functions from within the XML. But where does the C code go? Is it a separate .c file, or is it embedded in the XML?
--
moto
-
I really want to stick with Pascal because I like the language. I have found DesignerV1_55.lha on Aminet which is a GUI creator for HSPascal, but I can't find the compiler anywhere. Any ideas?
HS Pascal was a commercial compiler from HighSoft. If you MUST use Pascal look on the Aminet for a utility called P2C (http://de4.aminet.net/dev/misc/p2c120.lha) (or just follow my link) for a utility that translates Pascal source into C source. It was designed for use with GCC but might also work with VBCC and others.
-
@motorollin: the "c" function goes into the "c" file. The UI defined in the XML document is loaded by a XMLObject (or XMLApplication) object, which generate objects from the XML source.
Please send me a piece of code (or at least explain what you want to do) so I can create a tutorial for you. It'll help more seeing actual code then read my words and trying to figure it out :-)