Panel and other gadgets

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
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!
I understand that, but there is a find/replace possibility in the editor...
Anyway, if you realy need these keywords, why not creating a procedure with your own keywords?! Only one possibillitie....
Yes Mike thats a way.

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())
 
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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

>AddToolBarStandardButton

Arghhh... i hate this loooong names.

ATBSB = AddToolBarStandardButton
ATBIB = AddToolBarImageButton

cya,
...Danilo :wink:
[Assembly forever!!]

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.
>AddToolBarStandardButton

Arghhh... i hate this loooong names.

ATBSB = AddToolBarStandardButton
ATBIB = AddToolBarImageButton

cya,
...Danilo :wink:
[Assembly forever!!]

(registered PureBasic user)
Argh, I like these long name

[PureBasic forever !!]

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.

Argh, I like these long name
Okay, lets replace END to:
CloseMyApplicationAsFastAsPossibleAndRestoreMyDesctopAndBringItToFrontByTheWayFreeAllMyAllocatedMemory

:-))))

Mike


PS: I hate long commands too Danilo :)

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

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.

Endlich ein Befehl, bei dem man weiß, was genau passiert :)

Oh sorry, wrong Forum :wink:

regards,
Redacid
---
Only Amiga makes it possible!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Endlich ein Befehl, bei dem man weiß, was genau passiert :)
translation:
Finally a command where you know what's going on :)

I like the new End command too
Can I use it for my programs or do you have a copyright on it?


Have a nice day...
Franco
Post Reply