| SDB Engine http://sdb.freeforums.org/ |
|
| SCUI Lib Alpha 0.1 Released! http://sdb.freeforums.org/scui-lib-alpha-0-1-released-t9.html |
Page 1 of 1 |
| Author: | Allanon [ 27 May 2008, 10:59 ] | ||
| Post subject: | SCUI Lib Alpha 0.1 Released! | ||
Here is the first public release of ScuiLib, it's an alpha release, remember that!! The Release_Notes.txt file: Application: ScuiLib 0.1 Alpha, 27.05.2008 Author: Fabio Falcucci aka Allanon Contact: hijoe@tin.it WebSite: http://sdb.freeforums.org (English/Italian Forum) http://allanon71.wordpress.com/ (Italian blog) Notes: Tested on WinUAE ------------------------------------------------------------------------ Requirements: at least Hollywood 3.1 (http://www.airsoftsoftwair.com/) ------------------------------------------------------------------------ ************************************************************************ *** INTRODUCTION *** ************************************************************************ ScuiLib is a library for Hollywood (3.1) that can be used to build nice interfaces in a simple manner. Remember that this is the first public release and it's an *alpha* version, this means that much work and testing is needed to make the library stable and without bug. Please report any bug in the forum so I can keep track of them and correct the code. Supported gadgets actually are: - BevelBox - Label - Button - Switch - Options - Scroller - ListView - StringBox - Tabs - FWin (FWin stands for FakeWindow) ************************************************************************ *** DOCUMENTATION *** ************************************************************************ The code is commented using the Robodoc formatting rules so you can extract documentation with this free tool if you want. (http://www.xs4all.nl/~rfsber/Robo/index.html). Note that not all functions are documented and that you can find italian comment trought the code (because I'm italian ^^), sorry for that. When in the docs you see the name IFO remember that it stands for "Interface Object". ************************************************************************ *** ALPHA 0.1 *** ************************************************************************ This distribution comes with 10 tutorials covering all the supported classes and a demo called <newdemo.hws> where you can see how you can work with <FWin> class. Remember that you can activate a Window *right-clicking* on it! There are two more files: - Default_Standard.hws Required by ScuiLib.hws - FilezLib.hws Required by ScuiLib.hws The first one is a file containing all settings and the default theme, in a future version it will be splitted in two files, one for the prefs and one for the default theme so you can load & save them individually. The second one is a library with some usefull functions used by ScuiLib to Load & Save tables. ************************************************************************ *** INSTALLATION *** ************************************************************************ Uncompress in a folder of your choice with: Code: shellprompt> lha x archivename destinationdrawer Open a shell and go where you have uncompressed your files, then run the tutorials typing, for example: Code: yourfolder> Hollywood Tutorial01_Basics.hws Have fun! ************************************************************************ *** KNOWN ISSUES *** ************************************************************************ - Slow rendering with Cycles, FWin opening and dragging. > This is because a missing function in Hollywood, maybe it will be added in a future release, but actually, to save the background, I've used a workaround, saving the bg to a file and reloading as a brush, so if you are using *slow* media device, like USB pen drives, you may notice this behaviour. - The <StringBox> handling code is ugly, I know ^_^, in a future release I will replace this code with a more efficient one. ************************************************************************ *** CONCLUSIONS *** ************************************************************************ Remember that this is an *alpha* release and much work is still needed to correct bugs and add features. I've many ideas but few time, please use the forum for suggestions and bug reporting. Please give me credits if you are using this library for your own applications. Good coding! Fabio Falcucci
|
|||
| Author: | Clyde [ 27 May 2008, 20:28 ] |
| Post subject: | |
Hi Fabio, this is Micha(el Jurisch) aka Clyde Radcliffe from the Hollywood mailinglist! Great to see that you have release the first public alpha! I hope to give it a try soon and then I will surely have a lot of question. Of course I will post bugs, if I encounter them! Thanks a lot for your hard work (even tutorials, wow!!!)! CU soon, greetings Micha |
|
| Author: | Allanon [ 27 May 2008, 21:50 ] |
| Post subject: | |
Hello Michael and welcome here! To get values from every object you have to use the command Code: Local temp_table = scui.Get(ifo_id) Where ifo_id can be the unique id returned by the function used to create the object or the name you have assigned to the object at creation time. After the above command temp_table will hold all available data for the specified object, most of them will have its main value in the field value Returning to your specific example, say that you have created a string box with the following: Code: scui.NewObject( #IFOCLASS_STRINGBOX, "myFirstStringBox", { x = 10, y = 335 }, { x = 600, y = 40 }, nil, { Values = { "Hello there!" }, Lines = 1, InputType = #GETKEY_ALL, MaxLen = 255 } ) you can retrieve your data with: Code: SBox_Content = scui.Get("myFirstStringBox") The string box value is in: Code: SBox_Content.Value
TRICK: To see what fields are returned by scui.Get() you can dump the table contents to the console with: helpers.DumpTable(table_to_dump) |
|
| Author: | Clyde [ 28 May 2008, 08:09 ] |
| Post subject: | |
Thanks for the quick reply, Fabio! That looks promising. It's great, how much work you have put in it - the trick you mention is cool. So, this also means, that there is no distinction between public and private members of a class (in Hollywood)? Do I see this right? Greetings Micha |
|
| Author: | Allanon [ 28 May 2008, 11:02 ] |
| Post subject: | |
As I've structured data, all is stored in a table and subtables so you can inspect data without restriction: briefly, no there is no distinction, all data is public. However when you use 'scui.Get()' to obtain data from an object, only usefull (for the user) data will be returned, this is valid for 'scui.Set()' too, only relevant tags will be processed, the other ones will be ignored. But you can still access directly internal data... I suggest to use only these two functions (Get & Set) to read and write data into objects. Things may changes and accessing directly can became incompatible with future releases, instead Get & Set are safe. |
|
| Author: | Clyde [ 29 May 2008, 14:39 ] |
| Post subject: | |
Ok, thanks for the reply. The get/set method is good and logical. I wonder, what the value of x is in here: Code: x = scui.NewObject() I thought, x would be the same like the reference name that can be found in the NewObject statement (e.g. ListView1). So I thought I could simple write Code: x.value to get the value. But x is no table so it doesn't work!? But what does it contain? The id? From other languages I am used to this style: Code: ListView myListview = new ListView();
String text = myListview.Text; But in Hollywood/SCUI that is completely different. That makes it a bit hard for me to read ... |
|
| Author: | Allanon [ 29 May 2008, 17:21 ] |
| Post subject: | |
In your example x contains the id of the object, the id is numerical and unique, you can use this id with Get & Set function to access the object. Get & Set can accept the object name too, a name that you can assign when you create the new object (the second parameter). What you are asking is to access directly the object and can be done with: Code: x_object = scui.IFO[x]
In this way you are accessing directly all class fields and it's more confusing because many fields are useless for the user because they are used internally to handle the classes, more, the field names are not necessary the same for every classes... If you want to be sure to have the right data in the right field name you should use Get, some fields are parsed and adjusted before they are returned with Get. Hope to have explained well what I mean EDIT: If you need a complete example just ask |
|
| Author: | Clyde [ 30 May 2008, 19:30 ] |
| Post subject: | |
Ok, I think I got it. Thanks, mate! |
|
| Page 1 of 1 | All times are UTC + 1 hour |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|