Rename String to Input
Posted: Wed Aug 21, 2013 1:26 am
Rename the String gadget to Input as a string cannot be a control as it is traditionally a sequence of characters.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Macro InputGadget(Gadget, x, y, Width, Height, Content)
StringGadget(Gadget, x, y, Width, Height, Content)
EndMacro
OpenWindow(0,100,100,300,100,"test")
InputGadget(0,20,20,200,20,"This is an InputGadget!")
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
Renaming it to Input is one step towards that... :pnblackburn wrote:I have to say now I have spent more time with PB, I also think it sounds like a stupid idea, haha
P.S - AMS is generally pretty terrible for most things, why would I do that?
Don't start thinking like that, otherwise you'll close your mind to perfectly valid coding solutions.nblackburn wrote:I have to say now I have spent more time with PB, I also think it sounds like a stupid idea, haha
Code: Select all
PrivateSubroutine(DvsML06, DD2765Attach) (ByVal(Me, strDvsML06))
If NotObject(Me\proPanelDD2765)
Me\proPanelDD2765 = CreateObject(PanelItem)
Set(Me\proPanelDD2765, exoParent, Me\proAppPanel)
Set(Me\proPanelDD2765, exsTabText, "Structures")
SetCallBack(Me\proPanelDD2765, expCBDesign, DvsML06, DD2765Design)
ObjectCall(Me\proPanelDD2765, Build) ()
Else
ObjectCall(Me\proPanelDD2765, Show) ()
EndIf
EndSubroutine
Code: Select all
Procedure clsDvsML06_subDD2765Attach (*Self.strDvsML06)
If *Self\proPanelDD2765 = 0
*Self\proPanelDD2765 = clsPanelItem_funCreate()
*Self\proPanelDD2765\setexoParent(*Self\proAppPanel)
*Self\proPanelDD2765\setexsTabText("Structures")
*Self\proPanelDD2765\setexpCBDesign(1, @clsDvsML06_subDD2765Design())
*Self\proPanelDD2765\setexpCBDesign(2, *Self)
*Self\proPanelDD2765\subBuild ()
Else
*Self\proPanelDD2765\subShow ()
EndIf
EndProcedure
My food of choice is a Bedfordshire Clanger.luis wrote:I like pizza.
I like bratwurst with sauerkraut and salzkartoffelnluis wrote:I like pizza.
Kartoffelsalat, Sauerkraut und bratwurst oder currywurst. ^^ts-soft wrote:I like bratwurst with sauerkraut and salzkartoffelnluis wrote:I like pizza.
I haven't started to think like that at all don't worry, just on this occasion just after careful consideration I feel it makes sense they way it is and that it doesn't need to be changed.BorisTheOld wrote:Don't start thinking like that, otherwise you'll close your mind to perfectly valid coding solutions.nblackburn wrote:I have to say now I have spent more time with PB, I also think it sounds like a stupid idea, haha
+1luis wrote:@nblackburn and to everyone interested really... a TIP
You can just use:
@BorisTheOld
instead of re-quoting his post entirely. Very rarely is needed.
This tip is especially directed to people quoting sometimes a 1+ screen long code to say "Nice!"
This is not just something cosmetic, or to save disk space, it also simplify forum's searches avoiding redundant results.
It's also logical IMHO (in a programmers' forum should be something cherished I hope).
To QUOTE is different from I_JUST_REPEAT_ALL_YOU_JUST_SAID_BEFORE_REPLYING_TO_YOU.
Would you do that in real life ?
*SIGH*
http://www.purebasic.fr/english/viewtop ... 66#p422866
http://www.purebasic.fr/english/viewtop ... 60#p422860