Restored from previous forum. Originally posted by Franco.
Since a view weeks I work intensively with panels and other gadgets.
So I think there are some commands with unlucky names (not consistent).
I prefer:
1.) CreatePanel instead of PanelGadget (like CreateMenu or CreateToolBar)
2.) AddPanelItem instead of AddGadgetItem (like MenuItem)
2.) AddMenuItem instead of MenuItem
4.) AddToolBarStandardButton instead of ToolBarStandardButton etc.
otherwise AddGadgetItem must be GadgetItem or better PanelItem, and MenuItem remains the same.
IMHO the goal of a programming language must be, to be consistent from the beginning to the end.
Have a nice day...
Franco
Edited by - franco on 06 January 2002 20:49:36
Panel and other gadgets
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tranquil.
Normaly I would say that you are right, but I think it is to late to began renameing the commands. I dont want to change all my sourcecodes!
Anyway, if you realy need these keywords, why not creating a procedure with your own keywords?! Only one possibillitie....
Cheers,
Mike
Tranquilizer/ Secretly!
Registred PureBasic User
Normaly I would say that you are right, but I think it is to late to began renameing the commands. I dont want to change all my sourcecodes!
Anyway, if you realy need these keywords, why not creating a procedure with your own keywords?! Only one possibillitie....
Cheers,
Mike
Tranquilizer/ Secretly!
Registred PureBasic User
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Franco.
Anyway I don't use the real Gadget names anyway.
I builded my own wrapper for gadgets and windows.
Now I don't have to choose a gadgtet or a window number anymore.
All numbers are set automatically.
And a nice thing is that my calls for a gadget are now like:
All Tooltips are set automatically, also the command behind the gadgtet is automatically linked to the procedure FunctionControl1().
Don't need a Select Event.. thingie anymore for each gadget.
If you are coding a large program it is very easy to code all gadgets...
Anyway, thanks.
Have a nice day...
Franco
I understand that, but there is a find/replace possibility in the editor...Normaly I would say that you are right, but I think it is to late to began renameing the commands. I dont want to change all my sourcecodes!
Yes Mike thats a way.Anyway, if you realy need these keywords, why not creating a procedure with your own keywords?! Only one possibillitie....
Anyway I don't use the real Gadget names anyway.
I builded my own wrapper for gadgets and windows.
Now I don't have to choose a gadgtet or a window number anymore.
All numbers are set automatically.
And a nice thing is that my calls for a gadget are now like:
Code: Select all
ButtonGadget(Window1,10, 90, 100, 25,"ButtonText","Control 1 ToolTip",@FunctionControl1())
Don't need a Select Event.. thingie anymore for each gadget.
If you are coding a large program it is very easy to code all gadgets...
Anyway, thanks.
Have a nice day...
Franco
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by fred.
[PureBasic forever !!]
Fred - AlphaSND
Argh, I like these long name>AddToolBarStandardButton
Arghhh... i hate this loooong names.
ATBSB = AddToolBarStandardButton
ATBIB = AddToolBarImageButton
cya,
...Danilo
[Assembly forever!!]
(registered PureBasic user)
[PureBasic forever !!]
Fred - AlphaSND
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tranquil.
CloseMyApplicationAsFastAsPossibleAndRestoreMyDesctopAndBringItToFrontByTheWayFreeAllMyAllocatedMemory
)))
Mike
PS: I hate long commands too Danilo
Tranquilizer/ Secretly!
Registred PureBasic User
Okay, lets replace END to:
Argh, I like these long name
CloseMyApplicationAsFastAsPossibleAndRestoreMyDesctopAndBringItToFrontByTheWayFreeAllMyAllocatedMemory

Mike
PS: I hate long commands too Danilo

Tranquilizer/ Secretly!
Registred PureBasic User
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm