PureBasic 4.70 bêta 1 est disponible sur votre compte
Ajout d'un nouveau framework cocoa.
Le 2012-08-02 19:52:07, par comtois, Responsable Purebasic
Cette version est disponible sur votre compte.
Elle est principalement axée sur OS X par l'ajout d'un nouveau framework cocoa. Il est disponible en version 32 bits et 64 bits.
Les anciennes bibliothèques basées sur carbon restent disponibles en tant que sous système (dans les options du compilateur).
La prochaine bêta devrait contenir de nouvelles fonctions 3D.
Elle est principalement axée sur OS X par l'ajout d'un nouveau framework cocoa. Il est disponible en version 32 bits et 64 bits.
Les anciennes bibliothèques basées sur carbon restent disponibles en tant que sous système (dans les options du compilateur).
La prochaine bêta devrait contenir de nouvelles fonctions 3D.
Hi there,
After quite a lot of work, here is the beta of the new version of PureBasic, mainly focused on OS X. It introduces full Cocoa support and a brand new x64 version. A lot of libraries have been reworked from scratch so don't panic if a lot of things are not working in this first beta. Feature wise, we plan to add some more 3D functions before the final 4.70 release, it will be done in a next beta. Priority is to iron out the Cocoa related bugs so we can move forward on other topics. We are very proud to finally have 64-bit support for all supported platforms, which is really a big achievement. Here is the changes:
Cocoa'ified libraries:
Have fun and don't hesitate to report any bugs or inconsistencies you may encounter !
The Fantaisie Software Team.
After quite a lot of work, here is the beta of the new version of PureBasic, mainly focused on OS X. It introduces full Cocoa support and a brand new x64 version. A lot of libraries have been reworked from scratch so don't panic if a lot of things are not working in this first beta. Feature wise, we plan to add some more 3D functions before the final 4.70 release, it will be done in a next beta. Priority is to iron out the Cocoa related bugs so we can move forward on other topics. We are very proud to finally have 64-bit support for all supported platforms, which is really a big achievement. Here is the changes:
- Added: Cocoa support on OS X (now the default toolkit)
- Added: 64-bit version of PureBasic for OS X
- Added: Carbon subsystem for PowerPC and x86 version of PureBasic (use 'carbon' as subsystem to enable it)
- Added: InitScintilla() on Linux and OS X avoid compilation issues (empty function)
- Changed: SetModulePosition() is now in milliseconds, no more in pattern
- Updated: Scintilla updated to 3.1.0
- Updated: Expat updated to 2.1.0
- Updated: libjpeg updated to 8.0d
- Updated: ModPlug lib update to 0.8.8.4
- Updated: Use of VC++ 2010 instead of VC++ 2005 to compile the Windows libraries (32-bit and 64-bit), resulting of better optimized code
Cocoa'ified libraries:
- 2DDrawing
- Clipboard
- Desktop
- Dragdrop
- Engine3D
- Font
- Gadget
- Help
- Image
- Menu
- Printer
- Requester
- Scintilla
- Screen
- StatusBar
- Systray
- ToolBar
- Window
Have fun and don't hesitate to report any bugs or inconsistencies you may encounter !
The Fantaisie Software Team.
-
comtoisResponsable Purebasicça n'a pas tardé, voila déjà la première bibliothèque écrite par un utilisateur de PureBasic dédiée à la version cocoaA lib to work with the Cocoa version of PureBasic. (The library is currently in beta status)
x86 / x64 static library archive : http://www.waterlijn.info/pb/cocoa/libPBCocoa.zip
source (a real mess): http://www.waterlijn.info/pb/cocoa/source.zip
Commands :- oAutorelease (Object)
- oClass (ClassName.s)
- oClassExists (ClassName.s)
- oClassAddMethod (Class, Selector, Imp, Types.s)
- oClassName (Object)
- oCreateClass (Superclass, ClassName.s)
- oDescription (Object)
- oMsg (Receiver, Selector, ...)
- oRegisterClass (Class)
- oRelease (Object)
- oRetain (Object)
- oSel (Selector.s)
- AppleScript (Script.s) - Execute AppleScript code.
- BringGadgetToFront (GadgetID) - Bring gadget to front.
- DoubleToNSNumber (Number.d) - Convert Double to NSNumber.
- EnableFullScreenButton (WindowID) - Enable OSX 10.7+ full screen button.
- NSApp () - Returns the application instance.
- NSAutoreleasePool () - Returns a new autorelease pool.
- NSNumberToDouble (Number) - Convert NSNumber to Double.
- NSNumberToQuad (Number) - Convert NSNumber to Quad.
- NSStringToString (String) - Convert NSString to String.
- MacOSVersion () - Returns the OS version.
- QuadToNSNumber (Number.q) - Convert Quad to NSNumber.
- SendGadgetToBack (GadgetID) - Send gadget to back.
- StringToNSString (String.s) - Convert String to NSString.
Simple example enabling Full Screen button on OSX 10.7+Code : 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24SoundName = StringToNSString("Purr") PurrSound = oRetain(oMsg(oClass("NSSound"), oSel("soundNamed:"), SoundName)) oRelease(SoundName) If OpenWindow(0, 0, 0, 600, 340, "OSX 10.7+ Full Screen", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered) Window = WindowID(0) EnableFullScreenButton(Window) ButtonGadget(0, 10, 10, 200, 30, "Print Window") oMsg(GadgetID(0), oSel("setSound:"), PurrSound) Repeat EventID = WaitWindowEvent() If EventID = #PB_Event_Gadget Select EventGadget() Case 0 oMsg(Window, oSel("print:"), 0) EndSelect EndIf Until EventID = #PB_Event_CloseWindow EndIf
le 02/08/2012 à 23:04 -
comtoisResponsable PurebasicUne nouvelle version est disponible (uniquement pour OS X) . Elle corrige les principaux bogues déjà signalés pour permettre de poursuivre les tests.
N'hésitez pas à signaler le moindre problème avant la sortie finale, c'est le moment ou jamaisJust a quirk beta release with the fixed bugs included, to continue the bug hunt. Only the OS X packages have been uploaded, and the beta number is still '1'.
Have fun,
The Fantaisie Software Team.le 04/08/2012 à 19:00 -
comtoisResponsable PurebasicUne nouvelle beta est disponible sur votre compte. Elle corrige tous les bogues signalés, ce qui devrait vous permettre de poursuivre les tests de façon plus approfondie.
N'hésitez pas à signaler le moindre problème avant la sortie finale, c'est le moment ou jamaisAgain, another quick beta release with the all fixed bugs included, to continue the bug hunt. Only the OS X packages have been uploaded, and the beta number is still '1'.
Enjoy,
The Fantaisie Software Team.le 07/08/2012 à 16:51 -
comtoisResponsable PurebasicL'auteur de la bibliothèque signalée plus haut récidive en nous proposant cette fois-ci une discussion sur les trucs et astuces pour utiliser cocoa avec PureBasic.A thread for Methods, Tips & Tricks for the Cocoa version of PureBasic.
The intention is to collect information from different threads and users in this thread, just like the "API list for Mac" thread.
A little information :
Cocoa is object oriented and works by sending a message to a receiver.
The Objective-C language uses square brackets for this. For example to print a view it uses
[myView print:sender];
In this case, the receiver (object myView) is told to print itself and is informed the message was send by sender.
In this case, print: is called the selector ( it selects the method to be used ).
PureBasic doesn't support square brackets like this so low level C functions are required to use this message sending system.
I created a user library to help with this viewtopic.php?f=19&t=50688 .
If you prefer not to use a user library, simple tips will also work with importing the low level functions with ImportCCode : 1
2
3
4
5ImportC "" oClass(name.p-ascii) As "_objc_lookUpClass" oMsg(receiver, selector, arg1 = #Null, arg2 = #Null, arg3 = #Null) As "_objc_msgSend" oSel(name.p-ascii) As "_sel_registerName" EndImport
A simple example to start with ...
The PureBasic gadgets, are extensions of the NSView class ( https://developer.apple.com/library/mac ... SView.html ).
This class has a method print: to print itself. So if you want to print a gadget, you can do it like thisCode : oMsg(GadgetID(MyGadget), oSel("print:"), 0)
needs to look up the selector in a table and returns a pointer.
Therefore if you use certain selectors a lot, it's best to look them up once in the beginning of your application, store the return value in a global variable and use that for the rest of your application.
The same goes for looking up classes like oClass("NSNumber".
____________________
Showing a visible ruler inside an EditorGadgetCode : oMsg(GadgetID(MyEditorGadget), oSel("setRulerVisible:"), #True)
le 07/08/2012 à 23:54 -
comtoisResponsable PurebasicAs the IDE was broken, we have re-uploaded a new version which should fix it.
La 1.3 (uniquement pour OS X) est disponible sur votre compte.le 08/08/2012 à 6:57 -
comtoisResponsable PurebasicC'est la dernière bêta dédiée uniquement à OS X. Pratiquement tous les bogues sont corrigés, les quelques bogues qui restent ne sont pas bloquants et seront corrigés ultérieurement. La prochaine bêta comportera des nouvelles commandes 3D et la correction des bogues des autres OS (Windows et Linux).
Vous pouvez télécharger cette version sur votre compteHi again,
This is the last 'quick beta' of the OS X cocoa series. We have reviewed tons of bugs of the OS X bug forums, some of them were fixed by new versions of commands, we fixed the remaining. We should have reach an usable state, the last issues will be solved quickly. The next beta will include new 3D commands and more bug fixes for other OS !
Have fun,
The Fantaisie Software Team.
le 09/08/2012 à 18:34 -
comtoisResponsable PurebasicFred pensait avoir éradiquer tous les bogues mais il en restait encore un peu
Une nouvelle bêta est disponible sur votre compte (OS X uniquement).
Que les utilisateurs des autres systèmes patientent la prochaine bêta arriveHi there,
Well, i said 'last' for 1.4, but some important bugs raised since, so here we go with a new version. It should be more reliable overall, don't hesitate to report bugs as usual and a big thanks to all beta testers for their patience !
The Fantaisie Software Team.le 11/08/2012 à 21:30