MacOS X Beta 7 unleashed, with IDE !

Developed or developing a new product in PureBasic? Tell the world about it.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

And we did it again, Beta 5 is available on your private account. It fixes the cd-audio bug, the imagedecoders ones (hopefully) + several others.

dmoc: i don't trick anyone, i just removed some unworking stuffs :). About databases, DSN dialog window isn't supported on OS X, i will write another example (databases commands work). BTW, what do you mean by 'sluglish toolbar tooptips' ? It's a regular API call to display them. About OpenGL commands, i will add them for the final release, it's not a problem (you will even have an OpenGL context when using the sprite commands ;)).

cologneskater: 3 new constants have been added for menu: #PB_Menu_Quit, #PB_Menu_About and #PB_Menu_Preferences. These constants won't be defined on Windows/Linux but on OS X yes (which allow you to choose your own value on Linux/Windows). Why these constants are in ? Because on OS X these 3 menu items are expected to be in the 'Application' menu which is a special one. So when PB encounter a menu item with a such constant it moves it automatically. Usage: MenuItem(#PB_Menu_Quit, "Quit") etc. Shortcuts on such menus are ignored as OS X setup its own.

2) It's #PB_OS_MacOS (value 4 if you need to define it on Winodws for now)

3) fixed

4) When creating an exe which should be an OS X application, just ends its name by '.app' and it willl create the correct structure for it. For example 'MyApp.app'.


J-The-Grey: WindowOutput() doesn't work for now, you're right. Other outputs should work tough.

Don't hesitate to posts any bugs, it helps a lot !
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

i just removed some unworking stuffs
That's a unique bug fixing skill you have there :P

OpenGL - yummy
ToolTips - poss just my mc as it was ok on the last beta

Will check b5 tomorrow. Thanks.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Strange on the last beta the tooltips weren't implemented at all (?).
cologneskater
User
User
Posts: 22
Joined: Fri Jul 08, 2005 7:06 pm
Location: Cologne, Germany
Contact:

Post by cologneskater »

Hello Fred,

thanks for your description about the menu handling extension.

