It is currently Sun May 26, 2013 7:21 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Imagegadget is no gadget?
PostPosted: Tue Feb 07, 2012 6:28 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 16, 2009 10:42 am
Posts: 531
Location: sweden
This happens when i do a frame3dgadget. I found this out the hard way, though life.
Click first black thing = works
Click second black thing = not work

Can someone confirm? Workaround?

Code:
OpenWindow(0,0,0,500,500,"")
Frame3DGadget(0,100,100,300,300,"")
CreateImage(0,50,50)
ButtonImageGadget(1,120,120,50,50,ImageID(0))
ImageGadget(2,200,120,50,50,ImageID (0))
Repeat
  If WaitWindowEvent()=#PB_Event_Gadget
    Debug "EVENTGADGET"
  EndIf
ForEver


Top
 Profile  
 
 Post subject: Re: Imagegadget is no gadget?
PostPosted: Tue Feb 07, 2012 7:16 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Aug 04, 2008 10:56 pm
Posts: 849
Location: Seattle, USA
Yup, it does the same thing here in Snow Leopard. Wierd Take out the Frame3DGadget and it works fine. Looks like a bug to me.

Yes, you can waste a lot of time on something like this.

_________________
MacBook Pro/Retina, OSX 10.8.3 Mountain Lion, PB-5.11x64


Top
 Profile  
 
 Post subject: Re: Imagegadget is no gadget?
PostPosted: Wed Feb 08, 2012 6:06 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 814
Location: Germany
jesperbrannmark wrote:
Workaround?

Code:
ImportC ""
  NewControlUserPaneHitTestUPP(ControlUserPaneActivateCallback.L)
  SetControlData(ControlRef.L, ControlPartCode.W, TagName.L, BufferSize.L, *Buffer)
EndImport

#kControlUserPaneHitTestProcTag = $68697474 ; 'hitt'

ProcedureC UserPaneHitTestCallback(ControlRef.L, Point.L)
  Debug "Click onto ImageGadget"
EndProcedure

OpenWindow(0,270,100,500,500,"")
Frame3DGadget(0,100,100,300,300,"")
CreateImage(0,50,50)
ButtonImageGadget(1,120,120,50,50,ImageID(0))
ImageGadget(2,200,120,50,50,ImageID(0))

UserPaneHitTestUPP = NewControlUserPaneHitTestUPP(@UserPaneHitTestCallback())
SetControlData(GadgetID(2), 0, #kControlUserPaneHitTestProcTag, 4, @UserPaneHitTestUPP)

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Break
    Case #PB_Event_Gadget
      Debug "Click onto Gadget #" + Str(EventGadget())
  EndSelect
ForEver


Top
 Profile  
 
 Post subject: Re: Imagegadget is no gadget?
PostPosted: Wed Feb 08, 2012 6:31 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 16, 2009 10:42 am
Posts: 531
Location: sweden
You are like a high priest :D
I wish I had the knowledge to understood your code, anyhow.. it works.

J


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye