AppleScript Wrapper [XCode 3.2.6 Source code]

Mac OSX specific forum
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

AppleScript Wrapper [XCode 3.2.6 Source code]

Post by wilbert »

Since I'm not very active at using PureBasic lately, I'm posting the XCode 3.2.6 source code of my AppleScript wrapper library.
http://www.w73.nl/pb/PBCocoa_AppleScript.zip

The paths in the "build.command" in the PBUserlib subdirectory need to be changed depending on where the files are located.
It's not much code but hopefully it might help others to create their own OSX x86 user libraries.
Last edited by wilbert on Wed May 31, 2017 3:14 pm, edited 1 time in total.
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: AppleScript Wrapper [XCode 3.2.6 Source code]

Post by J. Baker »

Thanks wilbert! Will check it out. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: AppleScript Wrapper [XCode 3.2.6 Source code]

Post by jesperbrannmark »

Hi Wilbert.
I really like the Applescript Wrapper a lot - thanks :-)
I am all fresh to Xcode, and trying best I can there.
Could you maybe write a short thing about how you do when you use a Xcode function exported as a userlib? Like a really small tutorial if anyone else decide to use xcode in their pb projects?
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: AppleScript Wrapper [XCode 3.2.6 Source code]

Post by wilbert »

I'm not sure what you are exactly asking.
When the source code is compiled, it creates a .a file that is used together with a .desc file to build the actual userlib.
The functions mentioned in the .desc file refer to the functions in the source code except that in the source code the functions are preceded by the PB_ prefix.
Objective-C itself isn't very complicated. Most important for me was to get used to the [ ] brackets to send a message to an object.
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: AppleScript Wrapper [XCode 3.2.6 Source code]

Post by jesperbrannmark »

(this is a general request... i dont know how to do this and maybe someone else knows)

Would it be possible to make this userlibrary run "threadsafe" in any way? I really would benefit from it....
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: AppleScript Wrapper [XCode 3.2.6 Source code]

Post by wilbert »

As far as I know, if you download the zip archive with the source code, the libPBCocoa_x86 file in the PBUserlib folder should be threadsafe.
It's an updated version of the first version I posted without the source code.
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: AppleScript Wrapper [XCode 3.2.6 Source code]

Post by jesperbrannmark »

Yes you are right! It is threadsafe! Wonderful! Thanks thanks thanks :D :D :D
Post Reply