[Resolved] WindowActivate() Not Working?

Mac OSX specific forum
garretthylltun
Enthusiast
Enthusiast
Posts: 346
Joined: Wed Oct 26, 2005 2:46 am
Contact:

Post by garretthylltun »

SEO wrote:You are great!
Nope, I did not even run your code, because If I should try I have a lot of work to clean up the code, there is some characters, that give compiler error. And it is absolute not worth that work...
Is that due to copy and paste from your browser? Or is there a language
difference?
SEO wrote:And you missing someting, the code to 'activate' an window works, as it should... (Why do you say that is not working?)
You misunderstand what has happened here. I orginally thought that the
ActivateWindow() was suppose to make my window active when coming
from another program window that did not belong to my program, but
since I originally posted, I have since learned that it does not do that, but
that it only works from your own program that has more than one window.
SEO wrote:You also missing something fundamental: The documentation of the Carbon functions....
I did not miss this because it had no relation to my post.


Best regards,
-Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
· Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
· http://www.freewarehome.com/ <-- Freeware listings since 1996
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

You misunderstand what has happened here. I orginally thought that the
ActivateWindow() was suppose to make my window active when coming
from another program window that did not belong to my program, but
since I originally posted, I have since learned that it does not do that, but
that it only works from your own program that has more than one window.
The it was you that missunderstand...
garretthylltun
Enthusiast
Enthusiast
Posts: 346
Joined: Wed Oct 26, 2005 2:46 am
Contact:

Post by garretthylltun »

You're hopeless... I give up.

-Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
· Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
· http://www.freewarehome.com/ <-- Freeware listings since 1996
Fred
Administrator
Administrator
Posts: 16687
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

BringToFront_() doesn't work ?
garretthylltun
Enthusiast
Enthusiast
Posts: 346
Joined: Wed Oct 26, 2005 2:46 am
Contact:

Post by garretthylltun »

I have not tried yet. I think SEO is still on about the ActivateWindow()

-Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
· Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
· http://www.freewarehome.com/ <-- Freeware listings since 1996
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

have not tried yet. I think SEO is still on about the ActivateWindow()
Nope, I fixed detect of Mouseclick on an image gadget...
garretthylltun
Enthusiast
Enthusiast
Posts: 346
Joined: Wed Oct 26, 2005 2:46 am
Contact:

Post by garretthylltun »

SEO wrote:
have not tried yet. I think SEO is still on about the ActivateWindow()
Nope, I fixed detect of Mouseclick on an image gadget...
It is nice that you fixed something, but you do not share what you fixed
with us. Why?

If you are not willing to share a fix, then do not bother posting about it,
as it is simply rude to do such a thing.

Best regards,
-Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
· Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
· http://www.freewarehome.com/ <-- Freeware listings since 1996
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Sorry, Are you looking for that problem?? (Detect Mouseclick on an ImageGadget??) I can' put everything I done here ??
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

It is nice that you fixed something, but you do not share what you fixed
with us. Why?
????? This is an very stupid idea you get!!
When you start to asking questions about PB here, I answer and recomended you to download my MacSkeleton Example... This Example shows how to call Carbon Lib, calling dylibs, create Floating Windows, how to use and organise an Mac bundle, an example on Mac Popup menu button, Activate Window, How to create Mac application menu... and much, much more ...

But the response i get from you on that, whas that i should only answer you on things that you have asked for.. You prefer to ask once again....


But don't told me that I am not willing to share code!!



Code: Select all

Procedure Popup_Window_Open()
Protected wHeight, wWidth
wHeight = 500
wWidth = 500
If OpenWindow(#Popup_Window, 60,60,wWidth, wHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_ScreenCentered, "PopUp Example") 

If CreatePopupMenu(#Popup_PopUp_Menu_1)      ; here the creating of the pop-up menu begins...
        ; you can use any of the menu creating commands,
        MenuItem(#Popup_MenuItem_001, "Popup Menu Item 1")    ; just like in a normal menu...
        MenuItem(#Popup_MenuItem_002, "Popup Menu Item 2")
        MenuItem(#Popup_MenuItem_003, "Popup Menu Item 3")
        MenuItem(#Popup_MenuItem_004, "Popup Menu Item 4")
  EndIf

UsePNGImageDecoder()
If LoadImage(#Popup_Actionbutton_image, #ResourceFolder + "images/popupbutton.png")    ; change 2nd parameter to the path/filename of your image
      
      If CreateGadgetList(WindowID(#Popup_Window))
      ImageGadget(#Popup_Actionbutton_1,20,14,22,28,UseImage(#Popup_Actionbutton_image))
      ButtonGadget(#Popup_PushButton_1,wWidth-80,wHeight - 40,60,#OS_Standard_Button_Height,"Ok", #PB_Button_Default)
 EndIf
 EndIf

EndIf ; OpenWindow
EndProcedure
And then I use the EventGadgetID() to detect the MouseClick...

Code: Select all

Case #Popup_Window
   Select Event_WindowEvent
      Case #PB_Event_CloseWindow      : CloseWindow(#Popup_Window)
      Case #PB_Event_ActivateWindow   : Set_ActiveWindow(#Popup_Window)
   EndSelect
   
   Select Event_GadgetID
   Case #Popup_Actionbutton_1 :  DisplayPopupMenu(#Popup_PopUp_Menu_1, WindowID(#Popup_Window)) 
   Case #Popup_PushButton_1   :  CloseWindow(#Popup_Window)
   EndSelect ; Event_GadgetID
   
Fred
Administrator
Administrator
Posts: 16687
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Hey, please calm down both of you, the forum is a place to communicate pacefully ;).
garretthylltun
Enthusiast
Enthusiast
Posts: 346
Joined: Wed Oct 26, 2005 2:46 am
Contact:

Post by garretthylltun »

I think we have a language barrier issue here. I assume that SEO's
native language is not English and is either a second language or is using
an online translator.

-Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
· Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
· http://www.freewarehome.com/ <-- Freeware listings since 1996
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

I think we have a language barrier issue here. I assume that SEO's
native language is not English and is either a second language or is using
an online translator.
What... Do you meaning??
You are the biggest as.... I ever meet on the webb ...
Thanks and BYE!!!!!
User avatar
Rings
Moderator
Moderator
Posts: 1427
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

garretthylltun wrote:I think we have a language barrier issue here. I assume that SEO's
native language is not English and is either a second language or is using
an online translator.

-Garrett
if we had won ww2, we would not talking in your mother language here ;)
think about it and respect foreigns.


Ps. this should be a joke, nothing serious in my mind.
only to retain the flames until V4
SPAMINATOR NR.1
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

it's a good thing i don't speak english...

listen up you guys, when you start flaming, we'll sentence you to work on another 'purebasic - the album' contribution!
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

No problems, I close and jump of using PB.. (But it was worth the 69USD)
Have a nice time to you all, and hope the PB for Mac would be an wanted product from Mac users...
Locked