Orange Posted June 11, 2010 Share Posted June 11, 2010 (edited) OpenFrame is a fully OOP MTA framework. It allows you to make your scripts cleaner and easier. Inspired by GUIClasses, the original form of classes is easy to learn and use. Classes in openFrame Go check it yourself, extend it :F Download Downloads are available on Google Code - http://code.google.com/p/mta-openframe/downloads/list. Documentation is temporary unavailable, we're moving to other server Roadmap There's currently no roadmap, we're moving to other server Edited June 13, 2011 by Guest Link to comment
DEFCON1 Posted June 12, 2010 Share Posted June 12, 2010 Maybe a bit more info about how to use? Also, I noticed you use a lot addEventHandler, for example, in the function Button:Create, you create 3 event handlers for each button, is it really necessary? Link to comment
50p Posted June 12, 2010 Share Posted June 12, 2010 Maybe a bit more info about how to use? Also, I noticed you use a lot addEventHandler, for example, in the function Button:Create, you create 3 event handlers for each button, is it really necessary? Yes. It's supposed to use as many addEventHandlers as many events for GUI there are. Why? Because it makes it easier for scripters to add functions to the GUI events. For instance, if you want to add a function to "OnClick" event, you simply do, button:AddOnClick( functionName ) this will simply attach functionName to OnClick event. Isn't it simpler than addEventHandler( "onClientGUIClick", buttonGUI, functionName, false ) That's the whole purpose of libraries. EDIT: Piotr1, I made an XML Lib too. It makes reading/writing XML files easier too. If you need it just PM me and I'll send you the lib. If I remember correctly, it hasn't been finished yet but for simple read/write functionality it works fine. Link to comment
Orange Posted June 12, 2010 Author Share Posted June 12, 2010 I'm finishing the documentation now. Version 1.0 Alpha 1.1.2 will be fully commented with few bugfixes. @50p: If you can, send me it via PM, as I said, every contributions are appreciated EDIT: 1.0 Alpha 1.1.2 is now available Link to comment
50p Posted June 12, 2010 Share Posted June 12, 2010 OK, PM'ed. Example of usage: myXML = XML:Load( "file.xml" ); outputChatBox( myXML.Nodes[ 1 ]:Value( ) ); Link to comment
Orange Posted June 13, 2010 Author Share Posted June 13, 2010 openFrame 1.0 Alpha 1.1.3 released. Most important things added: GUI Classes and MySQL class documentated XML Class by 50p added Documentation updated, a lot of new pages 7 hours of work Link to comment
Orange Posted June 14, 2010 Author Share Posted June 14, 2010 New official site: http://openframe.co.cc Link to comment
Orange Posted June 24, 2010 Author Share Posted June 24, 2010 1.0 beta released! Check the google code page to download it CHANGELOG: Everything should work correctly now, fixed some typos Link to comment
50p Posted June 24, 2010 Share Posted June 24, 2010 You forgot to update the first post about XML classes. Link to comment
darkdreamingdan Posted June 24, 2010 Share Posted June 24, 2010 You may be interested in including textlib: https://forum.multitheftauto.com/viewtop ... 08&t=24262 I also have a dxDrawImage equivalent, imagelib which isnt officially released but is used in killmessages. Link to comment
Orange Posted June 27, 2010 Author Share Posted June 27, 2010 @Talidan: Thanks man. I'll use both of them in oF 1.0 Beta2. Also, I'll make a simple bugtracker which would make the roadmap more clear Link to comment
Orange Posted June 13, 2011 Author Share Posted June 13, 2011 1.0.1 released, lulz. I won't update anything in that package, check out the classes Link to comment
minutemail Posted June 15, 2011 Share Posted June 15, 2011 ITS GREAT! but please show off any FULL example of using mysql with this - i dont know how to use it! thank you! Link to comment
Orange Posted June 16, 2011 Author Share Posted June 16, 2011 I lost the wiki :F Anyway, here's simple code: SQL = MySQL:Connect("host", "user", "pass", "db", true) -- the true means that if the connection to the database is lost, the script tries to reconnect local Query = self.sql:Query("SELECT * FROM users") -- executes a simple query outputChatBox(Query:numRows()) -- prints the number of registered users on the chatbox Check the part "MySQL.return" on http://docs.openframe.co.cc/files/serve ... s-lua.html in order to see which other functions can you use with the Query variable. btw, the docs aren't updated, there's also a function called :itTable, which you can use with ipairs ^^ If you want to use the query generator, check README.txt in ActiveRecord class ( viewtopic.php?f=108&t=33727 ) Link to comment
minutemail Posted June 16, 2011 Share Posted June 16, 2011 thank you but how to include the openframe in my resource? i dont know it now Link to comment
Orange Posted June 17, 2011 Author Share Posted June 17, 2011 You've failed. You could see the meta.xml file inside the resource: <script src="openframe/shared/utils.lua" type="client" /> <script src="openframe/shared/utils.lua" type="server" /> <script src="openframe/client/gui/GUICollection.lua" type="client" /> <script src="openframe/client/gui/button_class.lua" type="client" /> <script src="openframe/client/gui/checkbox_class.lua" type="client" /> <script src="openframe/client/gui/gridlist_class.lua" type="client" /> <script src="openframe/client/gui/label_class.lua" type="client" /> <script src="openframe/client/gui/memo_class.lua" type="client" /> <script src="openframe/client/gui/progressbar_class.lua" type="client" /> <script src="openframe/client/gui/radiobutton_class.lua" type="client" /> <script src="openframe/client/gui/scrollbar_class.lua" type="client" /> <script src="openframe/client/gui/staticimage_class.lua" type="client" /> <script src="openframe/client/gui/textbox_class.lua" type="client" /> <script src="openframe/client/gui/tabpanel_class.lua" type="client" /> <script src="openframe/client/gui/tab_class.lua" type="client" /> <script src="openframe/client/gui/window_class.lua" type="client" /> <script src="openframe/client/gui/sharedfuncs_class.lua" type="client" /> <script src="openframe/client/gui/wndtab_class.lua" type="client" /> <script src="openframe/shared/class_class.lua" type="server" /> <script src="openframe/shared/debug_class.lua" type="server" /> <script src="openframe/shared/store_class.lua" type="server" /> <script src="openframe/shared/event_class.lua" type="server" /> <script src="openframe/shared/class_class.lua" type="client" /> <script src="openframe/shared/debug_class.lua" type="client" /> <script src="openframe/shared/store_class.lua" type="client" /> <script src="openframe/shared/event_class.lua" type="client" /> <script src="openframe/shared/timer_class.lua" type="client" /> <script src="openframe/shared/timer_class.lua" type="server" /> <script src="openframe/shared/command_class.lua" type="client" /> <script src="openframe/shared/command_class.lua" type="server" /> <script src="openframe/shared/xml/xml.lua" type="client" /> <script src="openframe/shared/xml/xml_node.lua" type="server" /> <script src="openframe/server/mysql_class.lua" type="server" /> <script src="openframe/server/textlib_s.lua" type="server" /> <!-- <script src="openframe/server/ar_class.lua" type="server" /> --> <script src="openframe/client/client_anim.lua" type="client" /> <script src="openframe/client/dx/textlib.lua" type="client" /> <script src="openframe/client/dx/textlib_anim.lua" type="client" /> ^add it after tag, before other <script src="openframe/shared/utils.lua" type="server" /> <script src="openframe/shared/class_class.lua" type="client" /> <script src="openframe/shared/event_class.lua" type="server" /> <script src="openframe/server/mysql_class.lua" type="server" /> ^I'm not sure that's all I had a script which mixed everything into 2 files, but I accidentaly lost it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now