Window and menu
Window and menu
Hi,
I have now spent some hours on PB for Mac, testing to create an menu.
Q:
Can't i create an menu, if i not have created an Window?
I try to find an workaround for this, and 'hide' the window, but then the menu not working.
I should need an 'WaitForMenuEvent' .....
The Window close widget on OS X should NOT Quit the application, only the close the window.
Any ideas about this?
Thx,
SEO
---------------------------------------------
http://developer.apple.com/documentatio ... index.html
I have now spent some hours on PB for Mac, testing to create an menu.
Q:
Can't i create an menu, if i not have created an Window?
I try to find an workaround for this, and 'hide' the window, but then the menu not working.
I should need an 'WaitForMenuEvent' .....
The Window close widget on OS X should NOT Quit the application, only the close the window.
Any ideas about this?
Thx,
SEO
---------------------------------------------
http://developer.apple.com/documentatio ... index.html
Re: Window and menu
Hi SEO
Hope, I could help.
I think, you cannot! Creating a menu requires a WindowID, so you have to have an open window (see examples in HELP)Can't i create an menu, if i not have created an Window?
'WaitWindowEvent()' or 'WindowEvent' . Where you find 'WaitForMenuEvent'. Or am I blind...?I should need an 'WaitForMenuEvent' .....
Correct! But an 'End'-Command at the end of the Application will Quit.The Window close widget on OS X should NOT Quit the application, only the close the window.
Hope, I could help.
michel51
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
The window 'Close' button should just fire a #PB_Event_CloseWindow event and you can choose to end or not the application by handle it or not.
About the 'menu without window', it's not possible in PB for now, as every menu needs its own window (it's a MacOS only feature to be able to display a menu without active window). I will see what can be done tough, may be allowing a default menu.
About the 'menu without window', it's not possible in PB for now, as every menu needs its own window (it's a MacOS only feature to be able to display a menu without active window). I will see what can be done tough, may be allowing a default menu.
Thanks Fred and michael51...
Menu: I understand and also why...
WaitForMenuEvent(): No you are NOT blind, but I wrote 'I NEED' ...
But my work to test, is still going on.... PB is very interesting, it creates an nice Mac bundle and the speed look fast. I understand that this version is new and there are a lot of 'features' that is missing in Mac version. (Metal windows, drawer windows and so on)...
And I must say the Toolbar is NOT Mac, but very nice!!
I know that PB is an 'Crossplattform' developing Tool and I can accept some things that is not 100% Mac, I have seen worse (Java apps)!
----------
TIP:
Select EventMenuID() ; To see which menu has been selected
Case -1 : Quit = 1 ;// Quit from Doc
EndSelect ;// #PB_EventMenu
-----------
I found that Quit from Doc generate -1, so this shuld be using....
Thanks to you all,
Regards
SEO
Menu: I understand and also why...
WaitForMenuEvent(): No you are NOT blind, but I wrote 'I NEED' ...
But my work to test, is still going on.... PB is very interesting, it creates an nice Mac bundle and the speed look fast. I understand that this version is new and there are a lot of 'features' that is missing in Mac version. (Metal windows, drawer windows and so on)...
And I must say the Toolbar is NOT Mac, but very nice!!
I know that PB is an 'Crossplattform' developing Tool and I can accept some things that is not 100% Mac, I have seen worse (Java apps)!
----------
TIP:
Select EventMenuID() ; To see which menu has been selected
Case -1 : Quit = 1 ;// Quit from Doc
EndSelect ;// #PB_EventMenu
-----------
I found that Quit from Doc generate -1, so this shuld be using....
Thanks to you all,
Regards
SEO
Hi SEO,
And I'm testing too... and my work with PB is "Trial and Error"
regards
michel51
Do you use only Mac or Windows too? Tiger?WaitForMenuEvent(): No you are NOT blind, but I wrote 'I NEED' ...![]()
And I'm testing too... and my work with PB is "Trial and Error"

I tried to generate a toolbar, but only the separator is shown. Can you post a small code-snippet, so I can see how it works on your mashine? I've tried the example from help. I don't know, why the buttons are not shown.... the Toolbar is NOT Mac, but very nice!!
regards
michel51
michel51
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Hi michael51!
When I download PB for Mac and starting, PB chrashed every minute, then I download an new copy and 'Install it' .. and after that I use the 'Disk utility' and 'Repair the Disk Permissions' ... and after that it works (OS X 10.4.3)...
The Toolbar: I am still in 'Hello World!' , but I mean the Toolbar in the PB Editor ...
You could contact me: svenerik@xhtmlsoft.com (have you Skype?)
Regards,
SEO
When I download PB for Mac and starting, PB chrashed every minute, then I download an new copy and 'Install it' .. and after that I use the 'Disk utility' and 'Repair the Disk Permissions' ... and after that it works (OS X 10.4.3)...
The Toolbar: I am still in 'Hello World!' , but I mean the Toolbar in the PB Editor ...
You could contact me: svenerik@xhtmlsoft.com (have you Skype?)
Regards,
SEO
About the toolbar, you have to use ToolbarImageButton() as standard buttons aren't implemented on OS X (as the OS doesn't have one, i asked my brother to do some, but i only got 4
).
BTW, why do you say than the toolbar isn't 'Mac' ? It just use plain API call, to create the toolbar, so i believe it's ok ?

BTW, why do you say than the toolbar isn't 'Mac' ? It just use plain API call, to create the toolbar, so i believe it's ok ?
Mac Toolbar
I have not written any Toolbar by my self, yet.
But I have seen the Toolbar in the PB Editor.
1 - The PB Toolbar is about 24px in height
2 - Mac is about 56px in height (icons is 32x32px) + text
http://www.okraft.nu/seedit/toolbars/osx104toolbar.jpg
http://www.okraft.nu/seedit/toolbars/seedittoolbar.jpg
http://www.okraft.nu/seedit/toolbars/osx103toolbar.jpg
But in this time this is an 'minor problem' ....
Regards,
SEO
I have not written any Toolbar by my self, yet.
But I have seen the Toolbar in the PB Editor.
1 - The PB Toolbar is about 24px in height
2 - Mac is about 56px in height (icons is 32x32px) + text
http://www.okraft.nu/seedit/toolbars/osx104toolbar.jpg
http://www.okraft.nu/seedit/toolbars/seedittoolbar.jpg
http://www.okraft.nu/seedit/toolbars/osx103toolbar.jpg
But in this time this is an 'minor problem' ....
Regards,
SEO
I have tested and written an simple Test Application using an MainWindow, AboutBox and an ToolPalette ...
The problem I have is, I must create an menu (Main menu) to every window. So you could open one window and after that open yet another..
But when I close the 'second' window and go back to my Main window, the menu not working, I can't open the second window again... But the Toolbar that I have in the 'Main Window' works...
I see in the PureBasic IDE, there is also some strange behavior, if you open an second window you cant open an another window... Open the 'About Box' then you can't open an another winodw....
Is there some that using Mac, have an idea how to fix this... It looks there is now way to 'activate the Mainmenu (Created in the Main Window), when i have closed the second window ...
Any Ideas??
//SEO
The problem I have is, I must create an menu (Main menu) to every window. So you could open one window and after that open yet another..
But when I close the 'second' window and go back to my Main window, the menu not working, I can't open the second window again... But the Toolbar that I have in the 'Main Window' works...
I see in the PureBasic IDE, there is also some strange behavior, if you open an second window you cant open an another window... Open the 'About Box' then you can't open an another winodw....
Is there some that using Mac, have an idea how to fix this... It looks there is now way to 'activate the Mainmenu (Created in the Main Window), when i have closed the second window ...
Any Ideas??
//SEO
I have put an example of this problem on my server ....
http://www.xhtmlsoft.com/pb/downloads/myExample2.zip
There are also an ReadMe file ...
Thanks for any ideas how to fix this problem...
Regards,
SEO
http://www.xhtmlsoft.com/pb/downloads/myExample2.zip
There are also an ReadMe file ...
Thanks for any ideas how to fix this problem...
Regards,
SEO