It is currently 24 Nov 2009, 22:24

Welcome
Welcome to the SDB Engine Forum!
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!


Forum lockedPost a reply Page 1 of 1   [ 8 posts ]
Author Message
 Post subject: SCUI Lib Alpha 0.1 Released!
PostPosted: 27 May 2008, 10:59 
Site Admin
User avatar

Joined: 22 Mar 2007, 22:50
Posts: 111
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


Attachments:
File comment: ScuiLib 0.1 Alpha (27.05.2008)
ScuiLib_0.1alpha.lha [121.59 KiB]
Downloaded 90 times


Last edited by Allanon on 28 May 2008, 22:30, edited 1 time in total.
Report this post
Top
 Profile  
 
 Post subject:
PostPosted: 27 May 2008, 20:28 

Joined: 27 May 2008, 19:38
Posts: 67
Location: Dresden / Germany
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. :-) The first, that comes to my mind is, how to get the value of a control e.g. how can I get the text, that is written in a text box?
Of course I will post bugs, if I encounter them!

Thanks a lot for your hard work (even tutorials, wow!!!)!

CU soon,
greetings
Micha


Report this post
Top
 Profile  
 
 Post subject:
PostPosted: 27 May 2008, 21:50 
Site Admin
User avatar

Joined: 22 Mar 2007, 22:50
Posts: 111
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)


Report this post
Top
 Profile  
 
 Post subject:
PostPosted: 28 May 2008, 08:09 

Joined: 27 May 2008, 19:38
Posts: 67
Location: Dresden / Germany
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


Report this post
Top
 Profile  
 
 Post subject:
PostPosted: 28 May 2008, 11:02 
Site Admin
User avatar

Joined: 22 Mar 2007, 22:50
Posts: 111
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.


Report this post
Top
 Profile  
 
 Post subject:
PostPosted: 29 May 2008, 14:39 

Joined: 27 May 2008, 19:38
Posts: 67
Location: Dresden / Germany
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 ... :-)

_________________
CD32 + SX1; AmiKit (WinUAE) + OS3.9


Report this post
Top
 Profile  
 
 Post subject:
PostPosted: 29 May 2008, 17:21 
Site Admin
User avatar

Joined: 22 Mar 2007, 22:50
Posts: 111
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 :D


EDIT:
If you need a complete example just ask :wink:


Report this post
Top
 Profile  
 
 Post subject:
PostPosted: 30 May 2008, 19:30 

Joined: 27 May 2008, 19:38
Posts: 67
Location: Dresden / Germany
Ok, I think I got it. :-) I will test/use it and see if I have problems. If I have problems, I will ask for help/source code. :-)

Thanks, mate!

_________________
CD32 + SX1; AmiKit (WinUAE) + OS3.9


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Forum lockedPost a reply Page 1 of 1   [ 8 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron