Page 4 of 8

Posted: Wed Jan 04, 2006 12:32 pm
by SEO
File Creator
As I could see (reading the Help) it is not possible to add (create) or read (check) an File Creator to any files...

Posted: Wed Jan 04, 2006 12:33 pm
by LESTROSO
i sad that i cannot put the datas of my game here like music and graphic, because it's impossible to copy that......

:) ok , you call your recources(music, sounds,graphic) external,but i like and there is the possibility to enclose all inside when you create an app.But now this function don't work well.......

Posted: Wed Jan 04, 2006 12:43 pm
by SEO
Open Console

Code: Select all

result = OpenConsole()
Debug result
Not open the Console
Return result higher than zero.

Also tested the PB Example, Not open the console

Posted: Wed Jan 04, 2006 2:51 pm
by SEO
Button Default

Code: Select all

Enumeration
#Main_Window

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")
 CreateGadgetList(WindowID(#Main_Window))
ButtonGadget(4, 14,20, 60, 20, "Button", #PB_Button_Default)

EndIf ; OpenWindow
EndProcedure



Open_Main_Window()

Repeat
EventID = WaitWindowEvent()

    Select EventID
        
    
    EndSelect ;EventID
    
    Until EventID = #PB_Event_CloseWindow
    End ; Terminate application

Result: NOT Showing the button as Default button

Posted: Wed Jan 04, 2006 4:01 pm
by SEO
Create PopUpMenu

When using the Example in the Help or the Example file, I get an error:
Constant not found #WM_RButtonDown

Posted: Wed Jan 04, 2006 4:51 pm
by SEO
Drag and Drop
I trying to find something about this in the Help, but not ??

I also noticed using the IDE it is NOT possible to Drag an .pb file to
the PureBasic icon to Launch the Purebasic application and open the .pb file

Posted: Wed Jan 04, 2006 5:48 pm
by michel51
Hi SEO
Constant not found #WM_RButtonDown
#WM_ - Constants are defined for Windows respective are Window-Constants. You have to rename. But a lot of such constants have no synonym an Mac or are not supported.

michel51

Posted: Wed Jan 04, 2006 6:03 pm
by michel51
SEO wrote:Button Default
Result: NOT Showing the button as Default button
You're right, it seems, "default-button" is not supported.

michel51

Posted: Wed Jan 04, 2006 8:27 pm
by SEO
Bevel Button
Bevel button 'Toggle' is supported in PB (As toggle button)...

But an Normal Bevelbutton and Bevelbutton with menu is not supported..
Image

Posted: Thu Jan 05, 2006 2:00 pm
by SEO
ImageGadget

The ImageGadget don't fire any Events > 0 ... On Mac OS X

Code: Select all


#SourceFolder = "/Users/sveneolsson/Desktop/"

Enumeration
#Main_Window
#Main_Actionbutton_1
#IMG_Actionbutton

EndEnumeration

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


UsePNGImageDecoder()
If LoadImage(#IMG_Actionbutton, #SourceFolder + "popupbutton.png")    ; change 2nd parameter to the path/filename of your image
      ImageGadget(#Main_Actionbutton_1,10,10,22,28,UseImage(#IMG_Actionbutton))
      
    EndIf



EndIf ; OpenWindow
EndProcedure



Open_Main_Window()

Repeat
EventID = WaitWindowEvent()
ButtonEvent = EventGadgetID()
  
  Debug "Window Event " + Str(EventID)    ;<--###########################
  Debug "Button Event " + Str(ButtonEvent);<--###########################  
    
    Select EventID
        
    
    EndSelect ;EventID
    
    Until EventID = #PB_Event_CloseWindow
    End ; Terminate application


Posted: Thu Jan 05, 2006 3:17 pm
by SEO
ButtonImageGadget

Also the ButtonImageGadget looks not to fire any Event > 0
Just change the code above to test...

Posted: Thu Jan 05, 2006 4:54 pm
by SEO
ButtonImageGadgets
The ButtonImageGadgets WORK as it should..
I have set the size to 0,0 ....
But I am some confused here, the Button looks like an Mac 'Pushbutton' not an Bevelbutton that could have icos...

Posted: Thu Jan 05, 2006 7:17 pm
by michel51
SEO wrote:ImageGadget

The ImageGadget don't fire any Events > 0 ... On Mac OS X
Hi SEO,

try this (You have to change the picture path dates)

Code: Select all

;  #SourceFolder = "/Users/sveneolsson/Desktop/" 

 Enumeration
 #Main_Window 
 #Main_Actionbutton_1 
 #IMG_Actionbutton 

 EndEnumeration 

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


 UseJPEGImageDecoder() 
 If LoadImage(#IMG_Actionbutton, "Bild001.jpg")  ; change 2nd parameter to the path/filename of your image 
      ResizeImage(#IMG_Actionbutton, 30, 30)
      ButtonImageGadget(#Main_Actionbutton_1,10,10,30,30,UseImage(#IMG_Actionbutton)) 
;       ImageGadget(#Main_Actionbutton_1,10,10,30,30,UseImage(#IMG_Actionbutton)) 
 Else
   MessageRequester("Error","Cannot load Image")      
 EndIf 

 EndIf ; OpenWindow 
 EndProcedure 

 Open_Main_Window() 

 Repeat 
 EventID = WaitWindowEvent() 
 ButtonEvent = EventGadgetID() 

;    Debug "Window Event " + Str(EventID)      ;<--########################### 
;    Debug "Button Event " + Str(ButtonEvent)  ;<--###########################  

   Select EventID 
      Case #PB_Event_Gadget
      
      Debug "Window Event " + Str(EventID)      ;<--###########################
      Debug "Button Event " + Str(ButtonEvent)  ;<--###########################  

   EndSelect ;EventID 
;  While WaitWindowEvent() : Wend
 
Until EventID = #PB_Event_CloseWindow 
End ; Terminate application 
With Imagegadget you are right, there is no event, because the mouseclicks are not supported here :!: :?:

ButtonImageGadget works :)

michel51

Posted: Thu Jan 05, 2006 8:01 pm
by SEO
Text Encoding Problem ButtonGadget
It is not only the debugger that have some Encoding problems, also the ButtonGadget not handle the used Encoding from the IDE Editor properly.....

Code: Select all

ButtonGadget(#Main_PushButton_1, 60,60, 100,20,"Åstorp")

Code: Select all

Enumeration
#Main_Window
#Main_PushButton_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") And CreateGadgetList(WindowID(#Main_Window))
    ButtonGadget(#Main_PushButton_1, 60,60, 100,20,"Åstorp")
EndIf ; OpenWindow
EndProcedure

Open_Main_Window()

Repeat
EventID = WaitWindowEvent()
  Debug Str(EventID)
    Select EventID
       
    EndSelect ;EventID
    
    Until EventID = #PB_Event_CloseWindow
    End ; Terminate application


Posted: Thu Jan 05, 2006 9:28 pm
by SEO
About RunProgram
As I wrote before I don't get that to work. But the Mac IDE/Editor is using that?? I mean to launch the compiler ??
//SEO