Page 1 of 1

How do you make it work (editorGadget)?

Posted: Fri Jan 05, 2007 12:21 am
by chen
This ia an example from the PB4 manual... in windows works like it must be
but in Linux does not?

why?

Code: Select all

 If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0)) 
    EditorGadget(0, 8, 8, 306, 133) 
    For a = 0 To 5 
      AddGadgetItem(0, a, "Line "+Str(a)) 
    Next 
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow 
  EndIf 
do I need to consider something else?

Posted: Fri Jan 05, 2007 1:24 am
by Pinhead
What is the problem/error?
It works fine with PB4-beta2 and Slackware 11.

Posted: Fri Jan 05, 2007 2:09 am
by chen
Pinhead wrote:What is the problem/error?
It works fine with PB4-beta2 and Slackware 11.
If you run the code in windows you get:
Line 0
Line 1
Line 2
Line 3
Line 4
Line 5

this is OK...

If I run it in Ubuntu 6.10... I get:

Line 0Line 1Line 2Line 3Line 4Line 5

that is not ....

Using PB4 beta 2

then are you getting the right result??? :?

Posted: Fri Jan 05, 2007 2:54 am
by Pinhead
Ups, sorry.
I get the same result like yours. I thought it's a other problem.
Must be a problem with the EndOfLineChar.
I think it's a bug in PB4

Posted: Fri Jan 05, 2007 3:14 am
by chen
Pinhead wrote:Ups, sorry.
I get the same result like yours. I thought it's a other problem.
Must be a problem with the EndOfLineChar.
I think it's a bug in PB4
I think so... I change the line termination to mac, to win and back to linux
but nothing works.....!!

Posted: Fri Jan 05, 2007 7:24 am
by Pinhead
Close the line with 'chr(10)' that will work...

Posted: Fri Jan 05, 2007 8:57 pm
by chen
Pinhead wrote:Close the line with 'chr(10)' that will work...
no it isnt... anyway it is something that is not working like it must be.....

Posted: Fri Jan 05, 2007 9:00 pm
by Pinhead
I know, but chr(10) is a workaround till it is fixed...