Objective-Basic Wiki

Full featured object oriented modern BASIC programming language for Mac only

  • Full featured IDE
  • Modern BASIC syntax
  • State of the art interface designer
  • Get the power of Objective-C with C and Carbon or Cocoa
  • Extend native Objective-C classes using inheritance
  • Create small and fast native executables without runtime dependencies
  • Create universal binaries
  • Complete documentation
  • No vendor lock when using Objective-Basic, you always have got your Objective-Basic program in Objective-C as well

News

Release of Objective-Basic 1.2 (25 January 2007)

System Requirements

Objective-Basic for Mac requires Mac OS X (10.5 or higher).

Now Universal!

FREE for non-commercial developers.

FREE Download

IDE + Compiler + Documentation

Easy and familiar installation with Mac Installer. Succesfully tested on Mac OS X Leopard.

Please note: Objective-Basic is still in beta, this basically means it’s not 100% complete, and I really want to get your feedback on it. If there is anything you like, don’t like, or don’t understand, please let me know.

FREE for non-commercial applications

FREE and without support for non-commercial developers at home. You get the product for free and you must release products for FREE under the license of GPL v2 as published by the Free Software Foundation. Please include a “Made with Objective-Basic” statement in the about box.

If you would like to develop a commercial application or using Objective-Basic working at an organisation (e.g. university, school, public service), you must buy a valid license. Please see the order page for details.

Community

Please find a list of forums about Objective-Basic.

Like it? Love it? Tell a friend!

Help us spread the word about Objective-Basic.

When you share Objective-Basic Software, you will make your friends happy and give us a hand in getting the word out around the world.

Objective-Basic needs your help!

And the best way to help Objective-Basic (and to help Mac OS X to become an alternative to Windows) is to buy and use the Objective-Basic Professional Edition. With your help and financial support, it will be possible to continue the development of Objective-Basic for many years.

You can help Mac OS X, when you help Objective-Basic, because Objective-Basic is an important piece of the puzzle showing the needed software for leaving Windows far behind. With your support it will be possible to show the world that BASIC development software do not have to be limited and difficult.

It is up to you!

Learn more

Objective-Basic enables you develop full features modern GUI applications with well known BASIC syntax in a modern fashion. It comes with truly Objective-C object orientation and backward support for Objective-C and C. Objective-Basic combines the expressive power of object-oriented languages like Objective-C with the familiarity and ease of use of BASIC.

You can develop anything on Mac with the newest technologies available on Mac and you can create very fast and small programs with it.

Objective-Basic’s text editor is written in Cocoa.

It is designed to be easy and intuitive to start off.

Some of its features are support for syntax colouring for many different languages, functions list, support for text encodings, snippets, a toolbar, a status bar, split window, multi-document find and replace with regular expressions, full screen editing and running commands from within the IDE.

Objective-Basic’s GUI editor is Interface Builder (developed by Apple).

Providing you with the newest Aqua user interface features.

You have got the same power as Objective-C developers. Be no more limited to your development environment. Be open and free to use all features of Mac OS X.

Technology you may use within Objective-Basic are Cocoa (any frameworks may be used), Carbon, MySQL, PostgreSQL, OpenGL, GNU C Library, SQLite and much more.

In fact, any other Objective-C/C/C++ library or tool is possible.

More than 1000 of commands ready to use like String Management, Internationalization, Searching and Sorting, Regular Expression Matching, Low-Level Input/Output, Streams, File System Interface, Pipes and FIFOs, Databases, TCP/IP, Internet, Sockets, Low-Level Terminal Interface, Mathematics, Low-Level Arithmetic Functions, Date and Time, Signal Handling, Process Startup and Termination, Job Control Child Processes, Users and Groups, and much more.

There is direct support for Cocoa with help files for + Foundation + Applikation Kit

Additionally, you can access some Cocoa classes through the Objective-Basic Framework.

Cocoa is an object-oriented application environment designed specifically for developing Mac OS X-only native applications quickly and efficiently. The Cocoa frameworks include a complete set of classes, and for developers starting new Mac OS X-only projects, Cocoa provides the fastest way to full-featured, extensible, and maintainable applications. You can bring applications from UNIX and Windows to Mac OS X quickly by using Cocoa to build state-of-the-art Aqua user interfaces while retaining most existing core code.

Apple recommends that all new applications written for Mac OS X use Cocoa.

Cocoa is a collection of software objects that implement almost all features common to Mac OS X applications. Programmers extend the Cocoa objects to provide application-specific features. The Cocoa objects are reused in every Cocoa application so that programmers can concentrate on adding unique value with each line of code rather than constantly reimplementing common features or struggling to access operating system services. Significant applications can be built with very little code.

Cocoa is distinguished from other object-oriented development environments in several ways: Cocoa is mature, consistent, and broad. Cocoa is extraordinarily extensible and flexible and dynamic.

Because you use Cocoa and the default compiler of Apple (gcc) through Objective-Basic the number of possible bugs, when you create your Mac application, is strongly reduzed nearly to zero. In fact, Objective-Basic is a mature tool, ready for production!

Description

Objective-Basic enables you develop full features modern GUI applications with well known BASIC syntax in a modern fashion. It comes with truly Objective-C object orientation and backward support for Objective-C and C. Objective-Basic combines the expressive power of object-oriented languages like Objective-C with the familiarity and ease of use of BASIC.

The Objective-Basic Manual: this book contains detailed information about Objective-Basic. So if you are interested in a line-by-line coverage please refer to The Objective-Basic Manual.

Thin runtime

Objective-Basic is a very pragmatic language. Its implementation use a thin runtime written in C that adds little to the size of the application. In contrast, most OO systems at the time that it was created used large VM runtimes that took over the entire system. Programs written in Objective- Basic tend to be not much larger than the size of their code and that of the libraries (which generally don’t need to be included in the software distribution.

Likewise, the language is implemented on top of GCC. This allowed Objective-Basic to leverage the huge existing collection of C code, libraries, tools, and mindshare. Existing C libraries - even in object code libraries - can be wrapped in Objective-Basic wrappers to provide an OO-style interface.

Since Objective-Basic is a strict superset of Objective-C, it does not treat C primitive types as first-class objects either.

Feature Overview

  • Deploy native applications for Mac OS X
  • OOP RAD features deliver high productivity
  • Much cheaper than other BASIC’s. It is FREE for non-commercial development.
  • “backward” support for Objective-C and C and “forward” support for inheritance and other OOP features
  • Familiar development process and environment
  • Similar syntax as VB, Java and Objective-C
  • Easy to learn: language reference and many examples
  • Low price for Professional Edition
  • Familiar language features: OOP, single inheritance, exceptions, etc.
  • Drag & drop GUI development with Interface Builder (the best GUI editor on Mac)
  • Native Mac OS X widgets (third party controls not provided by Apple can be used as well)
  • Familiar editing features: easy and fast browsing of your source code
  • Familiar editing features II: Auto-Completion of builtin-functions and datatypes
  • A Lots of Documentation!

Objective-Basic comes with extensive documentation. It ships with lots of small and some medium-sized example programs that teach you how to implement various tasks with Objective-Basic. Most of them will show how to use a certain class, others aim at programming techniques and basics, and some of them simply want to show you what is possible. Note that most of the examples assume that you have some experience with Objective-Basic and Object-oriented programming and therefore are not commented extensively. If you are interested in a line-by-line coverage please refer to the The Objective-Basic Manual.

  • Open File Format

Objective-Basic’s files *.b, *.i, *.m, *.h are text based non-binary files, which means you can easily access and edit them. A project is a directory containing all files of that project. The project directory is logical structured and easy to use. You can easily add and remove files with Apple’s Finder like Images or other resources.

  • Visual Design Tools

Use Objective-Basic’s design tool to create instantly your Aqua interfaces in a few minutes (it is Interface Builder, the best GUI editor on Mac, provided by Apple). It is very powerful and easy to use.

Feature Detail

  • is object oriented with objects and classes, single inheritance and polymorphism and private, public, protected scope of objects’ elements
  • named arguments [mySub(param1 := 23, param2 := 100)]
  • label and goto
  • modern error management through exception handling

Objective-Basic is not only one programming language but also three. Through one of the following command you can switch Objective-Basic into one mode.

If you want to use Objective-Basic <b ... b> or just leave out it

If you want to use Objective-C code use <c ... c> or [ ... ] e.g. [NSString init]

For pure C code use: <c ... c> or @ before every commad e.g. @printf(”hello”)

It is possible to use all three modes in one of your program, e.g. one source file uses one mode and the source other file of your program use another mode. You can mix the languages in your file as well. Having Objective-Basic, Objective-C and C code in one source file!

The @ is needed in front of constanst, variables or function calls, if they are declared in a library written in C/Objective-C or in source parts, which are declared as C/Objective-C code. If you use Cocoa classes, functions or methods you do not need to write it in front of calling Cocoa methods.

If you declare variables etc in Objective-Basic code, you do not need to use @ as well.

Of course like other programming languages, Objective-Basic comes with commands for control flow, conversion/casts, error handling, events and library functions like for gui, input or output, maths and so on. See the examples for more.

But besides this you should be familiar with the following main parts:

  • Class
  • Sub / Function / Method
  • Variable / Constant
  • Type
  • Enumeration

If you start working on your first Objective-Basic program keep in mind that is very similar to Objective-C and Java. You have classes and interface elements, which work together. Events/actions in your interface are triggered by the user and you can react to them within your program. That’s it.

Annotations


      Variable Scope
          o class
          o local
            class static method
            class instance method

      Sub / Function / Method
          o arguments by reference or by value
          o recursive calls are possible
          o non-primitive local var
          o exception handling

      Scope
          o class static
          o class instance
          o local

      Class
          o instance methods (works on variables of an object of a class)
          o static methods (works without any relation to an object)
          o instance variables (private, public, protected), variables of an object of a class
          o static variables (works without any relation to an object)
          o variables (private, public)
          o constants (private, public)
          o types / enum can be private or public

In other words Objective-Basic is a full featured Object oriented modern BASIC language particularly designed for Mac OS X.

Code editing

  • Auto-completion: Helps you write code faster with fewer errors by offering suggestions on valid syntax.
  • Syntax highlighting: Use different colors to distinguish between variables, keywords, code and comments.
  • Window creating

Drag and drop / onto a window to build your user interface.

  • Native support of controls of all Mac OS X Aqua interface elements including buttons, labels, lists, and much more.

Language features

  • Modern and object-oriented version of BASIC: Supports polymorphism and inheritance
  • Advanced new language: The Objective-basic language is either strongly or loosely typed depending on using Objective-C features and has try/catch exception handling
  • Memory management: Works automatically autoreleasepool or Cocoa’s retain/release mechanism
  • Royalty-free

You are free to sell the applications you create with Objective-Basic or deploy them for free without ever paying a fee, if you are a license holder

Time is money as well

When creating commercial software, time is money. The longer it takes you to create an application, the longer it takes to get to market and turn a profit. Objective-Basic is a rapid application development environment that enables you to write, test and deploy software faster.

Professional Strength

Do not let the “BASIC” in Objective-Basic fool you! It is not a toy. It is a fully object-oriented language that supports exceptions, polymorphism and many other syntax features you can expect from a modern programming language.

Native look and feel

Objective-Basic creates a proper user interface using native Aqua controls. It helps you to create the best user interface with a top of the art GUI designer: Interface Builder developed by Apple.

Teaching and Learning

When you teach computer programming, you teach logical problem-solving skills students can apply wherever life takes them in the future. Using Objective-Basic, students learn programming by creating real programs like games.

Students simply use drag and drop to create the software interface, then add code snippets and see the results of their work, at once. As well, Objective-Basic’s powerful features like auto-completion and extensive documentation make learning easy and fun, right from the beginning.

Prepare for the Future

Because Objective-Basic is an object-oriented language that uses a common syntax, your students’ Objective-Basic skills can easily be applied to other languages like Objective-C, Java, VB.NET and C++ that they may find in the future.

Learn Step By Step

Objective-Basic is designed from the ground up to make it easy for anyone to learn to program. With Objective-Basic, simply drag and drop a button onto a window and run your first program in no time. As you need to do more, you learn more. It is a nice approach designed specifically to help you learn as you go.

The first step in programming with Objective-Basic is to design the user interface normally. With Objective-Basic, this is as simple as point-and-click. As you work on your interface, you make your program unique.

Learn Modern Programming

Learning Objective-Basic means you are learning modern, object-oriented programming. Once you learn Objective-Basic, learning other languages like Objective-C, VB6, Java or C++ is much easier. Objective-Basic can take you from learning the basics of programming to building high-quality software for you.

Lots of Help Included

Objective-Basic comes with a complete Programming manual as well as hundreds of examples to help you.

Make great use of your time

Objective-Basic is the right environment to use for fun programming projects. Programming as a hobby has never been easier or more fun. Objective-Basic is a visual development environment that makes it easy to make entertaining and useful software. Objective-Basic has tips and other features that help you along your way. Help is just a click a way. Why do not you create your own games? Create graphical games, strategy games, even action games. All you need is the right idea and Objective-Basic to get started.

Order

Ordering is simple

Just fill out the form below, after that you get the license key and more.

What do I get when I order Objective-Basic?

You get the right to use it after the trial period has expired for commercial development and to create non-commercial applications with Objective-Basic at all, and of course much more. Please read the following lines.

  • Professional email-Support
  • Access to further future of Objective-Basic Development
  • Direct communication to the Objective-Basic developers
  • Royalty free license for your Objective-Basic programs

If you have any questions: sales@objective-basic.com

Or via bank transfer are payment methods for customers living in European Union



PayPal lets you send money to anyone with email. PayPal is free for consumers and works seamlessly with your existing credit card and checking account. PayPal is an ebay company.

Your order will be shipped after receiving your money.

If you need other license pricing, e.g. licenses for many users, please contact us. If you order the documentation package with Objective-Basic CD, you will receive the documentation in printed form. The documentation also includes useful forum discussions.

There are some ideas to get money to survive. Some have “Donate” buttons on some of the sites, but they are mostly skipped over by the users. If even 1% of the users actually donated, it would help considerably towards server, power, and bandwidth costs.

One trend I’ve noticed as more and more Open Source/Free Software projects flow into the mainstream public, is that the general public assumes that if they can download it for free, everything associated with that project must be free, including providing hosting, updates, mailing lists, and documentation and of course software development, which is the big part. They don’t seem to realize that time costs money. Servers cost money. Living costs money.

I believe I have worked hard over the last years on Objective-Basic and it is not just another text editor. It’s something big, really big. So please do not forget if anything, Free Software is anything but “free” in terms of cost, because we (the developers) bear the burden of costs, so the users can have something useful to use, for “Free”. I tried and I tried very hard to get some help from other people to get things started, so though there have been about 100 email contacts from people offering help, but in the end it happend that I had to do all on my own. Most of them just disappeared after asking for comments or assigning tasks without notice or were not able or willing to do special tasks. So I changed my mind and I hope you appreciate my way of doing good software for Mac OS X to bring it on top, especially in the Desktop market.

Best Regards, Bernd Noetscher

That’s why Objective-Basic will cost money. But how much is it?

69.95 Euro (roughly $99 USD) - if would like the license key + documentation in html format

You can order now on the Objective-Basic website.

The Objective-Basic License

Afer receiving the license, you have the right to update to the next versions of Objective-Basic within a year after obtaining it without any costs.

FREE for non-commercial developers.

FREE and without support for non commercial developers. You get the product for free and you must release products for FREE under the license of GPL v2 as published by the Free Software Foundation. And please include a “Made with Objective-Basic” statement in the about box.

If you would like to develop a commercial application or using Objective-Basic working at an organisation (e.g. university, school, public service), you must buy a valid license. Please see contact us, if you need more information.

The Objective-Basic License gives you the right to update to the next versions of Objective-Basic within a year after obtaining it without any costs. Update for one license for 12 months costs 24.95 Euro (roughly USD $35).

Screenshots

Some screenshots of V1.3 BETA.

Examples

Some examples of real working Objective-Basic applications.

Migrating from Other BASIC's

Objective-Basic provide you with a familiar syntax of BASIC. Additionally, many GUI components are familiar. And it is possible to develop GUI applications with BASIC syntax in a modern fashion. So it comes with Objective-C-like object orientation and backward support for Objective-C and C. Objective-Basic combines the expressive power of object-oriented languages like Objective-C or C++ with the familiarity and ease of use of BASIC.

Why Objective -Basic succeeds Traditionally, BASIC languages have suffered from the attitude that they are slow and interpreted. But with Objective-Basic you have full access to all existing Objective-C, C, Carbon or Cocoa functionallity. Even it is compiled without runtime dependencies. So your programs are fast and very small.

Why is Objective-Basic a BASIC language alternative compiler for Mac OS X? Objective-Basic is extremely well built, is a powerfull programming language and has a nice IDE. Additional, Objective-Basic can compile Mac OS X applications combined with Objective-C and C code. Objective-Basic language includes a visual designer (Interface Builder) to build GUI with all the major elements such as windows, menu and data aware controls, such as buttons, labels and frames, textboxes, radio buttons...

The only true official alternative: The project started in 2000 as an open source project... Objective-Basic is a professional development tool, cause this language offers all the elements to design and create professional products. Objective-Basic gives a single, easy-to-use API for writing GUI applications and the application will adopt the look and feel appropriate to native Mac OS X (in fact, you can use Cocoa natively). The language structure, the statements and functions are really simple to understand and the documentation is well written and complete. It comes with a very well done printable manual with more than 140 pages which describe in detail the great number of commands, statements and functions.

A powerful and fully featured Basic-like language: It is completely object-oriented and binary compiled. The syntax is very similar to Java and other BASIC’s. It is a fully object-oriented languages which uses inheritance and polymorphism. The IDE offers syntax highlighting of the source code, code completion and much more. The main characteristic of Objective-Basic is that it has been created to allow developers with BASIC experience to start programming for Mac OS X without having to learn deeply a new language.

Objective-Basic is a high level professional Basic for Mac OS X and its very good BASIC language is constantly improved and updated.

Porting BASIC Applications to Mac OS X

See a comparision of REALBasic and Objective-Basic, the following short paragraphs show you where they are different in ways that is related to porting your project.

Objective-Basic produces fast programs as Objective-C or C does. In fact, it uses the same compiler as Objective-C. When using Objective-Basic you can use any existing Cocoa, Carbon, or C/C++, without difficulties.

Porting means learning and using new keywords and new ideas in general. Actually, why should you switch to Objective-Basic? After learning a new language (Objective-Basic), significantly changing your source code base would be involved, but it is worth it! Cocoa is a great development environment. When you use Objective-Basic you automatically use Cocoa the full featured modern framework of Mac OS X.

Do switch to Objective-Basic ! It gives you full Mac OS X support, no huge runtime, minimal system requirements.

At least, you should try Objective-Basic. You might find Objective-Basic right for you and a clear path to the future.

Who are we?

People around the world join Objective-Basic (ObjB) - inspired by the idea to make software available for everybody: a programming language that is easy to use, and a development platform that is stable, reliable and available at a low price or for FREE for non-commercial applications.

We communicate by different means, most of them on the Internet. The following selection enables you to stay up-to-date, extend and explore your Objective-Basic experience, find new friends, and have fun in general.

Technology used

The core programming language is written in pure C++ and is based on KBasic Software Atelier (www.kbasic.com). The IDE is based on Cocoa and pure Objective-C.

Show your support

Where’s the fun using Objective-Basic if others don’t know? Buy a Objective-Basic Professional License today, and support us!

Join us!

The Objective-Basic community rests on dedicated volunteers to further improve our programming language and development platform in a number of different ways. Whatever your skills, there are lots of places to start contributing.

Manuals

  • Manuals about Objective-Basic and related information.
  • Your information base for the development of your Objective-Basic applications.
  • The following information enables you to easily start with Objective-Basic.
  • Objective-Basic IDE
  • Cocoa Frameworks
  • Few words about Objective-Basic
  • Books about Cocoa Programming

Resources

C programming language (Wikipedia) Objective-C programming language (Wikipedia)

Tutorials

Cocoa

What is Cocoa? Cocoa is acutally the frameworks of NeXTSTEP (OpenStep), but was renamed later. Normally, writing pure Cocoa applications is done using Objective-C, which is an extension to the C programming language making it object-oriented. You will love Cocoa, but maybe not at once. The tools for Cocoa development come as part of the Mac OS X Developer Tools, and you get them almost for free with Mac OS X. The tools are Interface Builder (IB), XCode the project manager with the GNU C compiler (gcc) compiling Objective-C source codes and of course Objective-Basic, the Cocoa BASIC compiler.

The Cocoa frameworks are written in Objective-C.

IB is a GUI builder, allwong you to lay out windows and add controls to those windows. But also allowing to change objects like buttons.

Cocoa coding is done using object-oriented concepts.

A framework is a collection of classes that are uused together. There are part of a the same compiled library read for use of your application. Frameworks are functionally similar to shared libraries, a compiled object that can be dynamically loaded at runtime. It is actually a directory containing all need resource files as well. The directory has the extension .framework. The built-in frameworks on Mac are located in /System/Library/Frameworks. All Cocoa applications use two of these frameworks: AppKit and Foundation.

Foundations forms the basis for all Cocoa application development like string, date, list and other data types. AppKit contains all features related to the user interface like buttons and windows.

There some other frameworks around like WebKit for HTML rendering. You must have installed the developer tools of Apple. Ther are located in /Developer/Applications/.

ObjectAlloc is another tool, which is very useful, provided by Apple as a part of the Developer Tools installation, and can be found in the /Developer/Applications/ directory.

This application controls the execution of your applications, and helps you to track down memory leacks related to retain and release. Each class is associated with three numbers. They are the

  • current number of instances of a class
  • the peak number of instances of the class (simultaneously exist in memory)
  • total number of objects of that class

All classes that come with Cocoa have names with the “NS” prefix. Unlike classes you create, which will not start with “NS”.

NSObject is the root of the entire Cocoa class hierarchy. Some important methods you of it you already know: release, retain, alloc and init + dealloc

init is a special methods, because, there might be many init methods of a class, which is called after alloc is called to create an object and set the variables of the object properly. Normally, you would use the builtin functions to create a NSImage or other Cocoa objects rather than calling it directly with alloc and init. You should notice about retain and release and understand how they work togheter. dealloc is called whenever the object is actually freed (after the reference counter got zero).

Nib files are collections of objects that have been saved to disk. when the applications starts those objects are brought back to life before the application handles any events. There is a special method, which is called automatically, after creating those objects: awakeFromNib

There are two ways to develop Cocoa applications with Objective-Basic. First one, is the difficult approach by directly use the Cocoa functions as you would be an Objective-C developer. You are responsible for creating the right structure for your files and you must know many Cocoa classes in detail. The second and much more easier way to build Cocoa apps is to use the Objective-Basic Framework enabling you write Cocoa applications with a few amount of time as it provides you with a set of files and structure.

Memory management in Cocoa. Cocoa objects are automatically managed by an autopool release manager. It works with reference counting, which means every allocated object has a counter as integer, which shows how many pointer points to it. If thi s counter becomes zero, the object might be released and freed. There are special methods for changing this reference counter. You can increment this counter by using Retain and a decrementation is done using release. When you use alloc for creating an object the reference counter is set to 1. It is nearly similar to the garbage collection approach of Java, but this time you are more responsible for releasing objects, because if you release an object too much, your program will crash and if you retain an object too much on the other side, your object will not be freed and stay in memory and waste RAM.

It is possible to use methods, which are not defined in a Cocoa class or user defined class, because the Objective-C runtime on which Objective-Basic depends too allows this. This is actually a feature and very useful in some places. If the Cocoa class or any class does not have such a method a runtime error will occur and the program will stop the execution.

In addition to manual reference counting, you may choose to make use of autorelease pools. There is a method autorelease, which adds the object to the current autorelease pool, so it will take care of releasing this object. When the autorelease pool is itself released, it use the release method of the objects to decrement the reference counter of them. If you use the default autorelease pool (which you will propably use, when you do not create your own pool), all objects are freed by ending your program.

A String in Cocoa is an object, which must be alloced and released. If you use the String of the Objective-Basic Framework all strings are automatically managed as autorelease, so you do not need to worry about releasing. Strings in Cocoa are based on Unicode characters.

An Array of the Objective-Basic Framework is a list of pointers to other objects. You cannot put a nil in an Array. For nil you could NSNullValue. When an pointer to an object is added to an Array, its reference counter is incremented by calling retain. When it is removed from the array, its reference counter is decremented, by calling release. If you have created the objects (which means actually got one time retain) before inserting into the Array, you are responsible to call release for those objects.

Use the builtin function of ObjB MsgBox to print information on screen or InputBox to ask the user for a value.

Objective-Basic, often referred to as ObjB, is an, object oriented programming language. Today it is used on Mac OS X, and is one of the primary language used for Cocoa application. It translates Objective-Basic source codes into optimized Objective-C code. Its syntax is based on well-known BASIC syntax used in VB6 and others.

  • Classes and Objects

The added syntax is for built-in support of object-oriented programming.

An object called obj whose class has a method doSomething implemented is said to respond to the command doSomething. If we wish to send a doSomething command to obj, we write

obj.doSomething();

Be aware that ObjB supports two different approaches of programming. One is the Objective-C appproach by dynamic typing at runtime. This mechanism allows commands to be sent to an object even if the object is not able to respond to them. This differs from statically typed languages such as C++ and Java in which all method calls to objects must be predefined. See the dynamic typing section below. This is not true if you wrote your own class in Objective-Basic. If so Objective-Basic is strongly typed for user defined methods. But Cocoa methods are loosely typed.

A method (function or sub) in Objective-Basic follows this general form:

Function do_something(i As Integer) As Integer
  Return mysquare_root(i)
End Function
  • Inheritance

Objective-Basic permits a class to wholly replace another class within a program, but only single inheritance is supported by the Objective-C runtime environment, which is truly helpful enough.

  • Import

In the C language, the #include pre-compile directive allows for the insertion of entire files before any compilation actually begins. Objective-Basic adds the Import directive, which does the same thing, except that it knows not to insert a file that has already been inserted.

  • Thin runtime

Objective-Basic is a very pragmatic language. Its implementation (the Objective-C runtime) use a thin runtime written in C that adds little to the size of the application. In contrast, most OO systems at the time that it was created used large VM runtimes that took over the entire system. Programs written in Objective-Basic tend to be not much larger than the size of their code and that of the libraries (which generally don’t need to be included in the software distribution).

Likewise, the language is implemented on top of GCC. This allowed Objective-Basic to leverage the huge existing collection of C code, libraries, tools, and mindshare. Existing C/C++ or Objective-C libraries can be used with Objective-Basic code to provide an OO-style interface.

Since Objective-Basic is a strict superset of Objective-C, it does not treat C primitive types as first-class objects either. Unlike C++, Objective-Basic does not support operator overloading. Also unlike C++, Objective-Basic allows an object only to directly inherit from one class (forbidding multiple inheritance).

How to debug your application? At the time of writing there is no builtin debugger for Objective-Basic code, but you could use the debugger of Objective-C to debug the generated Objective-C code. Anyway, I recommend you to use MsgBox at any place in code, which you would like to examine or displaying values on screen, or to find out where your program might crash.

How to name the setter and getter methods of my classes? You ought to name your methods like this, because if you would like to use Key-Value Coding of Cocoa:

NAME() As RETURNVALUE setNAME(As RETURNVALUE)

Dim meter As Integer Function meter() As Integer Sub SetMeter(m As Integer)

It is more than just a convention, it is just what the Cocoa classes expect.

Cocoa

The Cocoa frameworks include a complete set of classes.

http://developer.apple.com/cocoa/

Main Frameworks and important are

Application Kit Framework Reference(HTML) (PDF)

    Describes the Cocoa Objective-C API for the Application Kit framework.
  *
    Foundation Framework Reference (HTML) (PDF)
    Describes the Cocoa Objective-C API for the Foundation framework.

Cocoa Topics

Cocoa Frameworks lists reference documents for the frameworks located in the System/Library/Frameworks folder that are most relevant to Cocoa developers. Click an HTML link below to find reference material for a particular framework.

Getting Started

A guided introduction and learning path for developers new to Cocoa.




Fundamentals

Essential information for developers using Objective-C.




Frameworks

Objective-C API references organized by framework.

Accessibility

Object-oriented interfaces that support assistive technology applications.




Apple Applications

Facilities in Cocoa for interacting with and extending Apple applications.




AppleScript

Object-oriented API for creating scriptable applications.

Audio

Object-oriented APIs for creating, processing, and playing sound content.




Data Management

Object-oriented interfaces for representing and manipulating data.




Design Guidelines

Policies and design patterns for creating Cocoa programs.

Events & Other Input

Cocoa facilities for handling messages sent to applications by the Mac OS.




File Management

Object-oriented interfaces for gaining access to files and folders on storage devices.




Games

Object-oriented APIs for developing full-featured games for Mac OS X.

Graphics & Imaging

Object-oriented APIs for creating graphics content in Cocoa applications.




Interapplication Communication

Facilities for data sharing and communication between Cocoa programs.




Internet & Web

Object-oriented APIs for developing web content and Internet and web applications.

Java

A widely known programming language used for learning Cocoa development.




Networking

Objective-C APIs that support networking features in Cocoa applications.




Objective-C Language

A programming language designed for sophisticated object-oriented programming.

Performance

Resources for measuring, evaluating, and improving Cocoa code performance.




Porting

Tools and programming interfaces for moving code to the Cocoa environment.




Printing

Objective-C APIs for imaging content to a PDF document or a printing device.

Process Management

Facilities that help Cocoa programs manage their own scheduling and execution.




QuickTime

Classes for creating and playing multimedia in Cocoa applications.




Resource Management

Support for handling system and program resources in Cocoa applications.

Runtime Architecture

Conventions and services that prepare code in Cocoa projects for execution.




Security

Authentication, authorization, and cryptographic services for Cocoa applications.




Syncing

Object-oriented APIs for syncing a Cocoa application’s data with external devices.

Text & Fonts

Object-oriented APIs for working with strings and fonts, and rendering glyphs.




Tools

A suite of tools for building Cocoa applications, frameworks, and more.



User Experience

Object-oriented APIs for creating the look and feel of Cocoa applications.

CoreData

XCode is used to design the coredata objects and open and save related files. Be aware of syntax errors in generated Objective-C code.

Interface Builder

PackageMaker

What is PackageMaker? PackageMaker is the installing solution provided by Apple with its developer tools. PackageMaker is installed with the Developer Tools. So if you don’t have installed the Developer Tools, you won’t find it.

Read more at http://s.sudre.free.fr/Stuff/PackageMaker_Howto.html

Application Bundles

(APP directories)

On Mac OS X, a bundle is a directory that allows related resources such as software code to be grouped together.

Application bundles are often presented to users as a single file known as a “package”. This file is really a directory ending in a .app extension. Control-clicking (or right-clicking) on the package allows a user to open up the bundle and see the contents. In an application, the first directory in the bundle is usually Contents; within contents there is usually another directory with the executable code (called MacOS for Macs), which contains the application’s executable code, and a directory called Resources, which contains the resources of the application.

Among other things like images, the Resources folder contains localized versions of the application’s nib files.

http://en.wikipedia.org/wiki/Bundle_%28NEXTSTEP%29#Application_Bundles

Apple Icon Image format

(ICNS files)

The Apple Icon Image format is the icon format used in Mac OS X. It supports icons of 16×16 upto 512×512 pixels, with both 1- and 8-bit alpha channels and multiple image states (example: open and closed folders).

Icon Composer is an icon editor that is part of the Apple Developer Tools. It does not have any editing features other than composing Apple Icon Image files. External editors must do all the image manipulation, then the results may be imported into the converter to create the finished icon.

http://en.wikipedia.org/wiki/Icns

Interface Builder

(NIB files)

Interface Builder is a software development application for Apple’s Mac OS X operating system. It allows Cocoa and developers to create interfaces for applications using a graphical user interface. The resulting interface is stored as a “.nib” file.

Interface Builder provides palettes, or collections, of user interface objects to a developer. These user interface objects contain items like text fields, data tables, sliders, and pop-up menus.

To build an interface, a developer simply drags interface objects from the palette onto a window or menu. Actions (messages) which the objects can emit are connected to targets in the application’s code and outlets (pointers) declared in the application’s code are connected to specific objects. In this way all initialization is done before runtime, both improving performance and streamlining the development process.

Interface Builder saves an application’s interface as a directory hive that contains the interface objects and relationships used in the application. These objects are stored into either an XML file or a property list file with a .nib extension. Upon running an application, the proper NIB objects are unpacked, connected into the binary of their owning application, and awakened. NIBs are often referred to as freeze dried because they contain archived objects ready to run.

http://en.wikipedia.org/wiki/Interface_Builder

Image Format

(PNG files)

Portable Network Graphics is a bitmapped image format that uses lossless data compression. PNG was created to improve and replace the GIF format, as an image-file format not requiring a patent license.

PNG supports palette-based, greyscale or RGB images. The file-extension is “.png”.

http://en.wikipedia.org/wiki/Png

Sound Format

(AIFF files)

Audio Interchange File Format (AIFF) is an audio file format standard used for storing sound data. The format is most commonly used on Apple.

The file extension for the standard AIFF format is .aiff.

http://en.wikipedia.org/wiki/Aiff

Release Notes

Objective-Basic Release Notes Version 1.2

Among other improvements. The following improvements have been made.

IDE - added support for reading Interface Builder (created header files with outlets and actions) - added support for Interface Builder importing Objective-Basic files

LANGUAGE - added FOR EACH - added SET keyword for using with Objective-Basic classes - added LIKE keyword for easy String handling with new Objective-Basic String class - added new data types: Byte, String, Variant - added new array syntax: multi-array access with BASIC-styled [index, index, index, ...] or C-styled [index][index][index]

- added Objective-Basic framework with new Objective-Basic classes:

Foundation/Array

Foundation/Data

Foundation/Dictionary

Foundation/FileHandle

Foundation/FileManager

Foundation/Object

Foundation/ProcessInfo

Foundation/String

Foundation/Task

Foundation/Timer

Foundation/Variant

THE OBJECTIVE-BASIC MANUAL - added some new documentation - added Objective-Basic framework help support

_ Objective-Basic Release Notes Version 1.1 IDE - double click on the application icon in the file list run the application - non-source-code files cannot be accidentely opened anymore - file list is now ordered - added file list filter for .o .h and .m files - added integrated Cocoa help support - added snippets with syntax descriptions THE OBJECTIVE-BASIC MANUAL - added some new documentation - added examples to the documentation _

Objective-Basic Release Notes Version 1.0

FEATURES

Objective-Basic is full featured: - Object oriented modern BASIC language - Full featured IDE - Complete documentation

The following features are now implemented:

LANGUAGE - Class, Type, Enum - Function, Sub, Method - Object creation - Events - Statements, Assignment, Conditional, Loop statements - Expressions, Conversions

INTERFACE BUILDER

IDE - auto completion (builtin functions and datatypes)

THE OBJECTIVE-BASIC MANUAL

Have a nice day!

– Bernd

Press Release

KBasic Software Ships Objective-Basic 2006 Release 1.2 BETA

FRANKFURT AM MAIN, Germany (January 25 , 2007) - KBasic Software, providers of Objective-Basic, announced today that Objective-Basic 2007 Release 1.2 BETA is available now for Macintosh. All feature updates and improvements to this latest version are the result of customer requests.

“KBasic Software is committed to ensuring the best customer experience that I can provide,” stated Bernd Noetscher, creator of Objective-Basic. “As such, I am constantly improving the capabilities, usability and functionality of Objective-Basic to address ongoing customer feedback.”

Among the improvements, the new release of Objective-Basic offers:

  • Full featured object oriented modern BASIC programming language
  • Full featured IDE
  • Modern BASIC syntax
  • State of the art interface designer
  • Get the power of Objective-C with C and Carbon or Cocoa
  • Extend native Objective-C classes using inheritance
  • Create small and fast native executables without runtime dependencies
  • Create universal binaries
  • Complete documentation

Pricing and Availability

Objective-Basic 2007 for Macintosh Professional Edition is offered at $99. All new licenses include twelve months of updates. The update price after twelve months is $35. Additionally, It is FREE for non-commercial developers. Objective-Basic for Macintosh is available now and can be downloaded directly from KBasic Software at http://www.objective-basic.com/download.html.

About Objective-Basic

Objective-Basic is a full-featured software development environment suited to creating all kinds of applications, from utilities to enterprise-class applications, especically full featured Cocoa applications. Objective-Basic is available now at direct from KBasic Software at http://www.objective-basic.com/order.html.

About KBasic Software

KBasic Software is a software company with headquarter in Frankfurt am Main / Germany. Its flagship products are KBasic Professional, the multi-platform BASIC programming language and environment and Objective-Basic for Mac.

©2007-2008 KBasic Software. All names mentioned are trademarks or registered trademarks of their respective holders in Germany and other countries.

About us

KBasic Software is a small software company with headquarter in Frankfurt am Main / Germany. Its flagship products are KBasic Professional, the multi-platform BASIC programming language and environment and Objective-Basic for Mac.

KBasic Software was founded in 2003, although, Bernd Noetscher started the development of KBasic in 2000, which is the base for Objective-Basic’s compiler and lanuage.

I know that it is crucial for my customers to have good tools for making good software. Therefore, I do not compromise our demands for superior design and technical quality when I develop my products. At KBasic Software, I continously work to improve and expand Objective-Basic to ensure that it always represents the state of the art in usability, look and feel, performance, and stability.

Objective-Basic has received international recognition from users, industry experts and media.

Address Bernd Noetscher’s KBasic Software Boseweg 9 60529 Frankfurt am Main Germany

email: info@objective-basic.com sales related issues: sales@objective-basic.com

Copyright

Copyright © 2007 - 2008 by KBasic Software.

Products named on this website are trademarks of their respective owners.

 
start.txt · Last modified: 2008/02/28 21:55 by berndnoetscher
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki