[MSEide-MSEgui-talk] create component at runtime

2018-07-26 Thread code dz
Hi Martin
i tried to create a slider at runtime with this code , but nothing appears

procedure tmainfo.onbuttonclick(const sender: TObject);
var sd : tslider;
begin
sd := tslider.create(tscrollbox1);
sd.top := 10;
sd.left := 10;
sd.width := 100;
sd.height := 25;
end;

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Multi-arch problem...

2018-07-26 Thread Martin Schreiber
On 07/26/2018 03:13 PM, Martin Schreiber wrote:
> On Thursday 26 July 2018 15:01:25 fredvs wrote:
>> Re-hello.
>>
>>> Maybe librarysearchpath has an entry for /lib where on your system a 64
>>> bit crtn.o is located?
>>
>> Re-about this, even if librarysearchpath has an entry for /lib (that
I did
>> not found),
>
> compiler/systems/t_bsd.pas:124:
Sorry, I didn't notice that you use Manjaro, I thought it's about
PolyDev. I don't know why in Linux "/lib" is in librarysearchpath, I
also did not find the responsible code. One wold need to debug FPC.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] treeitemedit

2018-07-26 Thread mohamed hamza
I Had an error.  Deleting sta file corrected   this.


Regards.


Med



De : Martin Schreiber 
Envoyé : jeudi 26 juillet 2018 06:38
À : mseide-msegui-talk@lists.sourceforge.net
Objet : Re: [MSEide-MSEgui-talk] treeitemedit

On Wednesday 25 July 2018 19:28:26 mohamed hamza wrote:
> if grid.rowcount = 0 then
>
>   begin
>For i := 0 to 1 do
>begin
>grid.rowcount:=grid.rowcount+1;
>with tmynode(treeedit[i]) do begin
> caption:= chr(65+i);
>  for j := 0 to 2  do begin
>  add(1,tmynode );
>  items[j].caption:= 'A' ;  these items are not added to
> tmynode(treeedit[i]) end;end; end; end; end

Works for me, please send a simple testcase which shows the problem

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Multi-arch problem...

2018-07-26 Thread Martin Schreiber
On Thursday 26 July 2018 15:01:25 fredvs wrote:
> Re-hello.
>
> > Maybe librarysearchpath has an entry for /lib where on your system a 64
> > bit crtn.o is located?
>
> Re-about this, even if librarysearchpath has an entry for /lib (that I did
> not found),

compiler/systems/t_bsd.pas:124:
"
Constructor TLinkerBSD.Create;
begin
  Inherited Create;
  if not Dontlinkstdlibpath Then
   if not(target_info.system in systems_darwin) then
 
LibrarySearchPath.AddPath(sysrootpath,'/lib;/usr/lib;/usr/X11R6/lib',true)
   else
 { Mac OS X doesn't have a /lib }
 LibrarySearchPath.AddPath(sysrootpath,'/usr/lib',true)
end;
"
> normally, like for all other libraries, it seems to me that 
> there is a check if the file has the correct ELF 32 bit signature.
>
Probably not for absolute paths.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Multi-arch problem...

2018-07-26 Thread fredvs
Re-hello.

> Maybe librarysearchpath has an entry for /lib where on your system a 64
> bit crtn.o is located? 

Re-about this, even if librarysearchpath has an entry for /lib (that I did
not found), normally, like for all other libraries, it seems to me that
there is a check if the file has the correct ELF 32 bit signature.

And if the signature is 64 bit, it should look for a other path into the
search-path list.

But maybe I miss something.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Multi-arch problem...

2018-07-26 Thread fredvs
> Maybe librarysearchpath has an entry for /lib where on your system a 64 bit
crtn.o is located? 

It is exactly wath I was thinking but... I did not found this in FPC code.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Multi-arch problem...

2018-07-26 Thread Martin Schreiber
On Thursday 26 July 2018 14:11:11 fredvs wrote:
> Hello Martin.
>
> > Because in linker script are absolute paths, see my mail from 2018-07-23:
>
> Huh, OK, I did read it but the code for the linker script is in 
> t_linux.pas line 508 (see my post of Jul 24, 2018; 2:41pm)
>
> StartSection('INPUT(');
>  if linklibc and (libctype<>uclibc) then
>begin
>  { crti.o must come first }
>  if librarysearchpath.FindFile('crti.o',false,s) then // NOT GOOD

Maybe librarysearchpath has an entry for /lib where on your system a 64 bit 
crtn.o is located?
>
> But, OK, thanks for your light (and better to forget that bug
> fixed-by-Xd-workaround).
>
I don't think it is a workaround. -Xd is necessary if in the default library 
paths object files with the correct name but wrong arch are available.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Multi-arch problem...

2018-07-26 Thread fredvs
Hello Martin.

> Because in linker script are absolute paths, see my mail from 2018-07-23: 

Huh, OK, I did read it but the code for the linker script is in  t_linux.pas
line 508 (see my post of Jul 24, 2018; 2:41pm)

StartSection('INPUT('); 
 if linklibc and (libctype<>uclibc) then 
   begin 
 { crti.o must come first } 
 if librarysearchpath.FindFile('crti.o',false,s) then // NOT GOOD
   AddFileName(s) 
 else 
   Message1(exec_w_init_file_not_found,'crti.o'); 
  
  { then the crtbegin* } 
 if cs_create_pic in current_settings.moduleswitches then 
   begin 
 if librarysearchpath.FindFile('crtbeginS.o',false,s) then //
HERE GOOD
   AddFileName(s) 
 else 
   Message1(exec_w_init_file_not_found,'crtbeginS.o'); 
   end 
 else 
...

You may see that the absolute path is the same for all files, why only
'crti.o' and 'crtn.o' get the wrong path ?

> I assume the reason must be searched in FPC code. 

Yes at first look it is what I think but, after searching in FPC code, it is
not so clear that FPC is the guilty.
IMHO there is problem with the os that does not recognize the good 32 bit
ELF for those 2 files.

But, OK, thanks for your light (and better to forget that bug
fixed-by-Xd-workaround).

Fre;D 






--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] treeitemedit

2018-07-26 Thread Martin Schreiber
On Wednesday 25 July 2018 19:28:26 mohamed hamza wrote:
> if grid.rowcount = 0 then
>
>   begin
>    For i := 0 to 1 do
>    begin
>    grid.rowcount:=grid.rowcount+1;
>    with tmynode(treeedit[i]) do begin
>     caption:= chr(65+i);
>      for j := 0 to 2  do begin
>      add(1,tmynode );
>      items[j].caption:= 'A' ;  these items are not added to
> tmynode(treeedit[i]) end;end; end; end; end

Works for me, please send a simple testcase which shows the problem

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk