Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Oct 19, 2018 10:27 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Getting Started Tutorial On Creating Plugins
PostPosted: Fri Sep 19, 2008 10:22 am 
Offline

Joined: Wed May 24, 2006 5:54 pm
Posts: 252
Hello,
I have downloaded the SDK and have looked through some of the examples but I'm still struggling a little. I'm using Xcode and I would like to use Objective C for my code but I don't see any examples and the documentation, well there really isn't any. I have searched on the forums and through some of the RB Plugins mailing list archives but really did not find much.

Can someone please point me in the right direction.

OH yea, the reason I would like to use Objective C is, I have a bunch of code I already wrote and don't want to have to requite it. :-)

Thanks,
tom


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Fri Sep 19, 2008 10:38 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Have you been able to build a basic plugin to make sure everything is working ?
I don't know of any examples that call objective-C
There are some plugin articles on RBLibrary but none use objective-C

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Fri Sep 19, 2008 6:10 pm 
Offline

Joined: Wed May 24, 2006 5:54 pm
Posts: 252
So, I have been able to get the Xcode template to build, with nothing in it :-) but I keep when I tried a couple of the examples I get some errors and they wont build.

Oh yea, I'm using Xcode 3.1 and I'm setting the SDK to 10.4, since I'm on 10.5.

Thanks,
tom


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Fri Sep 19, 2008 6:44 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
there are a lot of examples in the SDK and some won't build as they use older SDK functions that are deprecated

what sort of plugin are you trying to make ?

I could point you in direction if I knew that

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Sat Sep 20, 2008 10:37 am 
Offline

Joined: Wed May 24, 2006 5:54 pm
Posts: 252
I would like to write a plugin for using OpenSSL and a lot of what it has to offer.


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Sat Sep 20, 2008 11:01 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
OK so not a control

if you have the current SDK and can get a reasonably simple plugin (say one that just alters a value) to compile and work in and RB app then you should be on your way

If you have the template compiling try adding some bits from testPlugin.cpp

s
tatic int add5func(int v)
{
   return v + 5;
}

REALmethodDefinition add5defn = {
   (REALproc) add5func,
   REALnoImplementation,
   "add5(v as integer) as integer"
};


void PluginEntry(void)
{
REALRegisterMethod(&add5defn);
}


This should just add a global method called add5 that you can call from RB

You might try the starter project here http://www.thismuchiknow.co.uk/?p=20

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Mon Sep 22, 2008 11:19 am 
Offline

Joined: Wed May 24, 2006 5:54 pm
Posts: 252
Thanks, I got it compile. When creating the rbx are all Mac plugins going to be carbon?


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Mon Sep 22, 2008 12:28 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Carbon Mach-O
I'm pretty sure you can call obj-c code from carbon and vice versa

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Sun Dec 28, 2008 6:28 pm 
Offline
User avatar

Joined: Wed Mar 15, 2006 7:11 pm
Posts: 700
npalardy wrote:
OK so not a control

if you have the current SDK and can get a reasonably simple plugin (say one that just alters a value) to compile and work in and RB app then you should be on your way

If you have the template compiling try adding some bits from testPlugin.cpp

//this is a test


#include "rb_plugin.h"
static int add5func(int v)
{
   return v + 5;
}

REALmethodDefinition add5defn = {
   (REALproc) add5func,
   REALnoImplementation,
   "add5(v as integer) as integer"
};


void PluginEntry(void)
{
REALRegisterMethod(&add5defn);
}


This should just add a global method called add5 that you can call from RB



Im using VS 2008...I compile the dll ...no failure or errors....Use the Plugin Creator....I get a "myname.rbx"
but when I add the plugin to the Plugins folder and start RB it does not recognize "add5" at all :(

-Newbie

_________________
Windows XP + RB2009R2
Windows Vista + RB2009R2
Windows 7 32&64 + RB2009R2
CentOS Linux + RB2009R2


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Sun Dec 28, 2008 8:11 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
How do you mean ?
you have to use it as a function in your RB code

dim i as integer = add5(1)

and i should be set to 6

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Sun Dec 28, 2008 8:45 pm 
Offline
User avatar

Joined: Wed Mar 15, 2006 7:11 pm
Posts: 700
npalardy ,

yes I tried just that...

all that RB compiler says is that .."This method or property doesnt exist"

_________________
Windows XP + RB2009R2
Windows Vista + RB2009R2
Windows 7 32&64 + RB2009R2
CentOS Linux + RB2009R2


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Sun Dec 28, 2008 11:24 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
and you have the folder/diretcory structure set up that the docs say to ?

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Mon Dec 29, 2008 9:29 am 
Offline
User avatar

Joined: Wed Mar 15, 2006 7:11 pm
Posts: 700
npalardy wrote:
and you have the folder/diretcory structure set up that the docs say to ?


Followed Aaron ballmans guide: http://ramblings.aaronballman.com/2007/11/plugins_can_be_fun_part_one_vi.html
Then followed the instructions in the SDK for the Plugin creator


Other then that all other tutorials ive found focus on Mac and Xcode so that doesnt help me


-Newbie

_________________
Windows XP + RB2009R2
Windows Vista + RB2009R2
Windows 7 32&64 + RB2009R2
CentOS Linux + RB2009R2


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Mon Dec 29, 2008 11:27 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
What I meant is the directory structure mentioned in the Plugin Converter Readme

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Started Tutorial On Creating Plugins
PostPosted: Mon Dec 29, 2008 1:00 pm 
Offline
User avatar

Joined: Wed Mar 15, 2006 7:11 pm
Posts: 700
Yes sir I did

I will look it over again

I look forward to creating some useful plugins so I hope I can resolve this

thanks for helping :-)

_________________
Windows XP + RB2009R2
Windows Vista + RB2009R2
Windows 7 32&64 + RB2009R2
CentOS Linux + RB2009R2


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group