It seems that there is another update problem with the listview gadget (damn i did'nt locate it before :roll: ). The output is different to to windows version.

Code: Select all

If OpenWindow(0, 100, 100, 200, 300, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Testwindow")
  If CreateGadgetList(WindowID())
    ButtonGadget(1, 10, 10, 90, 30, "Yes")
    ButtonGadget(2, 10, 50, 90, 30, "No")
    ListViewGadget(3, 10, 90, 180, 170)      
  EndIf
EndIf
  
Repeat 
  Event = WaitWindowEvent()   
  If Event = #PB_EventGadget
    GadgetID = EventGadgetID()
    If GadgetID = 1
      AddGadgetItem(3,0,"Yes is accepted")      
    ElseIf GadgetID = 2
      AddGadgetItem(3,0,"No will be rejected")
    EndIf    
  EndIf
Until Event = #PB_Event_CloseWindow
End
cologneskater
User
User
Posts: 22
Joined: Fri Jul 08, 2005 7:06 pm
Location: Cologne, Germany
Contact:

Post by cologneskater »

Maybe two little bugs in Beta5:

1.)

Code: Select all

StandardFile$ = "Output.txt"
InitialPath$ = "/" 
Path$ = PathRequester("Please select your destination path", InitialPath$) 
MessageRequester("Pathcheck", Path$+StandardFile$, 0)
Windows: Not with this demo, but a backslash is always the last character of path$
Linux: a slash is the last character
Mac: No slash as last character is given, please correct.

2.) I have created an executable and saved it f.e. as "output.app". After any change of source i will recompile the program and gets an error "The name output is already used by a folder". Ok, switch to the finder and delete the old Application(folder), then switch back to purebasic and compile: Same error displayed again. Only quit and restart of purebasic makes it possible to generate a new executable with the same old name. My wish: Is it possible to read the target directory every time before the "create executable" dialog appears? Handling would be easier.
(If i compile without the ".app"-extension, a replace-question will be shown. That's OK.)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

The ListViewGadget() and PathRequester() bugs are fixed, but about the one with the OpneRequester() i have now idea on how to fix it. It's handled by the mac and it seems like you can't do anything against it.
cologneskater
User
User
Posts: 22
Joined: Fri Jul 08, 2005 7:06 pm
Location: Cologne, Germany
Contact:

Post by cologneskater »

Hello,
maybe i found something for update:

I Installed a mysql database with the odbc driver from
http://www.macupdate.com/info.php/id/10609
and configured the odbc driver with the administrator program in the utilities section as an mysqql_odbc entry.

The following code were used:

Code: Select all

OpenConsole()
If InitDatabase() = 0
    PrintN("Error opening ODBC")
    End
Else
    PrintN("ODBC found")
EndIf
PrintN("Drivers available:")
If ExamineDatabaseDrivers()
  While NextDatabaseDriver()
    PrintN(DatabaseDriverName()+" - "+DatabaseDriverDescription())
  Wend
EndIf
PrintN("End of list")
End
When compiling with enabled debugger i got an error:
ld: Undefined symbols:
__PB_DEBUGGER_Control
__PB_DEBUGGER_ErrorDescription
Error: Linker

After creating an executable without debugger (console program, no app), the following output is shown:

Drivers available:
Trace -
TraceAutoStop -
TraceFile -
TraceLibrary -
End of list

There is nothing to find about my mysql entry. But i'm not shure: Is it a PB bug or my mistake?

An OpenDatabaseRequester command has no ouput on the screen.

The IDE: When creating an executale more than one time, the full path and the filename ist shown in the "save as" text field. Every time the path must be deleted otherwise no executable could be generated.
cologneskater
User
User
Posts: 22
Joined: Fri Jul 08, 2005 7:06 pm
Location: Cologne, Germany
Contact:

Post by cologneskater »

There is a bug with ToolBarStandardButton. No icons displayed:

Code: Select all

If OpenWindow(0, 0, 0, 150, 25, #PB_Window_SystemMenu |#PB_Window_ScreenCentered, "ToolBar")
    If CreateToolBar(0, WindowID())
      ToolBarStandardButton(0, #PB_ToolBarIcon_New)
      ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
      ToolBarStandardButton(2, #PB_ToolBarIcon_Save)
    EndIf
    Repeat
      EventID = WaitWindowEvent()
      If EventID = #PB_Event_Menu
        Debug "ToolBar ID: "+Str(EventMenuID())
      EndIf
    Until EventID = #PB_Event_CloseWindow 
  EndIf
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

A quick update (3.93 Beta 6) which fixes several bugs and get the lastest IDE enhancements and fixes.

Colognestacker: about the default toolbar icons, that's true and MacOS X doesn't have such. Some icons are being drawn but it's not finished, so it has to wait a bit. For the ODBC, i'm looking to see if i can find something here.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

I've tested the ODBC commands on OS X with MySQL and it works as expected. Here is a sample code (the officials MyODBC drivers won't work on OS X 10.4 you can try with these one until it's fixed by the mysql crew: www.actualtechnologies.com ). Then you have to add your DSN using the apple ODBC manager (found in the Applications/utilities/ drawer).

Code: Select all

If InitDatabase()

  If OpenDatabase(0, "MyCoolDSN", "youruser", "yourpass")
  
    If DatabaseQuery("SELECT * FROM yourtable") ; Get all the records in the 'employee' table
  
      While NextDatabaseRow() ; Loop for each records
        Debug GetDatabaseString(0) ; Display the content of the first field      
      Wend
  
    EndIf
  
  Else
    Debug DatabaseError()
  EndIf

EndIf
cologneskater
User
User
Posts: 22
Joined: Fri Jul 08, 2005 7:06 pm
Location: Cologne, Germany
Contact:

Post by cologneskater »

Hello,

testing with beta 6 it seems that the setgagdetfont command doesn't work (windows ok, mac always standard font) :

Code: Select all

FontRequester("Courier", -13, 0)
Fontname$=SelectedFontName()
Fontsize=SelectedFontSize()

FontID1 = LoadFont(1, Fontname$, Fontsize)

If OpenWindow(0, 216, 50, 626, 100,  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Font and size test")
  If CreateGadgetList(WindowID())
    TextGadget(0, 40, 20, 560, 70, "Font " + Chr(34) + Fontname$ + Chr(34) + " with size " + Str(Fontsize) + " selected.")
    SetGadgetFont(0, FontID1)
  EndIf
  Repeat
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

We've put online the MacOS X 3.93 Beta 7 (!). It includes all our last changes and fixes. The IDE can be a bit unstable when using the integrated debugger, so you could disable it (for now) if you have such troubles.

Cologneskater: you're right, the SetGadgetFont() isn't working, and there is no easy way to change the gadget font on OS X, per gadget, so it won't probably work for some time.
spot
User
User
Posts: 16
Joined: Fri Oct 10, 2003 9:20 pm
Location: switzerland
Contact:

Post by spot »

fabulous - can't wait for the final release :-)
-- spot | www.nothing.ch
J-The-Grey
User
User
Posts: 21
Joined: Fri Apr 25, 2003 6:16 pm
Location: Germany

Post by J-The-Grey »

WindowOutput() still doesn't work?!

What about CallFunction, CallCFunction, CallFunctionFast and CallCFunctionFast? With the "fast" ones I always get linker errors. The same with CallCFunction. With CallFunction I only get "0" as a result.
iMac CoreDuo, MacBook C2D, OSX 10.5.5
PureBasic owner since V1.0 for Amiga
Post Reply