Purebasic 3.94 for Mac os x work bad, not properly..........

Mac OSX specific forum
Fred
Administrator
Administrator
Posts: 18224
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

I fixed a bunch of bugs, thanks to all your good reports. A new version will be available on your private account soon (3.94b):

- RunProgram(): added support for .app and #PB_RunProgram_Wait
- ExplorerTreeGadget(): fixed the "" bug, added #PB_Explorer_NoFiles support
- ExplorerListGadget(): added support for #PB_Explorer_NoFiles, #PB_Explorer_NoParentFolder and #PB_Explorer_NoDrawers
- ButtonGadget(): added #PB_Button_Default support
- ImageButtonGadget(): Added right and left click event support
- Reworked the scintilla library in the IDE to support ISOLatin1 correctly (old sources aren't compatiable anymore, you will need to convert them to ISOLatin before loading them in the IDE. Now all accent letter should be handled correctly by PureBasic.
- MessageRequester() has now the application icon, like other OS X apps
- Added GetHomeDirectory() which returns the user directory

edit: it's now available on your private account.
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Christmas feelings!!!!!
But a small Question 'ImageButtonGadget' Right and left click .. My mouse have only 'one button' ... And ImageGadget .. was also problems to fire mouse click??
//SEO
Fred
Administrator
Administrator
Posts: 18224
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Shouldn't be a problem, only the left click (EventType() = 0) will be fired then.
Fred
Administrator
Administrator
Posts: 18224
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

The default button patch was desactived :oops:, i've put the fixed lib here www.purebasic.com/beta/mac/Gadget .
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Button Default

Code: Select all

ButtonGadget(#Popup_PushButton_1,wWidth-80,wHeight - 40,60,#OS_Standard_Button_Height,"Ok", #PB_Button_Default)
I can't get it to be 'Default Button' ...
Do you get an 'Pulsate Button' in the blue Aqua color?
//SEO
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Have you tried with the new file Fred posted in the previous message ?
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

YES
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Popup Menu - (DisplayPopUpmenu) 3.94b

DisplayPopUpmenu looks not to work.. The debug line works.. I don't know how this should work, but the CreatePopUpmenu add the PopUpMenu to the 'Main Menu'

Code: Select all

Case #Main_Actionbutton_1 :  DisplayPopupMenu(#Main_PopUp_Menu_1, WindowID(#Main_Window)) 
    ; Case #Main_Actionbutton_1 : Debug "Button " + Str(#Main_Actionbutton_1) 

Code: Select all

Enumeration
#File_001
#File_002
#File_003
#File_004
#Main_Window
#Main_Actionbutton_1
#Main_PopUp_Menu_1
EndEnumeration



Procedure Open_Main_Window()
Protected wHeight, wWidth
wHeight = 500
wWidth = 500
If OpenWindow(#Main_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "Main Window") 

If CreatePopupMenu(#Main_PopUp_Menu_1)      ; here the creating of the pop-up menu begins...
      MenuTitle("PopUpMenu")     ; you can use any of the menu creating commands,
        MenuItem(#File_001, "Open")    ; just like in a normal menu...
        MenuItem(#File_002, "Save")
        MenuItem(#File_003, "Save as")
        MenuItem(#File_004, "Quit")
  EndIf
      
      If CreateGadgetList(WindowID(#Main_Window))
      ButtonGadget(#Main_Actionbutton_1,wWidth-80,wHeight - 40,60,20,"PopUp", #PB_Button_Default)

 EndIf

EndIf ; OpenWindow
EndProcedure



Open_Main_Window()

Repeat
EventID = WaitWindowEvent()
ButtonEvent = EventGadgetID()
  
  
    
    Select ButtonEvent
    Case #Main_Actionbutton_1 :  DisplayPopupMenu(#Main_PopUp_Menu_1, WindowID(#Main_Window)) 
    ;Case #Main_Actionbutton_1 : Debug "Button " + Str(#Main_Actionbutton_1)   
    EndSelect
    
    Select EventID
         
    EndSelect ;EventID
    
    Until EventID = #PB_Event_CloseWindow
    End ; Terminate application

User avatar
michel51
Enthusiast
Enthusiast
Posts: 290
Joined: Mon Nov 21, 2005 10:21 pm
Location: Germany

Post by michel51 »

SEO wrote:Christmas feelings!!!!!
But a small Question 'ImageButtonGadget' Right and left click .. My mouse have only 'one button' ... And ImageGadget .. was also problems to fire mouse click??
//SEO
Yes I'm happy too.
I've downloaded gadget.lib. many thanks to Fred.
Imagegadgets can be clicked now, great.

@SEO
Use <ctrl>-Key together with your "One-Button-Mouse", that will emulate a right click. That's Mac-like and is implemented in systemsoftware.
michel51

Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Fred
Administrator
Administrator
Posts: 18224
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Just comment the 'MenuTitle()' from your popup menu creation and it should work (popup menus have no title). I've added a check to prevent this error for the next version.

About the default button, it definitely works here (pulsate aqua button). Did you copied the Gadget lib correctly (overwritten the old one) ? I tested with the code you provided in this topic.

michel51: better install the full v3.94b version found in your user account or you will miss some fixes (and then get the lastest Gadget lib). BTW, does the default button works for you ?
User avatar
michel51
Enthusiast
Enthusiast
Posts: 290
Joined: Mon Nov 21, 2005 10:21 pm
Location: Germany

Post by michel51 »

Fred wrote:... in your user account
:?:
Not found , I Think, I'm stupid :oops:
But I'm newbie on this forum an don't know every finesse. Where is the file remaind?
BTW, does the default button works for you ?
Yes. If I use the #PB_Button_Default, the button is blue and I can fire the event with enter-key and return-key.
michel51

Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

michel51
Why not use the Mac PB Support on Skype??
/SEO

((
1 - Pure Basic Homepage
2 - Download
3 - your email and you password))
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Default Dutton Works!
I downloaded again ...
CSAUER
Enthusiast
Enthusiast
Posts: 188
Joined: Mon Oct 18, 2004 7:23 am
Location: Germany

Post by CSAUER »

Dear all,
Dear Fred,

my IDE crashes quite often. You can say every 5 minute, of every second try to compile a pogram. I did not installed something special (just defaults + Blitzmax + Purebasic). My computer is a Mac Mini, 1.42 GHz, 512 MB RAM, 80 GB HDD, Mac Os X 10.4.3, German language, XCode-Version ?, Purebasic 3.94b.

If I am able to run a program, it crashes during debugging. Sometimes it crashes during editing in IDE or changing tab or stepping through menu.

IDE refresh is wrong sometimes during editing, marking, keying. Only after switching tabs it refrehes and shows the right marking. I cannot say if it is better with new Mac-Version 3.94b.
How can I find out my version of XCode? I cannot find any XCode-development tools as well on my computer - but for sure I installed the file "Programs => Installers => XCode Tools => XCodeTools.mpkg" from my HDD directly.

Additional I found out a bug (incompatibility to Win32-Version):

Code: Select all

Procedure.f test(SomeInput.b)
       ProcedureReturn 0
EndProcedure
You need to enter:

Code: Select all

Procedure.f test(SomeInput.b)
       ProcedureReturn 0.0
EndProcedure
Otherwise I receive an compiler error.

I am looking forward
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

CSAUER

1 - Close All your Apps
2 - Use the Disk utilty and 'Repair Disk Permissions'

3 -
Xcode on 10.4 - the version of Xcode should be 2.x
You should find it on your HD and an Folder named 'Developer' and then 'Application' there you find Xcode.app
Post Reply