Page 2 of 2
Re: #PB_Compiler_EnumerationValue
Posted: Thu Nov 29, 2012 12:26 am
by ts-soft
Polo wrote:If I use enumeration for windows/gadgets before including a .pbf file then it won't work if I don't add the flag.
Most people don't use enumeration for windows/gadgets before including your form
but if the do, the have to set the number for beginning your enumeration or self merge the
enumerations.
I think, the best is to create one commonfile with Enumerations for all GUIs, that should
work in one project.
Re: #PB_Compiler_EnumerationValue
Posted: Thu Nov 29, 2012 5:37 am
by nospam
ts-soft wrote:Memory is not a big problem, but i do not like to waste it useless

Whatever you do, don't get any aspirations to work for Micro$oft

Re: #PB_Compiler_EnumerationValue
Posted: Thu Nov 29, 2012 1:55 pm
by Polo
ts-soft wrote:Polo wrote:If I use enumeration for windows/gadgets before including a .pbf file then it won't work if I don't add the flag.
Most people don't use enumeration for windows/gadgets before including your form
In big projects, it's likely they will, I'm still unsure on what to do with that. I'll give it some thoughts!

Re: #PB_Compiler_EnumerationValue
Posted: Fri Nov 30, 2012 9:44 pm
by HeX0R
A redefine()-CompilerDirective would come in handy, then you could do it like this:
Code: Select all
CompilerIf Defined(PB_ENUMERATION_GADGETS, #PB_Constant) = 0
#PB_ENUMERATION_GADGETS = 0
CompilerEndIf
;Gadgets
Enumeration #PB_ENUMERATION_GADGETS
#Text_0
#Text_1
EndEnumeration
ReDefine(#PB_ENUMERATION_GADGETS, #PB_Compiler_EnumerationValue)
Re: #PB_Compiler_EnumerationValue
Posted: Fri Nov 30, 2012 10:19 pm
by ts-soft
Or the Compiler set a constant like this:
Code: Select all
Enumeration #NextWindowValue
#frmMain
#frmDialog
EndEnumeration
Enumeration #NextGadgetValue
#btnOkay
#btnCancel
EndEnumeration
Should not a big problem for the compiler to look at the objectmanager to set the value.