OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Any way to define new classes in StarBasic?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Apr 02, 2003 9:14 am    Post subject: Any way to define new classes in StarBasic? Reply with quote

Is there any way to define new classes with methods in StarBasic? I don't think so, or I can't find any.

Lack of such a capability limits the sophistication of code that can be written in StarBasic.

Sure there are better programming languages, but StarBasic is in all OOo platforms and works <i>now</i>. I can build and distribute OOo documents containing live code and be assured that they work on all OOo platforms.

If StarBasic has and won't get any capability to define new classes, the next best question I would ask is: Is there some UNO object I can instantiate that I can add arbitrary state information to? Perhaps some kind of hash, where I could say...
o = createInstance( "some uno class" )
o.set( "Fred", "Blue" )
o.set( "Bill", "Purple" )
o2 = createInstance( "some uno class" )
o.set( "John", o2 )
etc.
At least this capability would at least allow building data structures, even if you had to pass your main data structure around amongst many global functions.

I have working Java code that connects by UNO. (A maze generator that creates Draw documents.) Default configurations of OOo don't accept UNO connections. This has to be turned on by hand editing an xml config file. I have other code in StarBasic that is live within the document. I cannot create more sophisticated applications in StarBasic, such as my maze generator, because of lack of sophisticated features in StarBasic.

The next direction I am going is a stand alone Java program that directly generates Draw document files on disk in correct format. Now you don't need a copy of OOo running, and it wouldn't have needed to be configured to accept remote UNO connections.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group