Page 2 of 2

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Posted: Sat Jan 09, 2010 10:02 pm
by blueznl
Dunno, Fred, but I see nothing wrong with using the same enumeration set for different items, as long as you mark them clearly.

I typically do things like this:

Code: Select all

Enumeration
  ;
  ; windows
  ;
  #w_main_nr
  ;
  ; toolbars
  ;
  #tb_main_nr
  ;
  ; gadgets
  ;
  #g_ok
  ;
EndEnumeration
In fact, I *like* it if windows and gadgets have DIFFERENT numbers...

Then again, I'm not the worlds best programmer (but at least I document my stuff :-))

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Posted: Sat Jan 09, 2010 10:27 pm
by ts-soft
blueznl wrote:Dunno, Fred, but I see nothing wrong with using the same enumeration set for different items, as long as you mark them clearly.
The intern Objectlist for Gadget for example, reserves memory of 32 Byte (in 32-Bit) for any used or noneused
ID from 0 to ...

Code: Select all

Structure PB_GadgetStructure
  Gadget.i
  *VT.PB_GadgetVT
  UserData.i
  OldCallback.i
  Data.i[4]
EndStructure

Debug SizeOf(PB_GadgetStructure)
Separate Numbering is better in this case.

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Posted: Sun Jan 10, 2010 12:16 am
by Blue Steel
while i was editing the code I even tried using the tool type window .. yeah yeah.. i know its not the same size..

however I thought because the measurements of a propper window were on the working area inside noe the external that the Tool type of window would be the same.. but i found that it was shorter (internaly) in both length and height .. is the tool window using external as opposed to internal sizing ???

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Posted: Sun Jan 10, 2010 4:11 am
by Mohawk70
@BlueSteel
I remember you from the forums of a few of those OTHER languages. Welcome - good to see you active here !