***SOLVED*** StringGadget() fails for text len > 2500
Posted: Sat Mar 26, 2011 8:54 pm
****************************************************************************
the problem described below vanished after reboot!
I didn't shut down the PC for about 10 days. I prefer "standby" instead.
Just now it occurred to me to try a reboot ... and... everything is ok.
Sorry for havn't thought of this earlier.
!!Thanks for your answers!!
****************************************************************************
Does someone has an idea? --> StringGadget() fails.
The following code runs on my WIN7 (32bit) at least up to teststring len=99999 .
But on my XP the initialization of the StringGadget() fails for text len > 2500 (even earlier)
The XP PC is a new one.
On my previous XP PC there was no such problem up to at least 60000 characters.
I know this because the program in question is used to read in a textfile of this size.
The program is in use since years.
So this shouldnt be a problem of PB. But perhaps someone has an idea?
PB = 4.51
Thanks for help tomio
the problem described below vanished after reboot!
I didn't shut down the PC for about 10 days. I prefer "standby" instead.
Just now it occurred to me to try a reboot ... and... everything is ok.
Sorry for havn't thought of this earlier.
!!Thanks for your answers!!
****************************************************************************
Does someone has an idea? --> StringGadget() fails.
The following code runs on my WIN7 (32bit) at least up to teststring len=99999 .
But on my XP the initialization of the StringGadget() fails for text len > 2500 (even earlier)
The XP PC is a new one.
On my previous XP PC there was no such problem up to at least 60000 characters.
I know this because the program in question is used to read in a textfile of this size.
The program is in use since years.
So this shouldnt be a problem of PB. But perhaps someone has an idea?
PB = 4.51
Code: Select all
NL.s=Chr(13)+Chr(10)
iz=Val(InputRequester("Enter Stringlength for StringGadget:","","0"))
If iz=0: End:EndIf
;
;make lines of 100 characters each:
i1=iz/100:
i2=iz-i1*100
For i=1 To i1:
v1+100:v$=Right("00000"+Str(v1),5) ;character counter
u$=u$+Space(92)+v$+"X"+NL:
Next
If i2>0: u$=u$+Space(i2-1)+"X": EndIf
;
flag=#ES_MULTILINE |#PB_String_ReadOnly | #WS_VSCROLL;
If OpenWindow(0, 0, 0, 422, 220, "StringGadget Flags", #PB_Window_SystemMenu )
StringGadget(0, 8, 10, 406, 200, u$,flag)
MessageRequester("QQ","len="+Str(Len(u$))+", IsGadget="+Str(IsGadget(0)))
If IsGadget(0) = 0: End: EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf