Page 2 of 3
Posted: Thu Dec 15, 2005 8:03 pm
by SEO
Hi again Polo!
Unfortunately I don't think there's a lot of PB user on MacOSX (Mac are so expensive, I would love to have one ), but if you can call a function from another language it should be easy to call if with Purebasic
Yes it should be easy, but it depends if the language have 'variable types' that 'match' the Carbon Lib types ... That language I talk about have these 'types', but they not called the same as in C# or C++, so the best is to test.
And it should be easy is not the same as it works. And that is my Q. (See my other 'thread' Dylibs .....)
PS. Mac are cheep! You get an product that you know is working, and no virus problems ....
Regards,
SEO
Posted: Thu Dec 15, 2005 8:18 pm
by Polo
Hmm, sorry to disagree, but Mac are NOT cheap, I could get a new (not good) PC for 300 euros, but not a Mac

For your problem, currently, those variable type are supported :
byte, word, long and float.
As long as the commands you wanna call don't need doubles or quads, Pb should do the job.
Of course, you can't be sure, maybe a Mac user is going to show up here ?
I wish I had a Mac

Posted: Thu Dec 15, 2005 9:49 pm
by Fred
I put the exe (app bundle) here:
www.purebasic.com/beta/mac/soimporter/test.tgz
The code look like this:
Code: Select all
If OpenWindow(0, 100, 100, 195, 260, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, "PureBasic Window")
err = ChangeWindowAttributes_(WindowID(0), 256, 0)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
So the call definitely work (as expected as we used some in the IDE) but there is a wierd display bug, i will investigate once i will be on OS X again.
Posted: Thu Dec 15, 2005 10:19 pm
by Nik
Nice to see that this is possible
Posted: Thu Dec 15, 2005 10:27 pm
by SEO
Thanks Fred!
Yes there was an refresh problem, when I rezise the window.
But I think there should be an Refresh command somewhere.
Now my next problem is to find my wallet!
This could be very interesting, but thre is a lot of work and learning I have to do. And I should share my experiences with the PB Mac users.
Regards,
SEO
------------------------------------
PS. To the readers: That was an Example how to create an Metal Window by using Carbon call.
http://www.xhtmlsoft.com/pb/images/purebasicmetalw.jpg
------------------------------------
Posted: Thu Dec 15, 2005 11:39 pm
by blueznl
shell out now! when the monday arrives on the mac, you'll be blown away and hate yourself that you still have to purchase pb

Posted: Thu Dec 15, 2005 11:55 pm
by SEO
It is DONE
But I still have problems wit the dylibs calls ...
Please check the Mac Dynamic Library thread..
Thx,
SEO
Posted: Thu Dec 15, 2005 11:56 pm
by Dare2
Welcome on board.

Posted: Fri Dec 16, 2005 6:33 am
by SEO
Thanks to Dare2!
Carbonx version 0.0.1 is available for download.
Sounds nice... but this is only an test and try.
There is only a few functions that works and some more that not works
Carbonx is an Mac Carbon Library (or should be), as an workaround for 'missing' features in the Mac version of PB.
It would take some time, before we could call it an Library, this because I am an newbie on PB and absolute not an expert on carbon, but with some work, work and work....
So PB Mac users, please help me to test it out ....
1 - Do the idea works... could you 'install' the Library?
2 - Do the 'functions' that should work also work for you?
3 - Do you wan't that I should try to fix more functions?
4 - Any problems to download the file (Mac zip)?
Download:
http://www.xhtmlsoft.com/pb/downloads/
-------------------------------------------------------------
If you have any 'functions' you would add to the Library, please give me the code so i could add it! The carbonx Library is free and should be free to use!!
Looking forward to hearing from you, but hurry, version 0.0.2 is available soon...
Regards,
SEO
Posted: Fri Dec 16, 2005 11:44 am
by Fred
Nice ! I have alkready done a few Carbon functions, so if you want i will commit them on CVS so you can complete them (instead of creating new pbl file). So everybody will benefit of it

.
BTW, I just fixed the redraw bug with metal window. Just get
www.purebasic.com/beta/mac/Window and install it in the purebasic/purelibraries/ drawer (overwrite the old one).
Posted: Fri Dec 16, 2005 12:31 pm
by SEO
I create pbl files every minute!
Njema Problema....
I have some question later... about convert data types, but I try here first.
It is Okey to use #C as 'namespace' for carbon constants??
Sorry, I do not understand you about your Carbon stuff?
All PB Users would get my works for free (CarbonLib)!!
Great (metal Window) Should check it out...
I just check Toolbar stuff, PB have the Toolbar 'Hide' as default, you have to click on the Toolbar widget... Could it 'Show' be default?
Regards,
SEO
Posted: Fri Dec 16, 2005 12:40 pm
by SEO
Metal Window Great!
Is it Composite now or is the window created as Non Composite...
I have fixed some more Windows stuff, and next 'public' release would be available later today...
Regards,
SEO
Posted: Fri Dec 16, 2005 12:43 pm
by Nik
I thnik Fred means that he already works on a PBL File discribing carbon functions and he offers it to download for you to help him completing it wich will help all Purebasic Mac users too because he than can add it to the default package for mac.
Posted: Fri Dec 16, 2005 12:44 pm
by Nik
So lets see what the future will give to us
Posted: Fri Dec 16, 2005 12:55 pm
by SEO
OK I understand...
But then later, I have much to learn, and there should be no problems, If I have his 'public' versions, the I see that the function is already in use.
But do you see any problems to download my files and add to PB?
This was only an first test... You see now we have fixed an metal window to the PB users..
I also think that many of the PB Mac users, have something to learn of my examples, I hope. There is a lot of work to get an 'Mac application' .. And I am willing to share my stuff... And perhaps I get some help from the 'older' PB users..
Regards,
SEO